Skip to content
This repository has been archived by the owner on Feb 13, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant