Weathermap dynamic label (SNMP OID value)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
xikkofranco
Posts: 4
Joined: Mon Jul 24, 2017 2:30 pm

Weathermap dynamic label (SNMP OID value)

Post by xikkofranco »

Hello guys, I'm trying to change a node label according to an OID value, it is the number of users connected on an Access Point controlled by a Cisco WLC 5508. I made some graphs using the OID, but I can't change a weathermap label with this value. Here are the code:

Code: Select all

NODE node06610
	TARGET snmp:Va1e_N3TRO:172.19.167.126:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0
	LABEL BRCKSFMESHAP051 Users: {node:this:snmp_in_raw} {node:this:snmp_out_raw}
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=9610
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=9610
	ICON images/AccessPoint.png
	USESCALE none in
	POSITION 700 100
The SNMP community and IP are the same of snmpwalk command and it works normally. Is there something wrong here?
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weathermap dynamic label (SNMP OID value)

Post by Pucho »

xikkofranco wrote:Hello guys, I'm trying to change a node label according to an OID value, it is the number of users connected on an Access Point controlled by a Cisco WLC 5508. I made some graphs using the OID, but I can't change a weathermap label with this value. Here are the code:

Code: Select all

NODE node06610
	TARGET snmp:Va1e_N3TRO:172.19.167.126:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0
	LABEL BRCKSFMESHAP051 Users: {node:this:snmp_in_raw} {node:this:snmp_out_raw}
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=9610
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=9610
	ICON images/AccessPoint.png
	USESCALE none in
	POSITION 700 100
The SNMP community and IP are the same of snmpwalk command and it works normally. Is there something wrong here?

I think you're missing the :- at the end of your TARGET

Code: Select all

TARGET snmp:Va1e_N3TRO:172.19.167.126:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:-
Have you turned DEBUG mode on and looked for clues? You can normally see when weathermap runs the snmpget and tells you what the returned value was and if it was OK or not.

The LABEL statement looks ok, remove {node:this:snmp_out_raw} because that belongs to what comes after the : and it's replaced by the - which means ignore it. Unless you are looking for 2 values like you normally do when polling interface traffic (IN and OUT).

Cheers
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
xikkofranco
Posts: 4
Joined: Mon Jul 24, 2017 2:30 pm

Re: Weathermap dynamic label (SNMP OID value)

Post by xikkofranco »

Thanks!
How can I see the debug log of a WeatherMap? I tried what you said but it doesn't work.
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weathermap dynamic label (SNMP OID value)

Post by Pucho »

Hey, assuming you're using weathermap as cacti plugin, go to Settings, change logging to DEBUG, let the poller run and all the debug will go to cacti.log

Then search through it looking for that part, can't remember right now the key word, Howie will know better. But you'll see the part where it's doing the snmpget and returning the value.
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
xikkofranco
Posts: 4
Joined: Mon Jul 24, 2017 2:30 pm

Re: Weathermap dynamic label (SNMP OID value)

Post by xikkofranco »

Seeing the cacti log on DEBUG mode, it shows message of invalid snmp data, for its targets. I tried many ways but nothing works. :( I think weathermap doesn't supports my desired OID.
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weathermap dynamic label (SNMP OID value)

Post by Pucho »

I'm sorry, didn't see it before but you've got an extra dot there that you need to remove. Please always refer to the documentation

Code: Select all

TARGET snmp:community:host:in_oid:out_oid
Your code states
TARGET snmp:Va1e_N3TRO:172.19.167.126:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:-
Needs to be

Code: Select all

TARGET snmp:Va1e_N3TRO:172.19.167.126:1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:.1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:-
Last edited by Pucho on Thu Aug 03, 2017 3:35 pm, edited 1 time in total.
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
felippedeabreu
Posts: 4
Joined: Wed Aug 02, 2017 7:11 am

Re: Weathermap dynamic label (SNMP OID value)

Post by felippedeabreu »

not worked for me =(
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap dynamic label (SNMP OID value)

Post by Howie »

You don't need the :- on the end. You already have two OIDs there (there's a : in the middle, even though both OID are the same). It would be more efficient to just have:

Code: Select all

 TARGET snmp:Va1e_N3TRO:172.19.167.126:1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0:-
(one OID and the '-') and use only {node:this:snmp_in_raw} in your label. Otherwise weathermap will just ask for the same value twice, and print it twice in your label.

Back to the snmp error though: What happens if you try

Code: Select all

snmpget -v1 -cVa1e_N3TRO 72.19.167.126 .1.3.6.1.4.1.14179.2.2.13.1.4.28.230.199.158.236.208.0
from the command line? Do you get data? This is basically what weathermap will be doing. Most importantly, in 0.98, it is using SNMPv1 only. SNMPv2c and v3 support are in the next (1.0.0) version.
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!)
xikkofranco
Posts: 4
Joined: Mon Jul 24, 2017 2:30 pm

Re: Weathermap dynamic label (SNMP OID value)

Post by xikkofranco »

Thank you Howie, you solved my problem. The SNMP version 1 was disabled on my controller, and it was the reason why snmp target wasn't working. I enabled it and everything is fine.
hsyah
Posts: 4
Joined: Sat Sep 26, 2020 8:59 am

Re: Weathermap dynamic label (SNMP OID value)

Post by hsyah »

LABEL Gbic RX DB: {node:this:snmp_in_raw} dbm
TARGET snmp:cacti:10.1.1.1:.1.3.6.1.4.1.2636.3.60.1.1.1.1.5:-

Output
LABEL Gbic RX DB: - 624 dbm


How can I complete the following output
Output
LABEL Gbic RX DB: - 6.24 dbm
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap dynamic label (SNMP OID value)

Post by Howie »

TARGET 0.01*snmp:cacti:10.1.1.1:.1.3.6.1.4.1.2636.3.60.1.1.1.1.5:-

but you might need to use bandwidth_in instead of snmp_in_raw
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!)
hsyah
Posts: 4
Joined: Sat Sep 26, 2020 8:59 am

Re: Weathermap dynamic label (SNMP OID value)

Post by hsyah »

Thank you very much for your help

That i s ok

ABEL Gbic RX DB: {node:this:bandwidth_in} dbm
TARGET 0.01*snmp:cacti:10.1.1.1:.1.3.6.1.4.1.2636.3.60.1.1.1.1.5:-

output
LABEL Gbic RX DB: - 6.24 dbm
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests