Nagios charm does not add default host checks to nagios

Bug #1605733 reported by Hrvoje
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Nagios Charm
Fix Released
Undecided
Unassigned
nagios (Juju Charms Collection)
Won't Fix
Undecided
Unassigned

Bug Description

Adding relation i get i the logs:

2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_disk_root_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_zombie_procs_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_mem_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_swap_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_load_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_users_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_total_procs_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_disk_root_sub due to unknown family nrpe
2016-07-22 13:33:21 INFO monitors-relation-changed Ignoring check_zombie_procs_sub due to unknown family nrpe

Nrpe plugin is installed and all looks ok. This is all installed via automated juju deployment.

When new relation is added, script charm/hooks/monitors-relation-changed is called. In the end, there is a for loop where it does add services to nagios - lines 118 to 126. And from there this line comes.

Upon further investigation, this loop calls in customize_service, which for NRPE calls customize_nrpe in charm/hooks/common.py. There is check that "extra" argument must have array with "command" element - and if this is not true, false is returned.

And, this is the problem, since for default commands, "extra" just contains command - and not array. Changing common.py in line 175 from "return False" to "cmd_args.extend(('-c', extra))" fixes this problem for me. I'm not sure if this will break something else, so maybe proper fix is needed.

Regards,

H.

Related branches

Revision history for this message
Tom Barber (spicule) wrote :

Yeah, I hit that, looks bug-esque to me.

Revision history for this message
Sandor Zeestraten (szeestraten) wrote :

Any update on this? Is there a maintainer for the nagios charm?

tags: added: canonical-bootstack
Stuart Bishop (stub)
Changed in nagios (Juju Charms Collection):
status: New → Won't Fix
Revision history for this message
Hrvoje (hrvoje-habjanic) wrote :

Eh!? Won't Fix!? Why?

This is obviously bug ... or error in logic. Just leaving it as it is will just cause more pain and sorrow for people trying to do something with it!

I do not get it.

H.

Revision history for this message
Sandor Zeestraten (szeestraten) wrote :

@stub Anything we can do to help land this fix?

Stuart Bishop (stub)
Changed in nagios-charm:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.