NAGIOS - monitoring windows event logs
Posted: Wed May 08, 2013 11:08 am
Good Morning,
I am receiving the error w/in nagios.... (Return code of 126 is out of bounds - plugin may not be executable)
I have followed these directions:
at first the plugin was not set to executable w/in the nagios server.. I changed it to 755(before I change it i received error code 127.. after I change it.. it can now see the plugin.. but not execute.. I am running this on a centos5 server... the client is a windows server 2003 and is currently set-up w/in nagios and being successfully monitored... I am stumped..
on the windows machien i have the .exe running as a service.. and can see it w/in the process list...
Thanks
I am receiving the error w/in nagios.... (Return code of 126 is out of bounds - plugin may not be executable)
I have followed these directions:
at first the plugin was not set to executable w/in the nagios server.. I changed it to 755(before I change it i received error code 127.. after I change it.. it can now see the plugin.. but not execute.. I am running this on a centos5 server... the client is a windows server 2003 and is currently set-up w/in nagios and being successfully monitored... I am stumped..
on the windows machien i have the .exe running as a service.. and can see it w/in the process list...
Thanks
Code: Select all
Installing check_win_eventlog and eventlog_agent!
1. Installing check_win_eventlog
To install this Nagios Plugin, simply copy check_win_eventlog.pl to
$NAGIOS_HOME/libexec directory and set the excutable flag on it.
To make use of the Plugin you need to define a check_command and a
service like it is shown below:
define command{
command_name check_win_eventlog
command_line $USER1$/check_win_eventlog.pl -H $HOSTADDRESS$ -s $ARG1$ -l $ARG2$ -t $ARG3$
}
define service{
service_description System Eventlog
use generic-service
check_command check_win_eventlog!a!System!.*:+1
max_check_attemtps 1
host_name MyMaschine
contact_groups MyAdminGroup
is_volatile 1
}
This will check the Eventlog Protocol "System" and excludes all Events
that are not of type error ('.*' exclude all; '+1' but include errors).
2. Install the eventlog_agent
You have several options to install the eventlog_agent on your Windows Server.
a) Manual
To test this peace of Software you may choose to simply run the 'eventlog_agent.exe'
from the Windows Explorer. There is NO konfiguration needed, so you can just run
the Nagios Plugin to check the agent.
b) Windows Service
Most people will want to install the 'eventlog_agent.exe' as Windows Service, because
this way it will start automatically on each reboot.
To do this, you will need 'instsrv.exe' and 'srvany.exe' from Microsoft Resource Kit.
Just copy those files together with 'eventlog_agent.exe', 'eventlog_agent.bat' and
'eventlog_agent.reg' into the folder 'c:\programme\eventlog_agent' and run the
batch file. If you want to use a different folder, then you will need to modify
the path in 'eventlog_agent.bat' and 'eventlog_agent.reg'
c) Autostart
You may put the exe into your Systems Autostart Folder. But this requires that there is
someone logged in.