Availability Report need in Human-readable format

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
yogeshpatel
Posts: 2
Joined: Mon Feb 21, 2022 1:38 am

Availability Report need in Human-readable format

Post by yogeshpatel »

Hello Experts,

I am using Nagios Core 4.4.5. And Have configured the network devices as per requirements. Here the main issue is the Availability Report's uptime as a CSV is coming in Seconds. I need that uptime in Human-readable format.
e.g Nagios shows the report as 86400 Seconds. I need it as 1d 0h 0m 0s.

So what changes should be done in the file(s) so that I can achieve my task. So No more manual work by calculating seconds into Hours, Days, Minutes, Seconds format.
Attachments
avail.csv
Availability Report example
(1.29 KiB) Downloaded 66 times
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Availability Report need in Human-readable format

Post by gormank »

The avail.cgi file is a binary so your best bet is probably to make a script that runs the report, grabs the CSV output, converts the time column from seconds to whatever you prefer and then saves the file.
yogeshpatel
Posts: 2
Joined: Mon Feb 21, 2022 1:38 am

Re: Availability Report need in Human-readable format

Post by yogeshpatel »

Hello,

Thanks for the reply.

Can you guide me for creating the shell script for report? As I am newbie in Nagios. If possible can't we directly change in avail.c file? and then compile the Nagios.

Thanks
Yogesh P.
Locked