Hi there.
I am trying to monitor a file which is in a Windows server. The exact location is like this. "\\171.10.XX.XX\FileAdapter\sowal.log", I am looking for this exact phrase "Tracing is being stopped"
I have already tried some plugins I found but I still can no make it work.
Has anyone resolve this kind of issues?
Can Somebody help me.?
Thank you very much in advance.
Best Regards.
Monitoring a text file for a phrase.
Re: Monitoring a text file for a phrase.
You could try using this plugin:
https://github.com/pmcaulay/nagios-plug ... k_log3.exe
Place it in the NSClient++ scripts directory. Create an entry in the nsclient.ini (under the [/settings/external scripts/scripts] section):
save, exit, and restart the NSClient++ service. Test your command from the command line on the Nagios XI server by running:
To view the usage of the plugin, run:
Hope this helps.
https://github.com/pmcaulay/nagios-plug ... k_log3.exe
Place it in the NSClient++ scripts directory. Create an entry in the nsclient.ini (under the [/settings/external scripts/scripts] section):
Code: Select all
check_log3 = scripts\check_log3.exe $ARG1$Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_log3 -a '-l "\\171.10.XX.XX\FileAdapter\sowal.log" -p "Tracing is being stopped"'Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_log3 -a '-h'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring a text file for a phrase.
HI lmiltchev
Thank you very much for your aswer.
I have encounter a solution for this, All I did was first mount the windows shared folder on my nagios server. with this command.
Then used a very simple plugin
https://github.com/deimosfr/nagios-chec ... master.zip
I have changed some stuffs to adapt exactly to my needs and it worked!!
If for some reason this work-around does not works for me anymore I will try your way!
Thank you very much again.
Best Regards
Thank you very much for your aswer.
I have encounter a solution for this, All I did was first mount the windows shared folder on my nagios server. with this command.
Code: Select all
mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserverhttps://github.com/deimosfr/nagios-chec ... master.zip
I have changed some stuffs to adapt exactly to my needs and it worked!!
If for some reason this work-around does not works for me anymore I will try your way!
Thank you very much again.
Best Regards
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring a text file for a phrase.
Glad you found a working solution!antorres wrote:HI lmiltchev
Thank you very much for your aswer.
I have encounter a solution for this, All I did was first mount the windows shared folder on my nagios server. with this command.
Then used a very simple pluginCode: Select all
mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserver
https://github.com/deimosfr/nagios-chec ... master.zip
I have changed some stuffs to adapt exactly to my needs and it worked!!
If for some reason this work-around does not works for me anymore I will try your way!
Thank you very much again.
Best Regards
Locking thread