Page 1 of 2

Check File Content

Posted: Thu Sep 07, 2017 5:04 am
by DrNox
Hi,

I am trying to found a plugin which permit to check in a file if a got a right string (it's a summary of antivirus scan).
I see some plugin ( like it : https://exchange.nagios.org/directory/P ... nt/details ) but it don't really permit to do what i want.

If someone know a good plugin don't hesitate to tell me :)

Kind regards,

Nox

Re: Check File Content

Posted: Thu Sep 07, 2017 8:36 am
by mcapra
Is this plugin meant to be executed on a Windows machine or a Linux machine?

For Linux I recommend check_log3:
https://exchange.nagios.org/directory/P ... pl/details

For Windows I recommend check_logfiles, though it's a bit of a pain to build from scratch:
https://labs.consol.de/nagios/check_logfiles/

Re: Check File Content

Posted: Thu Sep 07, 2017 8:54 am
by scottwilkerson
Probably the most common I usually see used is also
https://exchange.nagios.org/directory/P ... es/details

Re: Check File Content

Posted: Thu Sep 07, 2017 9:04 am
by DrNox
Thanks for your answers !
Is this plugin meant to be executed on a Windows machine or a Linux machine?
It s for manage a windows server 2008 R2

Then i will try https://exchange.nagios.org/directory/P ... 1493382673
i will come back to us if i got some issues :)

Re: Check File Content

Posted: Thu Sep 07, 2017 9:11 am
by scottwilkerson
Sounds good!

Re: Check File Content

Posted: Tue Sep 12, 2017 4:26 am
by DrNox
Hi,

I come back to you cause i have some issues :
On the plugin i don't saw where i can say that the string : "Infected files: 0" is okey and other number (>0) is critical.
And i'am totaly lost with this plugin : i don't know how to use it and install it ...
Do you know how to proceed ?

Re: Check File Content

Posted: Tue Sep 12, 2017 7:34 am
by DrNox
i forget to say that i manage Windows server :/

Re: Check File Content

Posted: Tue Sep 12, 2017 8:08 am
by scottwilkerson
DrNox wrote:Hi,

I come back to you cause i have some issues :
On the plugin i don't saw where i can say that the string : "Infected files: 0" is okey and other number (>0) is critical.
And i'am totaly lost with this plugin : i don't know how to use it and install it ...
Do you know how to proceed ?
From their page
--warning=<Number>. Complex handler-scripts can be provided with a warning-parameter (of course –critical is possible, too) this way. Inside the scripts the value is accessible as the macro CL_WARNING (resp. CL_CRITICAL).
https://labs.consol.de/nagios/check_log ... parameters

Re: Check File Content

Posted: Tue Sep 12, 2017 8:24 am
by DrNox
--warning=<Number>. Complex handler-scripts can be provided with a warning-parameter (of course –critical is possible, too) this way. Inside the scripts the value is accessible as the macro CL_WARNING (resp. CL_CRITICAL).
yeah, but on a string i can't put this ?

And if i'am with windows server, can I use this plugin ?

Re: Check File Content

Posted: Tue Sep 12, 2017 8:55 am
by scottwilkerson
You can but you would need to install an agent such as NSClient++
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

However if you are just counting the files and installing the agent you may wish to configure the commands like described on this page:
http://sites.box293.com/nagios/guides/c ... es-folders

You will need to enable the NRPE listener as described in this doc
https://assets.nagios.com/downloads/nag ... ios-XI.pdf