Nagios own command use

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
aleksandrs.jurcenko
Posts: 8
Joined: Mon Mar 02, 2015 8:36 am

Re: Nagios own command use

Post by aleksandrs.jurcenko »

i think, i resolved it, with check_by_ssh plugin.
if i run command mannualy all is ok:
./check_by_ssh -H 170.252.34.127 -l dir+dcsc_ldap -E -C '/usr/local/nagios/libexec/check_load -w 1,1,1 -c 3,3,3'

if i put it to .cfg file:

Code: Select all

define command{
        command_name    my_com2
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -l dir+dcsc_ldap -E -C '/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$'
        }
on check_mk view there will be an error:
Internal error:: 255
Traceback (most recent call last):
File "/usr/share/check_mk/web/htdocs/index.py", line 228, in handler
handler()
File "/usr/share/check_mk/web/htdocs/views.py", line 1152, in page_view
show_view(view, True, True, True)
File "/usr/share/check_mk/web/htdocs/views.py", line 1435, in show_view
browser_reload)
File "/usr/share/check_mk/web/htdocs/views.py", line 1533, in render_view
show_checkboxes and not html.do_actions())
File "/usr/share/check_mk/web/plugins/views/layouts.py", line 121, in render_grouped_boxes
register_events(row) # needed for playing sounds
File "/usr/share/check_mk/web/htdocs/views.py", line 2629, in register_events
html.register_event({0:"up", 1:"warning", 2:"critical", 3:"unknown"}[saveint(svc_state)])
KeyError: 255
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios own command use

Post by jdalrymple »

That appears to be a check_mk UI specific error for sure. Can you see the service status in Nagios Core? Either way I'd probably dispatch that error off to the check_mk forums for the developers there to advise.

check_by_ssh is indeed a better way than to run your command unwrapped by just defining ssh as a check command, so you're a step closer to solving your problem - however I still would encourage NRPE. Checking load on a remote host is absolutely trivial on any system that NRPE can be compiled and run on.
Locked