Skip to content
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

cmd/scollector: Change Linux process monitoring to use regex for Comm… #1565

Merged
merged 1 commit into from
Jan 21, 2016

Conversation

gbrayut
Copy link
Contributor

@gbrayut gbrayut commented Jan 21, 2016

…and argument

This may impact anyone monitoring a process where the command includes a regex reserved character.
In that case you should change your toml config to use ' instead of " and escape the character using
Example:

[[Process]]
Command = "/usr/bin/redis-server *:16389"
Name = "redis-bosun-dev"

needs to escape the * since that is a regex reserved character

[[Process]]
Command = '/usr/bin/redis-server *:16389'
Name = "redis-bosun-dev"

if you use " instead of ' the escape would be "redis-server \*:16389"

…and argument

This may impact anyone monitoring a process where the command includes a regex reserved character.
In that case you should change your toml config to use ' instead of " and escape the character using \
Example:

[[Process]]
  Command = "/usr/bin/redis-server *:16389"
  Name = "redis-bosun-dev"

needs to escape the * since that is a regex reserved character

[[Process]]
  Command = '/usr/bin/redis-server \*:16389'
  Name = "redis-bosun-dev"

if you use " instead of ' the escape would be "redis-server \\*:16389"
@gbrayut gbrayut merged commit 4b38062 into master Jan 21, 2016
@gbrayut gbrayut deleted the gbray branch January 21, 2016 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant