I am a beginner in icinga and nagios usage for server management. I setup icinga on a machine and set up all the basics. The next step I tried was to check if certain services were running at ports 8080, 8081 and 8082
or not. I wrote a quick python script for that. I placed that file under /usr/local/lib/myscript.py
. The next step I did was to create a command under /etc/nagios-plugins/config/testone.cfg
. My command looks like this
define command{
command_name check_restarts
command_line python /usr/local/lib/myscript.py -w 3 -c 5 -p 8080
command_line python /usr/local/lib/myscript.py -w 3 -c 5 -p 8081
command_line python /usr/local/lib/myscript.py -w 3 -c 5 -p 8082
}
I then added a service to services.conf under /etc/icinga2/conf.d/services.conf
. But this leads to an error when I restart icinga which shows up a message Backend icinga not running
on the UI and errors point to services.conf
when I try sudo service icings2 status
.
Can anyone please guid me around these steps?