Check string in windows log application file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Check string in windows log application file

Post by emi65 »

Hi expert

I'm looking for a check to monitor an application log files in a windows environment

I need to start an alert when a specific strings appear in this log

Some one have suggestion in order to solve this problem ?

thanks for your help
Regards
Emilio
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Check string in windows log application file

Post by avandemore »

Does this answer your question?

Code: Select all

[root@core ~]# /usr/local/nagios/libexec/check_log -F /var/log/messages -O /dev/null -q 'test message' -w 1
Log check ok - 0 pattern matches found|match=0;;;0
[root@core ~]# logger "test message"
[root@core ~]# /usr/local/nagios/libexec/check_log -F /var/log/messages -O /dev/null -q 'test message' -w 1
(1) < May 26 09:31:24 core root: test message|match=1;;;0
[root@core ~]# /usr/local/nagios/libexec/check_log -h | head -n 1
check_log v2.1.4 (nagios-plugins 2.1.4)
There are other plugins available as well on https://exchange.nagios.org/
Previous Nagios employee
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Check string in windows log application file

Post by emi65 »

Sorry but your solution is used in the unix environment
I need a solution to monitor a log file present in a MS Windows application
The files is in a folder like C:\APP\LOG

anyway thanks for your help
Emilio
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Check string in windows log application file

Post by avandemore »

You may be able to find a plugin here that satisfies your need:
https://exchange.nagios.org/

If not, you can create your own. Here are some guides:
https://nagios-plugins.org/doc/guidelines.html
https://mathias-kettner.de/checkmk_localchecks.html
http://www.yourownlinux.com/2014/06/how ... cript.html
Previous Nagios employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check string in windows log application file

Post by tmcdonald »

Just checking in since we have not heard from you in a while. Did @avandemore's post clear things up or has the issue otherwise been resolved?
Former Nagios employee
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Check string in windows log application file

Post by emi65 »

I didn't find a ready check .

I'll plane to write new one
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check string in windows log application file

Post by tmcdonald »

Otherwise if you are okay with a commercial solution, then Nagios Log Server was developed specifically for this: https://www.nagios.com/products/nagios-log-server/
Former Nagios employee
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Check string in windows log application file

Post by emi65 »

thanks for your suggestions
Regards
Emilio
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Check string in windows log application file

Post by lmiltchev »

Emilio, do you have any more questions? Can we close this thread?
Be sure to check out our Knowledgebase for helpful articles and solutions!
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: Check string in windows log application file

Post by emi65 »

No , I'have no more question

Many Thanks for you help

regards
Emilio
Locked