Graphing SNMP String with Weathermap

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

DanielU
Posts: 18
Joined: Tue Jan 24, 2017 7:19 am
Location: Bydgoszcz, Poland

Re: Graphing SNMP String with Weathermap

Post by DanielU »

Thanks for so fast answer.
I fixed it as you suggested.
Now is working well.
msantana
Posts: 27
Joined: Mon May 18, 2009 8:33 am

Re: Graphing SNMP String with Weathermap

Post by msantana »

Howie wrote:OK, well those definitely work for me :-) I haven't tried with 0.98 on our own prod yet though :oops:

Hello Howie, is the snmp2c function supported in weathermap 0.97b? If so, is the OID variable limited to an amount of characters?

The reason I ask about the amount of characters in the OID, is because (in this case) the OID value is a very large one. To be specific is: .1.2.826.0.1.1578918.6.2307.1.36.1.7.100.101.102.97.117.108.116.1.1.4.1

Regards,
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graphing SNMP String with Weathermap

Post by Howie »

No it isn't (in 0.97b).

There's no limit on the size of a target (although there is a limit of 4096 characters on the length of a line in the config file - this can be increased simply).

You can see what data sources are supported by looking in weathermap/lib/datasources (on any version before 1.x) and you'll see the plugins. SNMPv1, v2c and v3 are 3 separate plugins.
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graphing SNMP String with Weathermap

Post by Howie »

(I haven't tried it, but you *might* find that you can just take the snmp2c file from 0.98 and use it in 0.97. Might.)
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!)
msantana
Posts: 27
Joined: Mon May 18, 2009 8:33 am

Re: Graphing SNMP String with Weathermap

Post by msantana »

Howie wrote:(I haven't tried it, but you *might* find that you can just take the snmp2c file from 0.98 and use it in 0.97. Might.)
I'll give it a try. Thank you!
msantana
Posts: 27
Joined: Mon May 18, 2009 8:33 am

Re: Graphing SNMP String with Weathermap

Post by msantana »

msantana wrote:
Howie wrote:(I haven't tried it, but you *might* find that you can just take the snmp2c file from 0.98 and use it in 0.97. Might.)
I'll give it a try. Thank you!
I just downloaded the 0.98 version and couldn't find a snmp2c file. I compared the snmp file (that came with the zip file) with the 0.97b version and it's identical.

If there's a post or thread with that snmp2c file, I'd appreciate your guidance.

Regards,
DanielU
Posts: 18
Joined: Tue Jan 24, 2017 7:19 am
Location: Bydgoszcz, Poland

Re: Graphing SNMP String with Weathermap

Post by DanielU »

I have new problem on other weathermap.

I am trying to visualize F5 (BIG IP) HA status and current configsys state.

Snmpwalk:

Code: Select all

 snmpwalk -v1 -c coodais_RO 10.10.10.10 .1.3.6.1.4.1.3375.2.1.14.3.1
SNMPv2-SMI::enterprises.3375.2.1.14.3.1.0 = INTEGER: 4
Config:

Code: Select all

SCALE F5SYN	0    0.5	110	255	2
SCALE F5SYN	0.6  1.5	255	255	3
SCALE F5SYN	1.6  2.5	255	255	4
SCALE F5SYN	2.6  3.5	255	0	5
SCALE F5SYN	3.6  4.5	110	255	6

NODE node_F5_HA_Status
	LABEL HA
	TARGET snmp:coodais_RO:10.10.10.10:.1.3.6.1.4.1.3375.2.1.14.3.1:-
	LABELOUTLINECOLOR none
	USESCALE F5SYN in 
	POSITION 470 379
The labels colours aren't correct. They all are green like in the first line of scale despite they should have different values.
When I commented first line of scale labels became gray.
When I tried show the value on label, the value was [UNKNOWN]

Code: Select all

LABEL  {node:this:snmp_in_raw}HA
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graphing SNMP String with Weathermap

Post by Howie »

Three things:
1) Best to start a new thread for a new problem
2) Look closely at your snmpwalk output and the OID in your TARGET. The target OID doesn't have the .0 on the end. The best way to test is to use snmpget instead of snmpwalk. snmpwalk shows you results 'below' the requested OID also.
3) I think your scale might be wrong - did you intend to have blue values of 2,3,4,5,6? (basically identical). I suspect you are missing a column of numbers from the colours, and you wanted to use scaletag of 2,3,4,5,6?

