-
Notifications
You must be signed in to change notification settings - Fork 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
Fixes #12517: Add generic methods to assign monitoring templates and parameters to nodes #745
Conversation
##################################################################################### | ||
|
||
# @name Monitoring parameter | ||
# @description Add a monitoring parameter to a node |
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.
We could use a @documentation
section here, with a usage example. It should explain what a monitoring parameter is and it is used for. See other methods for syntax (the content itself is in matkdown)
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.
add a (requires a monitoring plugin)
##################################################################################### | ||
|
||
# @name Monitoring template | ||
# @description Add a monitoring template to a node |
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.
same here
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.
add a (requires a monitoring plugin)
@@ -0,0 +1,50 @@ | |||
##################################################################################### | |||
# Copyright 2013 Normation SAS |
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.
2018
@@ -0,0 +1,48 @@ | |||
##################################################################################### | |||
# Copyright 2013 Normation SAS |
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.
same here
Commit modified |
b62e3a9
to
1469664
Compare
# are specific to each plugin and can be found in their respective documentation. | ||
# | ||
# | ||
# @parameter key Name of the key |
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.
Name of the parameter
methods: | ||
|
||
"disable_reporting_${old_class_prefix}" usebundle => disable_reporting; | ||
"Write csv file" usebundle => file_ensure_lines_present("/var/rudder/tmp/rudder_monitoring.csv", "param,${key},${value}"); |
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.
Is the case where value contains a comma handled properly ?
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.
Yes, the plugins will escape the commas past the second and the parameter will contain them as expected.
1469664
to
d8c34a9
Compare
Commit modified |
d8c34a9
to
d4d1193
Compare
# | ||
# | ||
# @parameter key Name of the parameter | ||
# @parameter value Value of the key |
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.
value of the parameter
…parameters to nodes
Commit modified |
d4d1193
to
5560ffd
Compare
OK, merging this PR |
https://www.rudder-project.org/redmine/issues/12517