Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Feb 20, 2019 3:00 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Trying to do a ifOperStatus map. "no valid data" on SNMP
PostPosted: Tue Apr 24, 2012 6:07 am 
Offline

Joined: Tue Apr 24, 2012 5:52 am
Posts: 5
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:
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:
# 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:
# 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!


Top
 Profile  
 
 Post subject: Re: Trying to do a ifOperStatus map. "no valid data" on SNMP
PostPosted: Tue Apr 24, 2012 9:10 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
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.98 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!)


Top
 Profile  
 
 Post subject: Re: Trying to do a ifOperStatus map. "no valid data" on SNMP
PostPosted: Wed May 02, 2012 4:56 am 
Offline

Joined: Tue Apr 24, 2012 5:52 am
Posts: 5
Still no joy.

Code:
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:
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:
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:
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.


Top
 Profile  
 
 Post subject: Re: Trying to do a ifOperStatus map. "no valid data" on SNMP
PostPosted: Wed May 02, 2012 6:59 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
With DEBUG logging, you should see more about what values are being fetched...

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Trying to do a ifOperStatus map. "no valid data" on SNMP
PostPosted: Wed Jul 11, 2018 11:48 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
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:
.1.3.6.1.2.1.2.2.1.8.10102 = INTEGER: down(2)


Code:
.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:
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:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group