monitoring file content

mail at catsnest.co.uk mail at catsnest.co.uk
Thu Jan 20 17:19:05 CET 2011


On Tue, Jan 18, 2011 at 10:40 AM, Maurer, Michael
<Michael.Maurer at mosolf.de> wrote:
> hi folks,
>

Hi,

> i`d like to monitor the content of a txt file on a remote windows host.
>
> The file will be formated like:
>
> value1: 1009
> value2: 156
> value3: 7889
> value4: 9981
> valueN: …..
>
> I have to set warning and critical ranges for each value separately. (value1
> warn=500, crit = 1500 / value2 warn = 100, crit = 500 etc…)
>
> The file will be deleted and newly created if one of the values changes.
>
> Does anybody know how to do that? thanks in advance!

I use a check something similar, I (badly) wrote a Perl script for the check.
It runs on Solaris though so would need fiddling for windows /ActivePerl.
Plus its expecting data in the format 'value1:1234 value2:1234 value3:4567'
So again would need playing with to work how you want it to...

I have attached the script and some config files.
HTH
Ritchie

--
Fnord...
<-- http://23.me.uk --> <-- http://wiki.s23.org --> <--
http://twitter.com/23me -->
<- -Only the lavender prairie dogs know the key to unlock the secret
of the tumble-weeds. -->
>
> kind regards
> Michael
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log_checker.tar.gz
Type: application/x-gzip
Size: 3916 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110120/4555edd0/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list