Trying to do a ifOperStatus map. "no valid data" on SNMP

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
daveynihil
Posts: 5
Joined: Tue Apr 24, 2012 5:52 am

Trying to do a ifOperStatus map. "no valid data" on SNMP

#1 Post by daveynihil » Tue Apr 24, 2012 6:07 am

Hi guys,
After seeing the "show off your weathermap" thread I've decided to implement one of those Cisco Chassis ifOperStatus maps and have spend the best part of the morning trying to get it work.

I have no need to log IF status using RRD, so have been following the thread info here http://forums.cacti.net/viewtopic.php?f=16&t=36174 to do the SNMP query from the SNMP DS plugin within weathermap.

I can't get the SNMP query to work however. All I get in the logs is

Code: Select all

04/24/2012 11:47:13 AM - WEATHERMAP: Poller[0] WARNING: [Map 16] TEST-MAP: ReadData: NODE TESTRACKSWITCH_p02, target: snmp:NOTMYSNMPKEY:192.168.1.1:.1.3.6.1.2.1.2.2.1.8.10002:- on config line 54 had no valid data, according to WeatherMapDataSource_snmp
And the node stays coloured yellow.

My SNMP key is fine, and doing an snmpwalk with 2c (and even attempting 1 temporarily) works fine.

Code: Select all

# snmpwalk -v 2c -c NOTMYSNMPKEY 192.168.1.1 1.3.6.1.2.1.2.2.1.8.10002
IF-MIB::ifOperStatus.10002 = INTEGER: up(1)
I'm well and truly stuck now, with no idea where else to look. Can anyone offer me any leads?

Config is :-

Code: Select all

# Automatically generated by php-weathermap v0.96a


WIDTH 1920
HEIGHT 900
HTMLSTYLE overlib
KEYFONT 1
TITLE TEST-MAP 
TIMEPOS 18 889 Created: %b %d %Y %H:%M:%S

KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0   192 192 192  
SCALE DEFAULT 0 1   255 255 255  
SCALE DEFAULT 1 10   140 0 255  
SCALE DEFAULT 10 25   32 32 255  
SCALE DEFAULT 25 40   0 192 255  
SCALE DEFAULT 40 55   0 240 0  
SCALE DEFAULT 55 70   240 240 0  
SCALE DEFAULT 70 85   255 192 0  
SCALE DEFAULT 85 100   255 0 0  

SCALE updown 0 0   255 255 0  
SCALE updown 2 2   255 0 0  
SCALE updown 1 1   0 255 0  
SCALE updown 3 3   192 192 192  
SCALE updown 4 4   0 0 192  
SCALE updown 6 6   0 0 192  

SET community NOTMYSNMPKEY
SET rrd_use_poller_output 1
SET key_hidezero_DEFAULT 1

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
	MAXVALUE 100

NODE port
	ZORDER 300
	LABELFONT 24
	OVERLIBWIDTH 403
	OVERLIBHEIGHT 165
	LABELFONTCOLOR contrast
	INFOURL /cacti/graph.php?action=view&rra_id=all&local_graph_id={node:this:graph_id}
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=100&graph_width=300&graph_nolegend=true&local_graph_id={node:this:graph_id}
	TARGET snmp:{map:community}:{node:this:ip}:.1.3.6.1.2.1.2.2.1.8.{node:this:interface}:-
	USESCALE updown in


# TEMPLATE-only LINKs:
LINK DEFAULT
	ARROWSTYLE compact
	BWFONT 1
	BWLABEL bits
	BANDWIDTH 1000M


# regular NODEs:
NODE TESTRACKSWITCH
	LABEL TESTRACKSWITCH
	ZORDER 200
	LABELOFFSET E
	POSITION 320 120

NODE TESTRACKSWITCH_p01
	TEMPLATE port
	LABEL 01
	POSITION TESTRACKSWITCH -94 -5
	SET interface 10001
	SET ip 192.168.1.1
	SET ifname FastEthernet0/1
	SET host_id 98
	SET graph_id 2020
	SET data_id 2495



# regular LINKs:

# That's All Folks!

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

Re: Trying to do a ifOperStatus map. "no valid data" on SNMP

#2 Post by Howie » Tue Apr 24, 2012 9:10 am

Weathermap will always use SNMPv1 - not sure if that will make a difference for you...

Also, try adding a .0 onto the end of the OID. snmpwalk is a bit more flexible than snmpget, and for some OIDs this is required. I didn't think interface status was one of them, though. To be SURE, add -On to your snmpwalk command line, to get the numeric OID that it is returning (it isn't always the same as what you asked for).
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!)

daveynihil
Posts: 5
Joined: Tue Apr 24, 2012 5:52 am

Re: Trying to do a ifOperStatus map. "no valid data" on SNMP

#3 Post by daveynihil » Wed May 02, 2012 4:56 am

Still no joy.

Code: Select all

snmpwalk -v 1 -c  notmykey 192.168.1.1 1.3.6.1.2.1.2.2.1.8.10001 -On

.1.3.6.1.2.1.2.2.1.8.10001 = INTEGER: up(1)

Tried with a leading 0

Tried removing the . from the front of the OID. Same with the end. Just can't get it to get anything it thinks is valid data.

Using SNMPGET instead of SNMPWALK works perfectly as well.

Code: Select all

snmpget -v 1 -c notmykey 192.168.1.1 .1.3.6.1.2.1.2.2.1.8.10002
IF-MIB::ifOperStatus.10002 = INTEGER: up(1)
Can't think of anything else to try now. It seems like the SNMP weathermapdatasource just doesn't like the info it's getting back from the switch.

Code: Select all

ReadData: NODE, target: snmp:notmykey:192.168.1.1:.1.3.6.1.2.1.2.2.1.8.0.10002:- on config line 54 had no valid data, according to WeatherMapDataSource_snmp

Code: Select all

ReadData: NODE target: snmp:notmykey:192.168.1.1:1.3.6.1.2.1.2.2.1.8.10002:- on config line 54 had no valid data, according to WeatherMapDataSource_snmp
Can anyone post any more snippets of working configs that I can compare to my setup? Might have to look at doing this on RRD instead I guess.

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

Re: Trying to do a ifOperStatus map. "no valid data" on SNMP

#4 Post by Howie » Wed May 02, 2012 6:59 am

With DEBUG logging, you should see more about what values are being fetched...
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
Pucho
Cacti User
Posts: 180
Joined: Wed Jul 20, 2016 8:00 pm

Re: Trying to do a ifOperStatus map. "no valid data" on SNMP

#5 Post by Pucho » Wed Jul 11, 2018 11:48 pm

I think there is actually a problem on this specific OID with SNMPv2 wheathermap DataSource, it might a corner case but it seems to work fine with nw datasource for snmpv1 version.

These are examples by running snmpwalk from the box

Code: Select all

.1.3.6.1.2.1.2.2.1.8.10102 = INTEGER: down(2)

Code: Select all

.1.3.6.1.2.1.2.2.1.8.10103 = INTEGER: up(1)
Now, if I set the TARGET to use snmp instead of snmp2c it works fine and you can tell there is something different in the way they both parse the output because I've set

Code: Select all

LABEL {node:this:snmp_in_raw}
and when I use snmpv1 I get 1 or 2 but when I use v2 I get up or down.
Cacti - 1.1.37
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

Code: Select all

SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code: Select all

WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.

Post Reply