Check File Content

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Check File Content

Postby DrNox » Thu Sep 07, 2017 5:04 am

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
French Baguette
User avatar
DrNox
 
Posts: 37
Joined: Wed Apr 19, 2017 9:20 am

Re: Check File Content

Postby mcapra » Thu Sep 07, 2017 8:36 am

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/
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2773
Joined: Thu May 05, 2016 3:54 pm

Re: Check File Content

Postby scottwilkerson » Thu Sep 07, 2017 8:54 am

Probably the most common I usually see used is also
https://exchange.nagios.org/directory/P ... es/details
User avatar
scottwilkerson
CTO
 
Posts: 7590
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Check File Content

Postby DrNox » Thu Sep 07, 2017 9:04 am

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 :)
French Baguette
User avatar
DrNox
 
Posts: 37
Joined: Wed Apr 19, 2017 9:20 am

Re: Check File Content

Postby scottwilkerson » Thu Sep 07, 2017 9:11 am

Sounds good!
User avatar
scottwilkerson
CTO
 
Posts: 7590
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Check File Content

Postby DrNox » Tue Sep 12, 2017 4:26 am

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 ?
French Baguette
User avatar
DrNox
 
Posts: 37
Joined: Wed Apr 19, 2017 9:20 am

Re: Check File Content

Postby DrNox » Tue Sep 12, 2017 7:34 am

i forget to say that i manage Windows server :/
French Baguette
User avatar
DrNox
 
Posts: 37
Joined: Wed Apr 19, 2017 9:20 am

Re: Check File Content

Postby scottwilkerson » Tue Sep 12, 2017 8:08 am

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_logfiles/#command-line-parameters
User avatar
scottwilkerson
CTO
 
Posts: 7590
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Check File Content

Postby DrNox » Tue Sep 12, 2017 8:24 am

--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 ?
French Baguette
User avatar
DrNox
 
Posts: 37
Joined: Wed Apr 19, 2017 9:20 am

Re: Check File Content

Postby scottwilkerson » Tue Sep 12, 2017 8:55 am

You can but you would need to install an agent such as NSClient++
https://assets.nagios.com/downloads/nagiosxi/docs/Installing-The-Windows-Agent-NSClient++-for-Nagios-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/nagiosxi/docs/Enabling-the-NRPE-Listener-in-NSClient-0.4.x-for-Nagios-XI.pdf
User avatar
scottwilkerson
CTO
 
Posts: 7590
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Next

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 29 guests