monitoring a text file in the NASstrorage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

monitoring a text file in the NASstrorage

Post by naranant »

Hi,

I have a requirement to monitor a text file saved in the NAS storage. Look for Error text: ERROR in the log file and generate alert. Can you suggest ways for monitoring this file?

As this is NAS storage i can't install the Nagios agent on that.

We have Nagios XI in our environment.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: monitoring a text file in the NASstrorage

Post by tacolover101 »

i think an agent would be required, unless you could get fancy with SNMP.

regardless if you use an agent or not, you're going to need a script or something to parse the log file.

another angle, is using a log collector for this - https://www.nagios.com/products/nagios-log-server/ - most NAS's support sending syslog by default.
kyang

Re: monitoring a text file in the NASstrorage

Post by kyang »

Thanks for the help @tacolover101!

naranant, he's right. To me, an agent would make it less complicated.

Have you searched for any script on the Nagios Exchange?
https://exchange.nagios.org/

+1 for Nagios Log Server to collect logs from the NAS and send those alerts to XI.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: monitoring a text file in the NASstrorage

Post by mcapra »

Alternatively, if the NAS is accessible from the Nagios XI machine (as a samba share, SFTP/FTP pipe, etc), something like check_log3 could be used to read the file from a local Linux mount.
  • Mount the NAS on the Nagios XI machine
  • Point check_log3 at the file you want to examine
The first problem to solve would be how you can access the file from the Nagios XI machine. The searching is trivial and can be done with basic Linux and Bash stuff.
Former Nagios employee
https://www.mcapra.com/
kyang

Re: monitoring a text file in the NASstrorage

Post by kyang »

Thanks for the help @mcapra!

naranant, let us know if you have any more questions.
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Re: monitoring a text file in the NASstrorage

Post by naranant »

Thank you everyone i will try these option and will keep you posted.
kyang

Re: monitoring a text file in the NASstrorage

Post by kyang »

Sounds good.

Let us know if you have any more questions.
Locked