ubuntu - Nagios, custom plugin doesn't work -


please, help! can't handle check_mem.sh plugin https://exchange.nagios.org/directory/plugins/system-metrics/memory/check-mem-%28by-nestor%40toronto%29/details

i used guids found, in nagios web-interface see "(no output returned plugin)".

if use command local on remote machine going fine:

root@ubuntu:/home/test0# /usr/local/nagios/libexec/check_mem.sh -w 80 -c 90 memory: critical total: 975 mb - used: 937 mb - 96% used!|total=975;;;; used=937;;;; cache=221;;;; buffer=14;;;; 

in nrpe.cfg wrote this:

command[check_mem]=/usr/local/nagios/libexec/check_mem.sh -w 80 -c 90 

in nagios-server test0.cfg (config file of remote machine) wrote this:

define service {  use                        generic-service  host_name                  test0  service_description        memory usege1  check_command              check_nrpe!check_mem } 

in commands.cfg this:

define command{  command_name   check_mem  command_line   $user1$/check_nrpe -h $hostaddress$ -c check_mem  } 

nrpe on remote machine works fine:

root@ubuntu:/etc/nagios-plugins/config# /usr/lib/nagios/plugins/check_nrpe -h 192.168.239.136 nrpe v2.15 

when use command nagios-server machine looks fine:

root@ubuntu:/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_nrpe -h 192.168.239.136 -c check_mem memory: warning total: 975 mb - used: 850 mb - 87% used!|total=975;;;; used=850;;;; cache=305;;;; buffer=44;;;; 

but in web-interface still problem

sorry bad english :)

i don't know of these steps solved problem, works!

  1. chmod +x check_mem.sh
  2. i deleted service description test0.cfg
  3. added service description services_nagios2.cfg hostgroup debian-servers
  4. restarted service nagios3

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -