Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 28, 2017 7:19 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Print the "Gauge" value to map
PostPosted: Tue Jun 13, 2017 5:24 pm 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 4
Hi all,

We have a number of Cisco devices that I would like to monitor temperatures of on a map and display for our NOC team.

Currently, I am using nodes and the TARGET line like below to show the different chassis modules and device temperatures underneath each place holder node
Code:
NODE MAI-CORE-ROU2
        LABEL MAI-CORE-ROU2
        ICON images/Router.png
        POSITION 400 400

NODE MOD2-Earl-Out-MAI-CORE-ROU2
        LABEL MOD2-Earl-Out
        TARGET gauge:/var/www/cacti/rra/mai-core-rou2_cisc_mai_mod2_earou_1990.rrd:cisc_mai_mod2_earou:cisc_mai_mod2_earou
        POSITION 397 500


The only issue is, although the second node with the TARGET does indeed change its colour dependant on the scale, I cannot come up with a way for the map to print the actual data value along with this. Even if it involves making another node and pulling it from the RRD again, that's fine. But after running through the weathermap documentation quite a bit, I cant see this as a feature.

Am I missing something? Or is this actually not possible? It seems silly because the map at that point clearly knows the data value, to be able to match it to the scale, I just want to print it next to the chassis module name.


Top
 Profile  
 
 Post subject: Re: Print the "Gauge" value to map
PostPosted: Wed Jun 14, 2017 4:37 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
You don't actually need two nodes to do that. You can have a label and an icon, and LABELOFFSET S, and weathermap will handle it for you. If you are very picky about the positioning of the label, you can also use pixel offsets for it.

To add the value itself, add {node:this:bandwidth_in} to the label.

If you want to add another node, and have it refer to that same value, you can do that too: LABEL {node:MAI-CORE-ROU2:bandwidth_in}

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject: Re: Print the "Gauge" value to map
PostPosted: Wed Jun 14, 2017 6:51 am 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 4
Howie wrote:
You don't actually need two nodes to do that. You can have a label and an icon, and LABELOFFSET S, and weathermap will handle it for you. If you are very picky about the positioning of the label, you can also use pixel offsets for it.

To add the value itself, add {node:this:bandwidth_in} to the label.

If you want to add another node, and have it refer to that same value, you can do that too: LABEL {node:MAI-CORE-ROU2:bandwidth_in}


Perfect! Thankyou, I will admit I did see that in the docs, but misinterpreted how to implement it. Thankyou!!


Top
 Profile  
 
 Post subject: Re: Print the "Gauge" value to map
PostPosted: Wed Jun 14, 2017 7:18 am 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 4
Howie wrote:
You don't actually need two nodes to do that. You can have a label and an icon, and LABELOFFSET S, and weathermap will handle it for you. If you are very picky about the positioning of the label, you can also use pixel offsets for it.

To add the value itself, add {node:this:bandwidth_in} to the label.

If you want to add another node, and have it refer to that same value, you can do that too: LABEL {node:MAI-CORE-ROU2:bandwidth_in}


A quick follow up question. Occasionally some of the values printed by {node:this:bandwidth_in} are not displayed as floationg point numbers, like 38.9999967*c. This breaks the format of my map somewhat as the box is wildly longer than its expected to be.

But on the next refresh the value is 39*c.. Any reason for the change in data value? And as a fix, is there any way to round the value of {node:this:bandwidth_in} to X decimal places?


Top
 Profile  
 
 Post subject: Re: Print the "Gauge" value to map
PostPosted: Wed Jun 14, 2017 7:24 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
That's a side-effect of rrdtool. You are getting the average value of the last 5 minutes. Even if the actual measurement is an integer, if it changes from 2 to 3 halfway through the 5-minute polling period, the average value that weathermap gets will be 2.5

You can format the value for bandwidth_in in a number of ways, including forcing it to an integer {node:this:bandwidth_in:%d}

This is all here in the manual: http://network-weathermap.com/manual/0. ... formatting

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject: Re: Print the "Gauge" value to map
PostPosted: Wed Jun 14, 2017 7:24 am 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 4
Ignore me... I'm a fool.

{node:this:bandwidth_in:%d}

forces data point to integer


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group