Also, looking in the logs would probably have told you the OID was wrong.
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!)
DanielU
Posts: 18
Joined: Tue Jan 24, 2017 7:19 am
Location: Bydgoszcz, Poland

Re: Graphing SNMP String with Weathermap

Post by DanielU »

Howie wrote:Three things:
1) Best to start a new thread for a new problem
2) Look closely at your snmpwalk output and the OID in your TARGET. The target OID doesn't have the .0 on the end. The best way to test is to use snmpget instead of snmpwalk. snmpwalk shows you results 'below' the requested OID also.
3) I think your scale might be wrong - did you intend to have blue values of 2,3,4,5,6? (basically identical). I suspect you are missing a column of numbers from the colours, and you wanted to use scaletag of 2,3,4,5,6?

Also, looking in the logs would probably have told you the OID was wrong.
1) I thought the topic is the same, but you rule this world.
2) You were right. .0 solved the problem. You are irreplaceable.
3) My scale is little strange because I used one scale for two different data source which have values from 0 to 5 and I have in this scale 2 yellows and 2 greens. For test and diagnostic reasons I wanted to diversify the same colors. When they are presented in Weathermap I can check the color via clipboard in graphical program. Finally I'll set 0 at this place.

Thank you very much for your invaluable help.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graphing SNMP String with Weathermap

Post by Howie »

You said "I have new problem on other weathermap." :-)

Glad it's working!
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!)
peep
Posts: 3
Joined: Fri Nov 06, 2020 7:13 am

Re: Graphing SNMP String with Weathermap

Post by peep »

I have:
Plugin Management (Cacti Version: 0.8.8h, Plugin Architecture Version: 3.1)
Weathermap 0.98a

I tried to add: https://github.com/howardjones/network- ... SNMP2c.php
to /usr/share/cacti/site/plugins/weathermap/lib/datasources/

weathermap is broken by this and I get the message:
PHP Fatal error: Class 'Weathermap\\Plugins\\Datasources\\Base' not found in /usr/share/cacti/site/plugins/weathermap/lib/datasources/SNMP2c.php on line 26, referer: https://[xxx]/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php

Am I doing something wrong or is there another version of snmp2c for 0.98a? Or any idea how to fix this?

snmpget works:
snmpget -v2c -c [community] [node] .1.3.6.1.4.1.2011.5.25.187.1.132.0
iso.3.6.1.4.1.2011.5.25.187.1.132.0 = INTEGER: -18

I get an alarm:
target: snmp2c:[community]:[node]:-:.1.3.6.1.4.1.2011.5.25.187.1.132.0 on config line 2996 of /usr/share/cacti/site/plugins/weathermap/configs/ptp.conf was not recognised as a valid TARGET [WMWARN08]

and with target snmp I get no valid data since snmp v1 is not supported by my equipment.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graphing SNMP String with Weathermap

Post by Howie »

Yes, Weathermap has been nearly totally rewritten since 0.98a - the plugin structure has changed.

There isn't an snmp2c plugin for 0.98a. That said, it wouldn't be too hard to write one. I'll check into it over the weekend.
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!)
peep
Posts: 3
Joined: Fri Nov 06, 2020 7:13 am

Re: Graphing SNMP String with Weathermap

Post by peep »

Super! Thanks a lot!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graphing SNMP String with Weathermap

Post by Howie »

Give this a try: https://github.com/howardjones/network- ... snmp2c.php

Thats's a Frankenstein's Monster combination of the 0.98a SNMPv1 plugin and my dev SNMPv2c plugin. You use it exactly the same as the SNMPv1 target, except that instead of snmp: you use snmp2c:

The dev version also has SNMPv3, but that works differently (too many config items) so I'll have a go at that some other time as it'll need some docs.
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!)
peep
Posts: 3
Joined: Fri Nov 06, 2020 7:13 am

Re: Graphing SNMP String with Weathermap

Post by peep »

works, thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest