Plugin not work correctly
Plugin not work correctly
hi
i have downloaded this plugin for nagios
http://www.toms-blog.com/nagios-hp-msa- ... e-monitor/
i have create this file for service :
define host{
use linux-server ; Name of host template to use
host_name p2000
alias localhost
address 10.0.4.100
}
define service {
host_name p2000
service_description Controller CPU
use generic-service
check_command check_p2000!-c controller -S cpu-load -u "%" -w 60 -C 80!!!!!
}
add this line in nrpe.cfg file
command[check_p2000]=/usr/local/nagios/libexec/check_p2000_api.php
and add this line to command
define command {
command_name check_p2000
command_line $USER1$/check_p2000_api.php -H $HOSTADDRESS$ -U $USER11$ -P $USER12$ $ARG1$
}
but in nagios now show this error
(No output returned from plugin)
why show this error?
i have downloaded this plugin for nagios
http://www.toms-blog.com/nagios-hp-msa- ... e-monitor/
i have create this file for service :
define host{
use linux-server ; Name of host template to use
host_name p2000
alias localhost
address 10.0.4.100
}
define service {
host_name p2000
service_description Controller CPU
use generic-service
check_command check_p2000!-c controller -S cpu-load -u "%" -w 60 -C 80!!!!!
}
add this line in nrpe.cfg file
command[check_p2000]=/usr/local/nagios/libexec/check_p2000_api.php
and add this line to command
define command {
command_name check_p2000
command_line $USER1$/check_p2000_api.php -H $HOSTADDRESS$ -U $USER11$ -P $USER12$ $ARG1$
}
but in nagios now show this error
(No output returned from plugin)
why show this error?
Re: Plugin not work correctly
Can you try executing the plugin from the CLI and show us the output?
Code: Select all
/usr/local/nagios/libexec/check_p2000_api.php -H <host> -U <user> -P <pass>
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Plugin not work correctly
mcapra wrote:Can you try executing the plugin from the CLI and show us the output?
Code: Select all
/usr/local/nagios/libexec/check_p2000_api.php -H <host> -U <user> -P <pass>
Code: Select all
[root@Nagios libexec]# /usr/local/nagios/libexec/check_p2000_api.php -H 10.0.4.100 -U manage -P manage
OK : Disks 24 OK, Vdisk 1 OK, Temperature 14 OK, Voltage 26 OK, Overall 3 OK, Midplane/Chassis 1 OK, RAID IOM 2 OK, AC Power Supply 2 OK, Enclosures 1 OK
Re: Plugin not work correctly
Can you verify that the Nagios user and command group have permissions to execute this plugin?
Also try the following:
Code: Select all
ls -al /usr/local/nagios/libexec/check_p2000_api.phpCode: Select all
su nagios
/usr/local/nagios/libexec/check_p2000_api.php -H <host> -U <user> -P <pass>
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Plugin not work correctly
mcapra wrote:Can you verify that the Nagios user and command group have permissions to execute this plugin?
Also try the following:Code: Select all
ls -al /usr/local/nagios/libexec/check_p2000_api.php
Code: Select all
su nagios /usr/local/nagios/libexec/check_p2000_api.php -H <host> -U <user> -P <pass>
Code: Select all
ls -al /usr/local/nagios/libexec/check_p2000_api.php
-rwxr-xr-x. 1 root root 25799 Mar 16 2014 /usr/local/nagios/libexec/check_p2000_api.php
Code: Select all
[root@Nagios libexec]# su nagios
[nagios@Nagios libexec]$ /usr/local/nagios/libexec/check_p2000_api.php -H 10.0.4.100 -U manage -P manage
OK : Disks 24 OK, Vdisk 1 OK, Temperature 14 OK, Voltage 26 OK, Overall 3 OK, Midplane/Chassis 1 OK, RAID IOM 2 OK, AC Power Supply 2 OK, Enclosures 1 OK,
exactly i use this guide
add this in command.cfg
Code: Select all
define command {
command_name check_p2000
command_line $USER1$/check_p2000_api.php -H $HOSTADDRESS$ -U $USER11$ -P $USER12$ $ARG1$
}
add this service
Code: Select all
define service {
host_name nagios
service_description Controller CPU
use generic-service
check_command check_p2000!-c controller -S cpu-load -u "%" -w 60 -C 80!!!!!!!
}
i think my problem is just for user and pass and ip because i did not insert ip and user and pass where do i have to insert them ?
Re: Plugin not work correctly
Ah, those $USERn$ macros typically need to be set manually in resource.cfg. This file is generally located here:
Try setting the following definitions:
Code: Select all
/usr/local/nagios/etc/resource.cfgCode: Select all
$USER11$=<username>
$USER12$=<password>
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Plugin not work correctly
mcapra wrote:Ah, those $USERn$ macros typically need to be set manually in resource.cfg. This file is generally located here:
Try setting the following definitions:Code: Select all
/usr/local/nagios/etc/resource.cfg
Code: Select all
$USER11$=<username> $USER12$=<password>
so thanks
my problem has been solved but i want know if want chk disk on my MSA what do i have to do ? above command can just chk cpu load
Best regards
Re: Plugin not work correctly
From the plugin's help menu:
We don't have the equipment here to test against.
Code: Select all
-c Sets what you want to do
status - get the status of the SAN
disk - Get performance data of the disks
controller - Get performance data of the controllers
named-volume - Get the staus of an individual volume - MUST have -n volumename specified
named-vdisk - Get the staus of an individual vdisk - MUST have -n volumename specified
vdisk - Get performance data of the VDisks
volume - Get performance data of the volumes
vdisk-write-latency - Get vdisk write latency (only available in later firmwares)
vdisk-read-latency - Get vdisk read latency (only available in later firmwares)
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/