monitor event logs under "applications and services logs"
-
luffywallis
- Posts: 3
- Joined: Tue Jul 30, 2013 2:59 am
monitor event logs under "applications and services logs"
Hi all;
i'm trying to track events on applications and services logs/Microsoft/Windows/Diagnosis-PLA/Operational. i know that it's not possible using check_wmi_eventid, and my only solution is to use check_nrpe checkeventlog. i'm confused on how to point to the specific location, since all the examples that i found on net point to basic locations (application, system....). Thank you
i'm trying to track events on applications and services logs/Microsoft/Windows/Diagnosis-PLA/Operational. i know that it's not possible using check_wmi_eventid, and my only solution is to use check_nrpe checkeventlog. i'm confused on how to point to the specific location, since all the examples that i found on net point to basic locations (application, system....). Thank you
Re: monitor event logs under "applications and services logs
I'm going to put a big plug in here for Nagios Log Server. You can monitor all your Windows event logs and application logs by sending them to the Nagios Log Server, and then search for strings and patterns there, then alert through Nagios from Log Server. Plus, for a small size installation, it's free!
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: monitor event logs under "applications and services logs
What version of NSClient++ are you running?
Re: monitor event logs under "applications and services logs
Here is what worked for me on the latest version of NSClient++:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -c checkeventlog -a file=YOURLOGNAME MaxWarn=1 MaxCrit=1 "filter=generated > -1h AND severity = 'error' OR severity = 'informational'"Re: monitor event logs under "applications and services logs
I right clicked on the even log and view the properties to get the full name, yours would be:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -c checkeventlog -a file=Microsoft-Windows-Diagnosis-PLA/Operational MaxWarn=1 MaxCrit=1 "filter=generated > -1h AND severity = 'error' OR severity = 'informational'"-
luffywallis
- Posts: 3
- Joined: Tue Jul 30, 2013 2:59 am
Re: monitor event logs under "applications and services logs
thank you ssax, that worked for messax wrote:I right clicked on the even log and view the properties to get the full name, yours would be:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -c checkeventlog -a file=Microsoft-Windows-Diagnosis-PLA/Operational MaxWarn=1 MaxCrit=1 "filter=generated > -1h AND severity = 'error' OR severity = 'informational'"
i just want to ask about the messages received by mail in nagios notification: i want to add the details of the event log in the received mail. i tried the solution described here :
http://serverfault.com/questions/410020 ... tification
(config changed in /etc/nagios/misccommands.cfg), i rebooted the nagios server, but that didn't work...any hint?
Re: monitor event logs under "applications and services logs
Can you post your notify-service-by-email definition for us to look at?
Former Nagios Employee
-
luffywallis
- Posts: 3
- Joined: Tue Jul 30, 2013 2:59 am
Re: monitor event logs under "applications and services logs
Okay, sorry i was wrong, i'm using centreon, so i had to change it through centreon interface.after doing that LONGSERVICEOUTPUT has been added. this is the definition of notify-by-email:rkennedy wrote:Can you post your notify-service-by-email definition for us to look at?
Code: Select all
/usr/bin/printf "%b" "***** centreon Notification *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATE$ Additional Info : $SERVICEOUTPUT$\n Description: $LONGSERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
Code: Select all
./check_nrpe -H hostname -c checkeventlog -a file=Microsoft-Windows-Diagnosis-PLA/Operational MaxWarn=1 MaxCrit=1 "filter=generated > -1m AND severity = 'informational' AND id=2031" unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
information: Microsoft-Windows-Diagnosis-PLA: Performance counter \ServiceModelOperation 4.0.0.0(xxxxxxxxxxxx|xxxx|)\Calls Duration has tripped its alert threshold. The counter value of 4.000038 is over the limit value of 1.000000. 1.000000 is the alert threshold value. (%count%)|'count'=6;1;1
Code: Select all
***** centreon Notification *****
Notification Type: PROBLEM
Service: eventlog_service
Host: hostname
Address: hostname
State: CRITICAL
Date/Time: 02-03-2016 Additional Info : information: Microsoft-Windows-Diagnosis-PLA: Performance counter \ServiceModelOperation 4.0.0.0(xxxxxxxxxxxx|xxxx
Description:
Re: monitor event logs under "applications and services logs
I'm sorry, but we do not support Centreon or other competing software. You will need to visit their forums for support.
Former Nagios employee