Graphing SNMP String with Weathermap
Moderators: Developers, Moderators
Graphing SNMP String with Weathermap
Hello,
I'm trying to display a snmp string on weathermap but cant figure it out exactly, what should the LABEL be.
NODE MODULE_TYPE
LABEL {node:this:snmp_out_raw}
LABELFONT 113
LABELOUTLINECOLOR none
LABELBGCOLOR none
TARGET snmp:{map:community}:172.25.232.33:1.3.6.1.2.1.47.1.1.1.1.2.1044
USESCALE CHANGE
POSITION 200 200
snmpwalk -v2c -c test 172.25.232.1 1.3.6.1.2.1.47.1.1.1.1.2.1044
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1044 = STRING: "1000BaseBX10D Gi1/3"
I want go graph the "1000BaseBX10D" part.
Log from weathermap :
ProcessTargets: NODE MODULE_TYPE, target: snmp:{map:community}:172.25.232.33:1.3.6.1.2.1.47.1.1.1.1.2.1044 on config line 902 of /var/www/html/cacti/plugins/weathermap/configs/test was not recognised as a valid TARGET [WMWARN08]
I'm trying to display a snmp string on weathermap but cant figure it out exactly, what should the LABEL be.
NODE MODULE_TYPE
LABEL {node:this:snmp_out_raw}
LABELFONT 113
LABELOUTLINECOLOR none
LABELBGCOLOR none
TARGET snmp:{map:community}:172.25.232.33:1.3.6.1.2.1.47.1.1.1.1.2.1044
USESCALE CHANGE
POSITION 200 200
snmpwalk -v2c -c test 172.25.232.1 1.3.6.1.2.1.47.1.1.1.1.2.1044
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1044 = STRING: "1000BaseBX10D Gi1/3"
I want go graph the "1000BaseBX10D" part.
Log from weathermap :
ProcessTargets: NODE MODULE_TYPE, target: snmp:{map:community}:172.25.232.33:1.3.6.1.2.1.47.1.1.1.1.2.1044 on config line 902 of /var/www/html/cacti/plugins/weathermap/configs/test was not recognised as a valid TARGET [WMWARN08]
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
You need to specify an OID for the in and out values, even if you aren't using them. Since you are using 'out' in the label, your TARGET should be:
To say that you don't care about the in value (the extra '-' in the middle).
Also, Weathermap currently only supports SNMPv1 - 2c & 3 should be in the next version. It's written but not yet tested. It should work with 0.98 if you feel brave: https://github.com/howardjones/network- ... nmpv2c.php. You would need to change the target to snmp2c: instead of snmp:
Code: Select all
TARGET snmp:{map:community}:172.25.232.33:-:1.3.6.1.2.1.47.1.1.1.1.2.1044
Also, Weathermap currently only supports SNMPv1 - 2c & 3 should be in the next version. It's written but not yet tested. It should work with 0.98 if you feel brave: https://github.com/howardjones/network- ... nmpv2c.php. You would need to change the target to snmp2c: instead of snmp:
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!)
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!)
Re: Graphing SNMP String with Weathermap
Great, thank you Howie.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
Just a quick follow-up. I just tested with 0.98 version and the SNMP2c plugin from github, and that works as expected:
Code: Select all
WIDTH 400
HEIGHT 400
NODE n1
POSITION 200 200
TARGET snmp2c:public:127.0.0.1:.1.3.6.1.2.1.1.7.0:.1.3.6.1.2.1.1.6.0
LABEL {node:this:snmp_out_raw}
- Attachments
-
- weathermap.png (2.11 KiB) Viewed 8691 times
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!)
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!)
Re: Graphing SNMP String with Weathermap
Hi,
Not quite related to weathermap or maybe....
I'm trying to graph some values from my layer3 switch :
Optical Optical
Temperature Voltage Current Tx Power Rx Power
Port (Celsius) (Volts) (mA) (dBm) (dBm)
---------- ----------- ------- -------- -------- --------
Gi1/1 25.0 3.34 5.9 -6.4 -12.2
snmpwalk returns those values, but its missing a dot :
[root@msq ~]# snmpwalk -v2c -c test 172.25.232.33 1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1022 = INTEGER: 33
[root@msq ~]# snmpwalk -v2c -c test 172.25.232.33 1.3.6.1.4.1.9.9.91.1.1.1.1.4.1023
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1023 = INTEGER: 59
[root@msq ~]# snmpwalk -v2c -c test 172.25.232.33 1.3.6.1.4.1.9.9.91.1.1.1.1.4.1024
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1024 = INTEGER: -65
How can I insert a "." between my values ?
Not quite related to weathermap or maybe....
I'm trying to graph some values from my layer3 switch :
Optical Optical
Temperature Voltage Current Tx Power Rx Power
Port (Celsius) (Volts) (mA) (dBm) (dBm)
---------- ----------- ------- -------- -------- --------
Gi1/1 25.0 3.34 5.9 -6.4 -12.2
snmpwalk returns those values, but its missing a dot :
[root@msq ~]# snmpwalk -v2c -c test 172.25.232.33 1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1022 = INTEGER: 33
[root@msq ~]# snmpwalk -v2c -c test 172.25.232.33 1.3.6.1.4.1.9.9.91.1.1.1.1.4.1023
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1023 = INTEGER: 59
[root@msq ~]# snmpwalk -v2c -c test 172.25.232.33 1.3.6.1.4.1.9.9.91.1.1.1.1.4.1024
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1024 = INTEGER: -65
How can I insert a "." between my values ?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
Code: Select all
TARGET 0.1*snmp2c:test:172.25.232.33:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022:-
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!)
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!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
If it's for a Cacti graph, you use CDEFs to do this.Howie wrote:Code: Select all
TARGET 0.1*snmp2c:test:172.25.232.33:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022:-
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!)
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!)
Re: Graphing SNMP String with Weathermap
Tried snmp2c but no joy so far, am I missing something ?
11/01/2016 01:05:02 PM - WEATHERMAP: Poller[0] WARNING: [Map 1] testing: ReadData: NODE node3, target: snmp2c:test:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022 on config line 79 of /var/www/html/v3/plugins/weathermap/configs/testing had no valid data, according to WeatherMapDataSource_snmpv2c
NODE node3
LABEL Node 3
LABEL {node:this:outpercent:%d}
POSITION 502 500
ICON 93 24 box
TARGET 0.1*snmp2c:test:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022
11/01/2016 01:05:02 PM - WEATHERMAP: Poller[0] WARNING: [Map 1] testing: ReadData: NODE node4, target: snmp2c:test:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022 on config line 90 of /var/www/html/v3/plugins/weathermap/configs/testing had no valid data, according to WeatherMapDataSource_snmpv2c
11/01/2016 01:05:02 PM - WEATHERMAP: Poller[0] WARNING: [Map 1] testing: ReadData: NODE node3, target: snmp2c:test:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022 on config line 79 of /var/www/html/v3/plugins/weathermap/configs/testing had no valid data, according to WeatherMapDataSource_snmpv2c
NODE node3
LABEL Node 3
LABEL {node:this:outpercent:%d}
POSITION 502 500
ICON 93 24 box
TARGET 0.1*snmp2c:test:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022
11/01/2016 01:05:02 PM - WEATHERMAP: Poller[0] WARNING: [Map 1] testing: ReadData: NODE node4, target: snmp2c:test:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022 on config line 90 of /var/www/html/v3/plugins/weathermap/configs/testing had no valid data, according to WeatherMapDataSource_snmpv2c
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
No, that looks right. If the format is wrong, you get the "not recognised as a valid TARGET" message. This is the snmp2c plugin saying that it couldn't fetch data, so that means it was loaded, and did recognise the target as a valid formatted one.
Things I'd try:
1) Try without the 0.1* just in case (this shouldn't make any difference, but lets solve one thing at a time )
2) Try with a . on the front of the OID - technically it's not formatted correctly without one, but most things don't care.
3) Try with debug logging? You'll get more information about what's going on inside the snmp plugin (grep for 'ReadData' lines)
Things I'd try:
1) Try without the 0.1* just in case (this shouldn't make any difference, but lets solve one thing at a time )
2) Try with a . on the front of the OID - technically it's not formatted correctly without one, but most things don't care.
3) Try with debug logging? You'll get more information about what's going on inside the snmp plugin (grep for 'ReadData' lines)
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!)
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!)
Re: Graphing SNMP String with Weathermap
Tried first all points on your list .
Weird is, on another machine with version 0.97 and snmp v1 its working(with 0.1*snmp:test:172.25.232.33).
ReadData for NODE node4:
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:922] [Map 1] testing: ReadData: New Target: 0.1*snmp2c:cscAstral:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 1] testing: Trace: ProcessString(snmp2c:cscAstral:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022, node:node4)
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:939] [Map 1] testing: Will multiply result by 0.1
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:45] [Map 1] testing: Timeout changed to 0 microseconds.
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:46] [Map 1] testing: Will abort after 0 failures for a given host.
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:47] [Map 1] testing: Number of retries changed to 0.
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:93] [Map 1] testing: SNMP2c ReadData: Got and
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:102] [Map 1] testing: SNMP2c ReadData: Returning (NULL,NULL,1478001302)
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] WARNING: [Map 1] testing: ReadData: NODE node4, target: snmp2c:cscAstral:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022 on config line 90 of /var/www/html/v3/plugins/weathermap/configs/testing had no valid data, according to WeatherMapDataSource_snmpv2c
I tried even with snmp v1 , same result. Same conf(snmpv1) on 0.97 is working properly and displaying what I want.
Weird is, on another machine with version 0.97 and snmp v1 its working(with 0.1*snmp:test:172.25.232.33).
ReadData for NODE node4:
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:922] [Map 1] testing: ReadData: New Target: 0.1*snmp2c:cscAstral:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 1] testing: Trace: ProcessString(snmp2c:cscAstral:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022, node:node4)
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:939] [Map 1] testing: Will multiply result by 0.1
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:45] [Map 1] testing: Timeout changed to 0 microseconds.
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:46] [Map 1] testing: Will abort after 0 failures for a given host.
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:47] [Map 1] testing: Number of retries changed to 0.
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:93] [Map 1] testing: SNMP2c ReadData: Got and
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_snmpv2c.php:102] [Map 1] testing: SNMP2c ReadData: Returning (NULL,NULL,1478001302)
11/01/2016 01:55:02 PM - WEATHERMAP: Poller[0] WARNING: [Map 1] testing: ReadData: NODE node4, target: snmp2c:cscAstral:172.25.232.33:-:1.3.6.1.4.1.9.9.91.1.1.1.1.4.1022 on config line 90 of /var/www/html/v3/plugins/weathermap/configs/testing had no valid data, according to WeatherMapDataSource_snmpv2c
I tried even with snmp v1 , same result. Same conf(snmpv1) on 0.97 is working properly and displaying what I want.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
That's interesting! I'll see if I can add some more logging.
What's the device? Anything unusual?
What's the device? Anything unusual?
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!)
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!)
Re: Graphing SNMP String with Weathermap
No, its a Cisco 6500 Multilayer Switch.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
OK, well those definitely work for me I haven't tried with 0.98 on our own prod yet though
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!)
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!)
Re: Graphing SNMP String with Weathermap
I decided to write in this thread.
I have 5 ups in 2 DC and I want to build weathermap with all 5 ups showing important parameters.
I started from one of them:
and so on.
It doesn't looks good, but it works well. Later I'll present the data in a table.
I wanted to show ups status too.
UPS website interface presents dynamic visualisation of status. Look at the attachment. UPS status represents oid with integer value
Possible values: Syntax: Integer { standby (1), none (2), normal (3), bypass (4), battery (5)....
This is part of config file
I made 5 pngs: ups_status_1.png, ups_status_2.png, ups_status_3.png, ups_status_4.png and ups_status_.png.
It doesn't work. Weathermap displays ups_status_.png not ups_status_3.png which refers to actual value.
What is wrong, where is the bug?
I have 5 ups in 2 DC and I want to build weathermap with all 5 ups showing important parameters.
I started from one of them:
Code: Select all
NODE node_ups1_zop_co1
LABEL I1(out):{node:this:snmp_in_raw}A
NOTES Prad wyjsciowy 1
LABELOUTLINECOLOR none
LABELBGCOLOR none
TARGET snmp:public:10.32.69.2:.1.3.6.1.4.1.4555.1.1.5.1.4.6.1.3.0.0:-
USESCALE none in percent
POSITION 550 380
NODE node_ups1_zop_co2
LABEL I2(out):{node:this:snmp_in_raw}A
NOTES Prad wyjsciowy 2
LABELOUTLINECOLOR none
LABELBGCOLOR none
TARGET snmp:public:10.32.69.2:.1.3.6.1.4.1.4555.1.1.5.1.4.6.1.3.0.1:-
USESCALE none in percent
POSITION node_ups1_zop_co1 0 25
NODE node_ups1_zop_co3
LABEL I3(out):{node:this:snmp_in_raw}A
NOTES Prad wyjsciowy 3
LABELOUTLINECOLOR none
LABELBGCOLOR none
TARGET snmp:public:10.32.69.2:.1.3.6.1.4.1.4555.1.1.5.1.4.6.1.3.0.2:-
USESCALE none in percent
POSITION node_ups1_zop_co1 0 50
NODE node_ups1_zop_vi1
LABEL U1(in):{node:this:snmp_in_raw}V
NOTES Napiecie wejsciowe 1
LABELOUTLINECOLOR none
LABELBGCOLOR none
TARGET snmp:public:10.32.69.2:.1.3.6.1.4.1.4555.1.1.5.1.3.3.1.2.0.0:-
USESCALE none in percent
POSITION node_ups1_zop_co1 0 75
It doesn't looks good, but it works well. Later I'll present the data in a table.
I wanted to show ups status too.
UPS website interface presents dynamic visualisation of status. Look at the attachment. UPS status represents oid with integer value
Code: Select all
p032000netmon:~# snmpwalk -v1 -c public 10.32.69.2 .1.3.6.1.4.1.4555.1.1.5.1.4.1.0
SNMPv2-SMI::enterprises.4555.1.1.5.1.4.1.0 = INTEGER: 3
This is part of config file
Code: Select all
SCALE UPSSTATUS 0 0.4 192 192 192
SCALE UPSSTATUS 0.5 1.5 132 140 142
SCALE UPSSTATUS 1.6 2.5 163 1 82
SCALE UPSSTATUS 2.6 3.5 2 210 74
SCALE UPSSTATUS 3.6 4.5 209 183 77
NODE node_ups1_status
LABELBGCOLOR 250 235 215
ICON images/ups_status_{node:this:inscaletag}.png
TARGET snmp:public:10.32.69.2:.1.3.6.1.4.1.4555.1.1.5.1.4.1.0:-
USESCALE none in percent
POSITION node_ups1_zop_co1 0 300
It doesn't work. Weathermap displays ups_status_.png not ups_status_3.png which refers to actual value.
What is wrong, where is the bug?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Graphing SNMP String with Weathermap
inscaletag refers to the text after the colour, on the scale lines. You don't have that, so it's an empty string.
would be one way to fix that. You may as well use the word 'none' at that point, to make it easier to understand what is going on though, or even the name of the png file in its entirety.
Code: Select all
SCALE UPSSTATUS 1.6 2.5 163 1 82 2
Code: Select all
SCALE UPSSTATUS 1.6 2.5 163 1 82 ups_status_none.png
NODE xx
ICON images/{node:this:inscaletag}
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!)
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!)
Who is online
Users browsing this forum: No registered users and 3 guests