I've been playing around with weathermaps, and I've come across something of which I cannot figure out the correct syntax.
I'm trying to determine the percentage of disk space or memory used for a node.
What I'd like to do is either scale the target by a calculation including a variable like 100/hdd_total or set the MAXVALUE to the hdd_total as a var rather than hard coding it.
Any help is appreciated. Thank you.
Code: Select all
#NODE TEMPLATES
NODE DISK
TARGET dsstats:last:{node:this:ds_id}:hdd_used:-
INFOURL /cacti/graph.php?rra_id=all&local_graph_id={node:this:graph_id}
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id={node:this:graph_id}
LABELOUTLINECOLOR none
LABELBGCOLOR none
ICON images/disk.png
USEICONSCALE DEFAULT in
#NODES
NODE machine_disk_d_total
# TEMPLATE DISK_TOTAL
SET ds_id 106
TARGET dsstats:last:{node:this:ds_id}:hdd_total:-
# POSITION 700 100
# LABEL {node:this:bandwidth_in}
NODE machine_disk_d
TEMPLATE DISK
# LABEL d
POSITION 585 200
SET ds_id 106
SET graph_id 107
LABEL {node:machine_disk_d_total:bandwidth_in}
MAXVALUE {node:machine_disk_d_total:bandwidth_in}
# MAXVALUE 279172874240