We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Availability Report need in Human-readable format

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Availability Report need in Human-readable format

Postby yogeshpatel » Mon Feb 21, 2022 2:12 am

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

Re: Availability Report need in Human-readable format

Postby gormank » Tue Feb 22, 2022 2:00 pm

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.
gormank
 
Posts: 992
Joined: Tue Dec 02, 2014 12:00 pm

Re: Availability Report need in Human-readable format

Postby yogeshpatel » Wed Feb 23, 2022 12:31 am

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


Return to Community Support

Who is online

Users browsing this forum: No registered users and 27 guests