Nagios plugin - Check file content


#1

Good afternoon to you all

I need help

Does anybody know of any script or plugin for Nagios that check´s file´s contents? What I want is very simple. Basically I need for Nagios to check a file: if a file as any content at all, then it´s ok, if the file is empty, then I want it to create an alarm.

Doesn´t matter what kind of content there is in the file. What i want is something that will check if the file has anything written in it, and if not it will create an alarm. It can even be based on the file´s size: if it´s 0 then it creates the alarm.

Is there anything in Nagios that can do that?

Any help is apreciated.
Thkx


#2

If we are talking linux/unix it’s called ls :slight_smile:
But possibly searching nagios exchange could give you some better answers.