Status Information "null" in check_wmi_plus

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nexustk
Posts: 12
Joined: Mon Sep 03, 2012 4:55 am
Location: Rome

Status Information "null" in check_wmi_plus

Post by nexustk »

Hello everyone, I'm new to the world of nagios ... and certainly because of this I can not run the plugin "check_wmi_plugin." The problem was always returns (null) in "Status Information". The "commands" in "commands.cfg" it defined like this:

"define command {
command_name check_wmi_plus
command_line $USER6$/check_wmi_plus.pl -H $HOSTADDRESS$ -m $ARG1$ -u $USER8$ -p $USER9$ -s $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$ $ARG9$
}
"define command {
command_name check_win_uptime
command_line command_line $USER6$/check_wmi_plus.pl -H $HOSTADDRESS$ -m checkuptime -u $USER8$ -p $USER9$ -w $ARG1$ -c $ARG2$ $ARG3$ $ARG4$ $ARG5$
} "

Instead of "service" in "service.cfg" in this way
"define service {
use generic-service
host_name myserver.domain.it
service_description Win Uptime
check_command check_win_uptime! 10min:! 20min:
normal_check_interval 10
retry_check_interval 1
} "

Running ". / Check_wmi_plus.pl myserver.domain.it-H-u administrator-p password-w m checkuptime 10min: 20min-c:" everything works.
What's wrong?
Attachments
status information rsoults
status information rsoults
Cattura.PNG (7.52 KiB) Viewed 1944 times
gridd
Posts: 6
Joined: Sun Aug 19, 2012 8:38 pm

Re: Status Information "null" in check_wmi_plus

Post by gridd »

I have the same problem with check_cisco.pl. This is also perl script and returns null to Nagios Core. But it works fine from command line and as I can see from nagios.debug file all the parameters pass to the script are correct.

I would be very thankful to any ideas.
nexustk
Posts: 12
Joined: Mon Sep 03, 2012 4:55 am
Location: Rome

Re: Status Information "null" in check_wmi_plus

Post by nexustk »

I was going to share ... I think I have, 1 hour seems to work .. So .. I ran the same script as utebte "nagios" and I found 2 problems. First problem that I was missing perl module (with root everything was OK - I run "sudo cpan install Number :: Format" adding "nagios" group sudo), the second nagios did not write permissions in / tmp (leans them my script). fact this seems to work for 1 hour.. :D
Locked