I have configured all the prereqs for the check_events.pl plugin and can successfully run the plugin from the command line. In my specific case the plugin looks at a local file on the icinga server for an up or down string. It works when I run it:
perl check_events.pl -L -U -D
I have the command configured as specified in the check_events.pl.
define service{
use local-service
host_name localhost
service_description
check_command check_events!-L /var/log/ -D “down” -U "up"
notifications_enabled 0
}
<> represents a path to a file that is managed by syslog-ng.
The error I get is:
The command defined for service does not exist
Anyone have any ideas? The Icinga server is functional in all other respects (and is in production) and monitors heaps of other stuff happliy.
The local-service is defined as the default service that is configured to monitor the localhost (nagios or icinga host) and is configured as 127.0.0.1
Does anyone know if this plugin is reuired to be run via NRPE or anything like that?
Any help would be great!! I can provoide additonal info, but do not have access to the server at present.
Thanks for the reply. I can run the check_events.pl from the command line sa user icinga. I initally had issues with the Nagios::Plugin CPAN module not being avaialbe, so installed ActivePerl rpm and ensured that the library was in the path (script specific and using the PATH). I could then run the plugin happily using:
perl check_events/pl _l <path -U -D
The result could come back with an OK or a WARNING result as required. When it is run inside Icinga, then it returns the error described in the previous post.