Generated NRPE checks swallow quotes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Hi,
The graylog charm has this bit of code:
| if conf['web_
| url = urlparse(
| check_string = '<title>Graylog Web Interface</title>'
| nrpe_setup.
| 'graylog_http',
| 'Graylog Web UI check',
| '/usr/lib/
Which is supposed to generate a check such as this:
| command[
Unfortunately, the double-quote characters are being stripped and the generated check is actually this:
| $ cat /etc/nagios/
| # check graylog_http
| # The following header was added automatically by juju
| # Modifying it will affect nagios monitoring and alerting
| # servicegroups: is-centralized-
| command[
Which then causes the check to fail.
I think it may be the use of **kwargs, but I'm not sure.
I think it's because Check.__init__ does this:
parts = shlex.split( check_cmd)
and then does this:
instead of using shlex.join.