A little help with Weathermap TARGET SCALE option - SOLVED

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
braniak
Posts: 6
Joined: Wed Dec 02, 2020 1:03 am

A little help with Weathermap TARGET SCALE option - SOLVED

Post by braniak »

Hey everyone, I'm having some trouble making a node to show the correct CPU load of a Cisco ASR1000.

Specs:
- Redhat Linux 8.5
- Cacti 1.2.19
- Weathermap 0.98a

My issue: the snmp data retrieved from the equipment is shown as an integer value instead of a fraction.
ie: the real load is 0.19 and the snmp data received is 19.

The OID I'm using is: 1.3.6.1.4.1.9.9.109.1.1.1.1.25.7

With that in mind, I'm trying to divide this value by 100 (multiply for 0.01) to show the correct load in the weathermap node. In order to complete this, I found the "target scale" option but I'm not been able to make it work.

This is where I found it:
https://network-weathermap.com/manual/0 ... s.html#rrd
https://network-weathermap.com/manual/0 ... ODE_TARGET

This is my original node:

Code: Select all

NODE CPURT139A
	LABEL CPU: {node:this:bandwidth_in:%.2f}%
	LABELFONT 1
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=2054
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=100&graph_width=350&local_graph_id=2054
	TARGET gauge:/var/www/html/cacti/rra/341/2181.rrd:5min_cpu_asr1000:-
	POSITION MZ-IT-PF-C0-RT-139A 60 0

I tried a couple of combinations, with no lucky.

TARGET scale:1*0.01:/var/www/html/cacti/rra/341/2181.rrd:5min_cpu_asr1000:-
TARGET scale:/var/www/html/cacti/rra/341/2181.rrd:1*0.01:5min_cpu_asr1000:-
TARGET scale:/var/www/html/cacti/rra/341/2181.rrd:1*0.01:5min_cpu_asr1000:
TARGET scale:/var/www/html/cacti/rra/341/2181.rrd:5min_cpu_asr1000:1*0.01:


Does anyone knows how to properly use it?

Thanks in advance.
Last edited by braniak on Thu Dec 29, 2022 4:26 pm, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: A little help with Weathermap TARGET SCALE option.

Post by Howie »

TARGET 0.01*/var/www/html/cacti/rra/341/2181.rrd:5min_cpu_asr1000:-
TARGET scale:0.01:/var/www/html/cacti/rra/341/2181.rrd:5min_cpu_asr1000:-

should both do it (no spaces apart from after TARGET)

First version should work for things other than RRD files. Second one is specific to them.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
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!)
braniak
Posts: 6
Joined: Wed Dec 02, 2020 1:03 am

Re: A little help with Weathermap TARGET SCALE option.

Post by braniak »

Awesome. It works!

Thanks a lot Howie, for all your work on this.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests