Windows event log event not being emailed



event is seen in Nagios event log , but notification is not sent.

using windows eventlog agent software eventlog_agent.bat.

nagios server command is below:

define command{
command_name check_win_eventlog
command_line $USER1$/./check_win_eventlog.pl -H
$HOSTADDRESS$ -l 'Application:System' -s 1234 -m '.*:+Error'
}


nagios server service definition is below:

define service {
name NM-Windows-EventLog
service_description Event Log
check_command check_win_eventlog
check_period 24x7
notification_period 24x7
is_volatile 0
max_check_attempts 3
normal_check_interval 10
retry_check_interval 1
notification_interval 10
notification_options w,u,c,r
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 0
check_freshness 1
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 0
register 0
}


Nagios server Service example definintion is below


define service {
use NM-Windows-EventLog
host_name ohisex03.ohis.local
contact_groups nt-admins,oncall-admin
}



contents of event_log.bat on windows client is below:



@echo off
echo.
if "%1" == "stop" goto stop
echo Einrichten des Service "eventlog_agent"
echo ----------------------------------------------------------------------
echo (Anhalten und Deinstallieren mit dem Aufruf "eventlog_agent.bat stop")
echo.
echo Installieren des Service...
c:\Nagios\instsrv.exe eventlog_agent c:\Nagios\srvany.exe
echo.
echo Installieren der Registry-Werte...
regedit eventlog_agent.reg
echo.
echo Starten des Service...
net start eventlog_agent
goto ende
:stop
echo Anhalten und Deinstallieren des Service "eventlog_agent"
echo ----------------------------------------------------------------------
echo Stoppen des Service...
net stop eventlog_agent
echo.
echo Deinstallieren des Service und der Registry-Werte...
c:\Nagios\instsrv.exe eventlog_agent remove
:ende
echo.
echo *** Fertig ***
echo.
pause
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Service will not start after a reboot
    ... and the whole point of writing it as a service was to ... clues in the Event log and there are no dependencies on other services. ... Use the Task Scheduler to run the following batch file at boot ... echo %date% %time%>>c:\Waldy.log ...
    (microsoft.public.windowsxp.general)
  • Re: event logs
    ... I use task scheduler to run it and email it to me from the server. ... @echo off ... P.S. Dumpel does not export the DNS event log. ...
    (microsoft.public.win2000.security)
  • Re: Parsing file using FOR command not working correctly
    ... @echo off ... I'm trying to extract just the Event Log ... >Here's the output of my batch file: ... Windows: General MVP ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Parsing file using FOR command not working correctly
    ... > Using the FOR command, I'm trying to extract just the Event Log ... ECHO %Num% ...
    (microsoft.public.win2000.cmdprompt.admin)