Interface errors scripts and templates

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Author
Message
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Interface errors scripts and templates

#1 Post by chadd » Thu Mar 23, 2006 9:06 pm

Has anyone written a script/template for interface errors. Cisco routers and switches especially?

User avatar
TheWitness
Developer
Posts: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#2 Post by TheWitness » Thu Mar 23, 2006 11:16 pm

Part of the base insterface data query. Look at the drop down when creating graphs.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

User avatar
Pumpi
Cacti User
Posts: 256
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

#3 Post by Pumpi » Fri Mar 24, 2006 3:24 am

chadd,

perhaps you can use

RMON Group 1 Etherstats - Templates
found here http://forums.cacti.net/viewtopic.php?t ... light=rmon

or the the Ethernet Stats(RFC1643) Templates
found here http://forums.cacti.net/viewtopic.php?t ... ht=rfc1643

Pumpi

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

#4 Post by chadd » Fri Mar 24, 2006 5:01 pm

Thank you both. I didn't realize that they were already part of the interface statistics!! Thanks Witness!

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

#5 Post by chadd » Mon Mar 27, 2006 9:01 am

Just a question. Witness?, would you know what the values are in the error graphs? I am showing 486.11 u in the average column in one of my graphs, and 140.00 m in the Maximum column in the same graph. What do u and m stand for, and are the correct mesurments for error values? Are the values you see literal, and over what time period? Thanks for any help.

-chadd.

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#6 Post by gandalf » Mon Mar 27, 2006 11:06 am

See "General" sticky post at http://forums.cacti.net/viewtopic.php?t=8168
Reinhard

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

#7 Post by chadd » Tue Mar 28, 2006 8:17 am

Thanks.

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

#8 Post by chadd » Fri May 05, 2006 3:40 pm

TheWitness wrote:Part of the base insterface data query. Look at the drop down when creating graphs.

TheWitness
I am looking to get more of a "real" idea of exactly how many errors I get on the interface, and not the RRDTool calculations for errors/sec (they display in units of 10^-3 mostly..). What I would like is a running delta. I wrote a script like this for redbacks, and could do it for this as well, but I wonder, if I just change the data source template for interface errors and discards to be "gauge" instead of counter, if that would produce like results?? Can someone let me know what the best plan of attack is on this. I have all cisco routers, so I am getting the question, "why does the router show errors, but cacti is not reporting them". What my other script did, was use Net::Telnet to telnet to the router, do a show interface (basically) and parse the output for the error values. Then put that in a file. Then next poll, if there was something in the file, subtract current from last, and report the delta as a value. So, what you had was a pretty good graph of the exact amount of errors every poll. I would much rather do this with SNMP, and it would be great if I could just use what is already there in Cacti..

Anyone??

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#9 Post by gandalf » Mon May 08, 2006 10:25 am

chadd wrote:... What I would like is a running delta.
cacti's poller retrieves data every 300 secs (appr.). So the delta you may get is that between two measuring intervals. To do so, simple create a CDEF

Code: Select all

cdef=CURRENT_DATA_SOURCE,300,*
and apply this to your Graph Items. But rrdtool will still perform normalization to exact 300 sec intervals.
Reinhard

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

#10 Post by chadd » Thu May 11, 2006 11:11 am

lvm wrote:
chadd wrote:... What I would like is a running delta.
cacti's poller retrieves data every 300 secs (appr.). So the delta you may get is that between two measuring intervals. To do so, simple create a CDEF

Code: Select all

cdef=CURRENT_DATA_SOURCE,300,*
and apply this to your Graph Items. But rrdtool will still perform normalization to exact 300 sec intervals.
Reinhard
Ok, I created a cdef, as suggested (accept my poller runs every 3min so the cdef was cdef=CURRENT_DATA_SOURCE,180,*). I also changed the each item in the graph template to be 'exact values' instead of 'normal'. This produced the graphs I was looking for. However, now my tholds are no longer working. I have values in my graphs exceeding the set tholds, but no alarms... Any suggestions?

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#11 Post by gandalf » Thu May 11, 2006 2:03 pm

Please post your last questions to the thold thread in Add-Ons. cigamit is watching this more closely
Reinhard

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

#12 Post by chadd » Thu May 11, 2006 2:16 pm

Thanks, I did already.

monnkey
Posts: 1
Joined: Fri May 26, 2006 2:15 pm

How do I create/apply a CDEF to an existing graph template?

#13 Post by monnkey » Fri May 26, 2006 2:41 pm

I would like to do the same thing CHADD did, but I do not know how to create/apply a CDEF.

Any help is greatly appreciated!

Fedora Core 4
Cacti 0.8.6

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#14 Post by gandalf » Sat May 27, 2006 2:23 pm

Select Graph Management and find CDEFs underneath, select. Then Add a new one. Define
- special data source = CURRENT_DATA_SOURCE
- custom string = 300
- operator = *
and save.
Reinhard

chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: How do I create/apply a CDEF to an existing graph templa

#15 Post by chadd » Tue May 30, 2006 11:28 am

monnkey wrote:I would like to do the same thing CHADD did, but I do not know how to create/apply a CDEF.

Any help is greatly appreciated!

Fedora Core 4
Cacti 0.8.6
Thanks LVM! I actually have found that, though this looks good (creating a cdef), that the info - and more over, the thold alerts, are not accurate.

I did some research with the Cisco TAC and found that the MIBs that the 'interface errors/discards' function in Cacti collects on are not really what I want. They are an amalgam of different errors. That being said, it is still a good indication of wether or not an interface is taking errors.

What I need for my purposes is the exact number of errors accrued every polling cycle. I also need those error graphs representitive of the error statistics that you see when you do a 'show interface'. (people don't get it when you explain about averages, and formulas and such - K.I.S.S.)

Anyway, the only way to get the values I am looking for is to connect to the command line, do a show interface, and parse the output for this information (from what the Cisco TAC says anyway. I looked through all the OIDs and could not find exact matches to these below values. My dilemma is that 'people ;-)' what to see, represented in the graphs, what they see when they are on the command line of the device.):

(Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 output errors, 0 collisions, 3 interface resets
0 output buffer failures, 0 output buffers swapped out)

For my purposes, I think I am just going to collect statistics on this line:

(0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort)

as it will tell me if a T1 circuit is taking errors or not.

This is not ideal, but it going to have to do. Plus, it is quick and easy..

If anyone wants the script/templates, I will post them when I am done testing on several different types of cisco gear.

FYI: my original task was to send an email alert any time a T1 circuit took errors (any errors at all)... So far, the collection methods included in Cacti have proven less than accurate - or at least not living up to the outlined original task.

Post Reply