RE: monitor quotient Couldn't fetch value
Merrett Willett <Merrett.Willett <at> cbeyond.net>
2005-08-04 19:23:12 GMT
Fixed
Quick answer is quotient/Mail syntax, below is the correct format:
ifInErrors : quotient : %inerrpct% : : ifInUcastPackets : 0 : MAIL :
Mail : %email_list%
ifOutErrors : quotient : %outerrpct% : : ifOutUcastPackets : 0 : MAIL :
Mail : %email_list%
Longer story is:
Somewhere while troubleshooting, I changed to the ds-source name, which
by default is ifInUcastPkts and not the datasource which is
ifOutUcastPackets (notice packets is spelled out on one). If worked for
in/out octets and in/out errors as the ds-source and datasource are
named the same, but not ucast because they are spelled different. Thus
when I tried to query the wrong name, the subroutine errored out and
gave an error (may be nice in the future if rrdFetch returned an error
along with undefined in the future - not complaining, just sayin). The
other was the time variable missing.
Merrett
-----Original Message-----
From: Merrett Willett
Sent: Wednesday, August 03, 2005 11:55 PM
To: Merrett Willett; cricket-users <at> lists.sourceforge.net
Subject: RE: [cricket-users] monitor quotient Couldn't fetch value
Running through code and completing a number of more tests I've narrowed
it down, but true root cause still unknown. (FYI the quotient failure
using ucast packets happens for all my targets, not just one)
For some reason, the subroutine getDSNum is able to pull ds# for:
ifHCInOctets ifHCOutOctets ifInErrors ifOutErrors
But not:
ifInUcastPkts
ifOutUcastPkts
The quotient fails since it is using one of the Ucast variables;
They fail at the undefined return from rrdFetch:
sub rrdFetch {
my($self,$datafile,$dsNum,$sec) = <at> _;
# check all of our arguments;
return if (!defined($dsNum));
I've been able to hack/follow the code up to this point, but I'm getting
lost in the getDSNum function.
Can anyone provide some ideas as to why it would not pull the ds value
for ucast even though they are there, they graph and summaries are
available?
Thanks,
Merrett
getDSNnum subroutine:
# Given a target reference and datasource name,
# returns the datasource number or undef if no
# datasource of that name can be found in target's
# target-type dictionary
sub getDSNum {
my($self, $target, $dsName) = <at> _;
my($ttRef) = $Common::global::gCT->configHash(
join('/',$target->{'auto-target-path'},
$target->{'auto-target-name'}),
'targettype',
lc($target->{'target-type'}),
$target);
my($Counter) = 0;
my(%dsMap) = map { $_ => $Counter++ }
split(/\s*,\s*/,$ttRef->{'ds'});
return $dsMap{$dsName};
}
-----Original Message-----
From: cricket-users-admin <at> lists.sourceforge.net
[mailto:cricket-users-admin <at> lists.sourceforge.net] On Behalf Of Merrett
Willett
Sent: Wednesday, August 03, 2005 12:54 AM
To: cricket-users <at> lists.sourceforge.net
Subject: [cricket-users] monitor quotient Couldn't fetch value
All,
I'm working on setting up thresholds, and I haven't seen this particular
question in the archives. If the errors on the interface collected are
0, and you have a quotient threshold, should you get this error when its
checking?
[03-Aug-2005 00:33:54 ] in rrdFetch: file is
~/cricket/cricket-config/../cricket-data//Atlanta/atl-router-interfaces/
car00buk/gigabitethernet7_0_0.rrd
[03-Aug-2005 00:33:54 ] in rrdFetch: skipping RRA
[03-Aug-2005 00:33:54 ] in rrdFetch: rraNum is 0 rowNum is 0 dsNum is 2
[03-Aug-2005 00:33:54 ] in rrdFetch: return is 0 [03-Aug-2005 00:33:54*]
Monitor: Couldn't fetch value for 0 seconds ago from .
<##############ERROR################
[03-Aug-2005 00:33:54 ]
/Atlanta/atl-router-interfaces/car00buk/gigabitethernet7_0_0 -
ifInErrors : quotient : 0.1 pct : : ifInUcastPackets : MAIL : Mail :
me\ <at> spam passed.
Most of the collector debug
[03-Aug-2005 00:33:53 ] target gigabitethernet7_0_0
--mapkey-- = interface-name
--verify-mapkey-- = interface-name
inst = 60
interface-name = GigabitEthernet7/0/0
monitor-thresholds = ifHCInOctets : value : 62500 : 40000000 : MAIL :
Mail : me\ <at> spam,
ifHCOutOctets : value : 62500 : 40000000 : MAIL : Mail :
me\ <at> spam,
ifInErrors : quotient : 0.1 pct : : ifInUcastPackets :
MAIL : Mail : me <at> spam,
ifOutErrors : quotient : 0.1 pct : : ifOutUcastPackets :
MAIL : Mail : me <at> spam
[03-Aug-2005 00:33:53 ] Retrieving data for target gigabitethernet7_0_0
(60) (standard-interface)
[03-Aug-2005 00:33:53 ] ds0 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/ifHCInOctets.60
[03-Aug-2005 00:33:53 ] ds1 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/ifHCOutOctets.60
[03-Aug-2005 00:33:53 ] ds2 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/ifInErrors.60
[03-Aug-2005 00:33:53 ] ds3 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/ifOutErrors.60
[03-Aug-2005 00:33:53 ] ds4 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/ifInUcastPkts.60
[03-Aug-2005 00:33:53 ] ds5 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/ifOutUcastPkts.60
[03-Aug-2005 00:33:53 ] ds6 is:
//xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2/1.3.6.1.2.1.2.2.1.2.60
[03-Aug-2005 00:33:53 ] Getting from xxxxx <at> car00buk.atl0:161:2.0:5:1.0:2
1.3.6.1.2.1.31.1.1.1.6.60 1.3.6.1.2.1.31.1.1.1.10.60
1.3.6.1.2.1.2.2.1.14.60 1.3.6.1.2.1.2.2.1.20.60 1.3.6.1.2.1.2.2.1.11.60
1.3.6.1.2.1.2.2.1.17.60 1.3.6.1.2.1.2.2.1.2.60 [03-Aug-2005 00:33:53 ]
Got: 74058164656559 71358882314014 0 0 3525266147 4045710736
GigabitEthernet7/0/0 [03-Aug-2005 00:33:53 ] Retrieved data for
gigabitethernet7_0_0 (60):
74058164656559,71358882314014,0,0,3525266147,4045710736
[03-Aug-2005 00:33:53 ] Processing
/Atlanta/atl-router-interfaces/car00buk/gigabitethernet8_0_0...
[03-Aug-2005 00:33:53 ] Preparing map(interface-name) [03-Aug-2005
00:33:53 ] Evaling inst which is: 0
SKIP a little ..
[03-Aug-2005 00:33:54 ] in rrdFetch: file is
~/cricket/cricket-config/../cricket-data//Atlanta/atl-router-interfaces/
car00buk/gigabitethernet7_0_0.rrd
[03-Aug-2005 00:33:54 ] in rrdFetch: skipping RRA
[03-Aug-2005 00:33:54 ] in rrdFetch: rraNum is 0 rowNum is 0 dsNum is 2
[03-Aug-2005 00:33:54 ] in rrdFetch: return is 0 [03-Aug-2005 00:33:54*]
Monitor: Couldn't fetch value for 0 seconds ago from . [03-Aug-2005
00:33:54 ] /Atlanta/atl-router-interfaces/car00buk/gigabitethernet7_0_0
- ifInErrors : quotient : 0.1 pct : : ifInUcastPackets : MAIL : Mail :
me\ <at> spam passed. [03-Aug-2005 00:33:54 ] in rrdFetch: file is
~/cricket/cricket-config/../cricket-data//Atlanta/atl-router-interfaces/
car00buk/gigabitethernet7_0_0.rrd
[03-Aug-2005 00:33:54 ] in rrdFetch: skipping RRA
[03-Aug-2005 00:33:54 ] in rrdFetch: rraNum is 0 rowNum is 0 dsNum is 3
[03-Aug-2005 00:33:54 ] in rrdFetch: return is 0 [03-Aug-2005 00:33:54*]
Monitor: Couldn't fetch value for 0 seconds ago from . [03-Aug-2005
00:33:54 ] /Atlanta/atl-router-interfaces/car00buk/gigabitethernet7_0_0
- ifOutErrors : quotient : 0.1 pct : : ifOutUcastPackets : MAIL : Mail
: me\ <at> spam passed.
Thanks,
Merrett
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick
_______________________________________________
cricket-users mailing list
cricket-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cricket-users
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf