-
Notifications
You must be signed in to change notification settings - Fork 2
Properly anchor the collector name when locating the file #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Properly anchor the collector name when locating the file #38
Conversation
…ultiple connector with similar names work (eg. Http HttpCode)
|
LGTM thanks for contributing @johvet ! Going to have the original author @nhatfield take a look as well. |
| if [[ "${v}" == "COLLECTOR_"* ]]; then | ||
|
|
||
| FILE=`echo "${COLLECTORS}" | grep -i "$(echo "${v}" | sed 's%^COLLECTOR_%%;s%_.*%%' | tr 'A-Z' 'a-z')"` | ||
| FILE=`echo "${COLLECTORS}" | grep -i "^$(echo "${v}" | sed 's%^COLLECTOR_%%;s%_.*%%' | tr 'A-Z' 'a-z')$"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johvet I agree this needs to be done. Would you mind if we do this native in grep? Just adding -w before or after the -i will do the trick. Appreciate your contribution
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, using -w is way more elegant. Wasn't thinking about that.
|
@johvet: @rclagett rebased your PR onto dev and there's some commits from git checkout johvet/support-repeated-collector-names
git status // make sure the working directory is clean
git reset --hard dev // hard reset your branch to the dev branch
git cherry-pick 1aedda7 // cherry pick your commit onto dev
git push -f // force push to this PR |
|
Hi @johvet are you okay to make the changes @nhatfield and @TheConnMan suggested? |
This PR addresses an issue when trying to configure a collector with a repeated (portion) of the name, for example
Jolokia. This would matchCassandraJolokiaCollector.conf,JolokiaCollector.conf, andKafkaJolokiaCollector.confand theentrypoint.shfails. Same applies toHttp.