Check_mem on localhost
Posted: Sat Dec 12, 2015 5:12 pm
Hi
I am quite new to Linux and especially on Nagios. However, I wanted to install the check_mem plugin to monitor memory usage on the localhost only. Therefore I did the following:
I copied the check_mem.sh into the libexec folder and have set the appropriate rights on the file (using CentOS 7 btw)
Afterwards I added the following to the command.cfg:
In the file localhost.cfg I added the following:
If I run the pre-flight check, I get the following error: "Error: Service check command 'check_mem.sh' specified in service 'check_mem' for host 'localhost' not defined anywhere!"
What have I missed? In which file I have to define the service?
I am quite new to Linux and especially on Nagios. However, I wanted to install the check_mem plugin to monitor memory usage on the localhost only. Therefore I did the following:
I copied the check_mem.sh into the libexec folder and have set the appropriate rights on the file (using CentOS 7 btw)
Afterwards I added the following to the command.cfg:
Code: Select all
define command{
command_name check_mem
command_line $USER1$/check_mem.sh -w 80 -c 90
}
Code: Select all
define service{
use local-service
host_name localhost
service_description check_mem
check_command check_mem.sh
}
What have I missed? In which file I have to define the service?