Graphing Average Ping of 4 Hosts

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
scotepi
Posts: 6
Joined: Wed Oct 01, 2014 8:40 am

Graphing Average Ping of 4 Hosts

Post by scotepi »

I have a remote site with 4 different hosts there that I monitor with ping latency. I have a graph that shows all of them but I want to also graph an average number between the 3 to try and get a more stable number. Currently it is only using the last data source as seen in the debug. I'm using 0.8.8b

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--title='Remote - Ping Average' \
--base='1000' \
--height='120' \
--width='800' \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='milliseconds' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a='/var/lib/cacti/rra/remote_host01_ping_51.rrd':'ping':AVERAGE \
DEF:b='/var/lib/cacti/rra/remote_host02_ping_42.rrd':'ping':AVERAGE \
DEF:c='/var/lib/cacti/rra/remote_host03_ping_34.rrd':'ping':AVERAGE \
DEF:d='/var/lib/cacti/rra/remote_host04_ping_85.rrd':'ping':AVERAGE \
LINE1:a#FFF200FF:'remote_host01'  \
LINE1:b#A150AAFF:'remote_host02'  \
LINE1:c#FF4105FF:'remote_host03'  \
LINE1:d#12B3B5FF:'remote_host04\n'  \
AREA:d#00FF00FF:'Average Ping'  \
GPRINT:d:LAST:'  Current\:%8.2lf %s'  \
GPRINT:d:AVERAGE:'Average\:%8.2lf %s'  \
GPRINT:d:MAX:'Maximum\:%8.2lf %s\n' 
The item inputs have there respective lines as well as the Average and 3 values checked.
Attachments
Settings
Settings
Screenshot_2015-05-01_09-37-37.png (265.5 KiB) Viewed 590 times
Screenshot of all graphs
Screenshot of all graphs
Screenshot_2015-05-01_09-34-57.png (65.4 KiB) Viewed 590 times
Graph Output
Graph Output
graph_image (1).png (26.72 KiB) Viewed 590 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Graphing Average Ping of 4 Hosts

Post by BSOD2600 »

Most likely will need to use a CDEF to combine/average all of the data sources to meet your needs.
scotepi
Posts: 6
Joined: Wed Oct 01, 2014 8:40 am

Re: Graphing Average Ping of 4 Hosts

Post by scotepi »

I tried all functions and there is no average function. I can't figure out how to add more CDEF functions.

edit: found it, it was in an obscure place, it should be under templates but thats another issue. I created a function, SIMILAR_DATA_SOURCES_NODUPS, COUNT_SIMILAR_DS_NODUPS, / and it is still showing the last value.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests