Page 1 of 4
Detecting a string in a file
Posted: Wed May 11, 2016 2:21 am
by RIDS_I2MP
Hi Team,
We have a requirement to monitor the Webserver log files on servers for a particular string with a fixed frequency of polling for 24x7 throughout the year.
Please can you let us know if this can be enabled using Nagios tool to highlight/alert the team if the string is found.
Re: Detecting a string in a file
Posted: Wed May 11, 2016 5:16 am
by WillemDH
In order to answer this question, you will need to tell us if you are want to check for this string in a logfile on Linux or a Windows host.
Re: Detecting a string in a file
Posted: Wed May 11, 2016 9:56 am
by ssax
Also, in addition to WillemDH's questions, are you looking to have near-real-time alerting (passive checks) or to have the XI server reach out on an interval to check (active checks).
Thank you
Re: Detecting a string in a file
Posted: Thu May 12, 2016 9:00 am
by RIDS_I2MP
Hi Team,
We want to implement this for a windows remote host.
There is a folder containing number of files, files are generated regularly in this folder as these are log files, file name will be consisting the date and time specifying at what particular time it was created. Nagios needs to fetch the recent file from the folder.
Nagios should check that file after some time interval (say 5mins) and fetch the string in the file , if the string is found then alert needs should be send.
Re: Detecting a string in a file
Posted: Thu May 12, 2016 9:56 am
by lmiltchev
You should be able to achieve your goal by using the "check_log3" with "NSClient++".
https://exchange.nagios.org/directory/P ... pl/details
Hope this helps.
Re: Detecting a string in a file
Posted: Fri May 13, 2016 6:25 am
by RIDS_I2MP
I search led me that we need to enable NRPE in NSclient++.
Can you tell using NRPE how can I achieve my gaol?
Re: Detecting a string in a file
Posted: Fri May 13, 2016 9:53 am
by ischwartz
RIDS_I2MP wrote:I search led me that we need to enable NRPE in NSclient++.
Can you tell using NRPE how can I achieve my gaol?
You should check one of the two docs linked here depending on your version.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... -0.3.x.pdf
Re: Detecting a string in a file
Posted: Mon May 16, 2016 1:23 am
by RIDS_I2MP
Hi Team,
Thanks for the document explaining how to enable NRPE in NSClient++.
But let me know how to detect a string in a file for windows host.
Re: Detecting a string in a file
Posted: Mon May 16, 2016 1:27 am
by Box293
RIDS_I2MP wrote:I search led me that we need to enable NRPE in NSclient++.
Can you tell using NRPE how can I achieve my gaol?
RIDS_I2MP wrote:Hi Team,
Thanks for the document explaining how to enable NRPE in NSClient++.
But let me know how to detect a string in a file for windows host.
Now you need to go back to what
@lmiltchev suggested and use check_log3 with NSClient++
Re: Detecting a string in a file
Posted: Mon May 16, 2016 1:32 am
by RIDS_I2MP
Hi Team,
Nagios forum:
"You should be able to achieve your goal by using the "check_log3" with "NSClient++".
https://exchange.nagios.org/directory/P ... pl/details
Hope this helps."
Can you let me know some other link from where I can download the "check_log3.exe" file for my windows host?