RRD Conversion

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
danniiffxi
Posts: 121
Joined: Tue Jan 30, 2018 3:29 am
Location: UK

RRD Conversion

Post by danniiffxi »

Hi Ladies and Gentlemen

First off I want to wish you all a very Merry Christmas and a Happy New Year, and I apologise if this has been mentioned in a previous thread but I am far to lazy to read every post on the forum, I have found a few similar but none that ask exactly what I am about too.

OK so what I am trying to do it convert the RRD timestamp into a human readable format. So after dumping the graph to the CSV I can open the spreadsheet and use a simple formula to convert the EPOCH/UNIX time & date to human readable. What I need to do next has me stuck and headbutting my keyboard in frustration :roll: .. What I need to do is convert the graph output results from "4.00000e-02" into "0.04" for example. Does anyone know how this can be done, there has to be a way because Nagios does it when applying the results to the graphs.

The plan is to make a pretty dashboard for the management which is to be built in PowerBI, because we all know they love pretty graphs at their meetings without the hassle of actually logging into a Nagios and searching for what they need
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: RRD Conversion

Post by ssax »

This should work, you don't say what language you're using so I went with bash:

Code: Select all

#!/bin/bash
SCIENTIFIC='4.00000e-02'
DECIMAL=$(printf "%.2f" $SCIENTIFIC)
echo $DECIMAL
exit 0
danniiffxi
Posts: 121
Joined: Tue Jan 30, 2018 3:29 am
Location: UK

Re: RRD Conversion

Post by danniiffxi »

Thank you ssax, sorry for the late reply, I had complete forgot about this thread due to the Christmas break. I was wondering more about a CSV conversion but bash will be fine.

Many thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: RRD Conversion

Post by scottwilkerson »

danniiffxi wrote:Thank you ssax, sorry for the late reply, I had complete forgot about this thread due to the Christmas break. I was wondering more about a CSV conversion but bash will be fine.

Many thanks.
May we close the thread?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
danniiffxi
Posts: 121
Joined: Tue Jan 30, 2018 3:29 am
Location: UK

Re: RRD Conversion

Post by danniiffxi »

Sure, go for it :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: RRD Conversion

Post by scottwilkerson »

danniiffxi wrote:Sure, go for it :)
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked