Hello ! )
I have cacti working and collecting lot of datas with some standards graphs (cpu temp / load / network use). Now I would like to reuse the existents datasources and produce a graph showing the ratio between them.
A simple example: I would like to graph is the actual bytes / second of an interface vs the number of unicast packets / second.
I firstly created a divide function ( a,b,/ ). Then I created a graph, added the two datasources as Line1 & Line2 then a dummy source that just call the divide function.
The trouble I am facing now is that I am not able to hide the graphing of the two data sources to only keep my special divide function. I tried the comments / gprint / legend statements but then they aren't def= by cacti .
Any idea / howto welcome )
Then it could also be used to graphs cpu usage / cpu temp or load / process and hopefully produce some cool graphs )
graph the ratio of two data sources
Moderators: Developers, Moderators
And here is a rrdtool call that does that:
/usr/bin/rrdtool graph - \
--imgformat=PNG --start=-86400 --end=-300 \
--title="Localhost - Traffic vs Packets" \
--base=1000 --height=120 --width=500 \
--alt-autoscale-max --lower-limit=0 --vertical-label="" \
DEF:b="/usr/share/cacti/rra/localhost_unicast_in_75.rrd":unicast_in:AVERAGE \
DEF:a="/usr/share/cacti/rra/localhost_traffic_in_24.rrd":traffic_in:AVERAGE \
CDEF:cdefc=a,b,/ \
AREA:cdefc#FF3932:""
Attached is the output of the script.
/usr/bin/rrdtool graph - \
--imgformat=PNG --start=-86400 --end=-300 \
--title="Localhost - Traffic vs Packets" \
--base=1000 --height=120 --width=500 \
--alt-autoscale-max --lower-limit=0 --vertical-label="" \
DEF:b="/usr/share/cacti/rra/localhost_unicast_in_75.rrd":unicast_in:AVERAGE \
DEF:a="/usr/share/cacti/rra/localhost_traffic_in_24.rrd":traffic_in:AVERAGE \
CDEF:cdefc=a,b,/ \
AREA:cdefc#FF3932:""
Attached is the output of the script.
- Attachments
-
- TraVsPack.png (4.22 KiB) Viewed 2623 times
Who is online
Users browsing this forum: No registered users and 1 guest