Display Service Status Dynamically

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
josh3006
Posts: 1
Joined: Tue Apr 24, 2018 9:51 pm

Display Service Status Dynamically

Post by josh3006 »

Hi,

I have a CSV file which has list of statuses of services
My requirement here is to read this CSV file and display it all the services with the statues with amber light ( health of the service)
This list of services are dynamically added and not a constant service. Means the next interval of CSV will have different service name

Eg : Interval 1

GetFile, 1 , 1
PutFile, 2 , 3


Eg : Interval 2

PutToES, 1 , 1
GeneratePDF, 2 , 3

Does anyone here knows how this can be done using Nagios ?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Display Service Status Dynamically

Post by cdienger »

The check_logfiles(https://labs.consol.de/nagios/check_logfiles/index.html) can be used to find partterns in strings. For example, to print out the lines containing "2,3":

./check_logfiles --criticalpattern '2,3' --logfile=/home/file.csv --report=long --configdir /dev/null
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked