Check file and output file content

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
clinton92
Posts: 10
Joined: Thu Sep 28, 2017 1:29 pm

Check file and output file content

Post by clinton92 »

Hi Everyone,

I would like to ask if there are some plugins wherein we can read a file from a different server, for example, Server1 has the file log.txt in C:// which consist of Hello World.
So Nagios will pick up the file log.txt from Server1 and output it in Nagios frontend.
If possible, it should read the content per line and output it per line.
kyang

Re: Check file and output file content

Post by kyang »

Hey @clinton92,

So you want a plugin that can read text files line per line, and output it line per line?
I'm not exactly sure on the use case for this.

Also when you mean Server1, is this server a Linux server, windows? Since you say C:/?

You would have to use an agent, in that case, to communicate over to the windows server. The agent on Server1 would send back information to Nagios using a plugin.

As for the reading line by line, I'm not exactly sure how that will work out. You want the text in that file to be shown as a live status?
Locked