[mrtg] Advice: monitoring GPS based clock
Daniel McDonald
dan.mcdonald at austinenergy.com
Wed Sep 7 14:51:39 CEST 2011
On 9/2/11 12:34 PM, "Alex van den Bogaerdt" <alex at vandenbogaerdt.nl> wrote:
>> We have some ntp clocks that provide snmp monitoring. Unfortunately, the
>> data presented is not structured nicely in a mib:
>>
>> SYMM-SMI::gpsSatlist.0
>> "9,3,-156,C,6,-158,C,7,-154,C,8,-161,C,10,-159,C,11,-156,C,16,-159,C,19,-152
>> ,C,23,-153,C"
>> [...time passes]
>>
>> SYMM-SMI::gpsSatlist.0
>> "8,3,-158,C,6,-160,C,7,-153,C,8,-159,C,10,-158,C,11,-157,C,19,-153,C,23,-152
>> ,C"
>>
>> The format of the string is:
>> N, x1,y1,z1,x2,y2,z2...xn,yn,zn
>> Where N is the number of currently visible satellites , the x,y,z are
>> specific information about each satellite. X is a unique number
>> associated
>> with the satellite, Y is the dB loss talking to it, and Z is a flag
>> indicating whether the time protocol considers the satellite or is just
>> tracking it for later.
> [...]
>> However, I don¹t know what the possible X values are, so pre-loading that
>> seems challenging. I think adding targets on the fly in mrtg (by adding
>> them to the $$targ array) would be a tad challenging.
>
> Guessing only: 1 to 32
I've now written my template and am graphing data. The template looks
something like this:
my $graphtarget_name=$router_name.".svn";
my @colors = (
"#ffffff","#ffffb0","#ffff80","#ffff40","#ffff00",
"#ffb0ff","#ffb0b0","#ffb080","#ffb040","#ffb000",
"#ff40ff","#ff40b0","#ff4080","#ff4040","#ff4000",
"#ff00ff","#ff00b0","#ff0080","#fff000","#ff0000",
"#b0ffff","#b0ffb0","#b0ff80","#b0ff40","#b0ff00",
"#40ffff","#40ffb0","#40ff80","#40ff40","#40ff00",
"#00ffff","#00ffb0","#00ff80","#00ff40","#00ff00",
);
my $i = 0;
while ($i++ < 32) {
$target_name=$router_name.".svn".$i;
my $color = shift @colors;
$target_lines .= <<SVN
Target[$target_name]: gpsSatlist.0&gpsSatlist.0:$router|gpsSVN$i
SnmpOptions[$target_name]: $v3options
Directory[$target_name]: $directory_name
MaxBytes[$target_name]:1
Options[$target_name]: Gauge noo
Title[$target_name]: SVN $i
routers.cgi*InMenu[$target_name]: no
routers.cgi*GraphStyle[$target_name]:normal
routers.cgi*UpperLimit[$target_name]: -120
routers.cgi*LowerLimit[$target_name]: -200
Ylegend[$target_name]: dB
routers.cgi*Options[$target_name]: noo nototal nopercent fixunit
routers.cgi*Graph[$target_name]: $graphtarget_name noo $color
SVN
;
}
I manually tuned the RRDfiles to have a min of -200:
for rrd in *svn*.rrd ; do rrdtool tune $rrd -i ds0:-200 -i ds1:-200 ; done
The satellites appear mostly in the band from about -151 to -162. However,
the graph as displayed is scaled from about 50 to -1800, meaning that the
details are lost in the graph.
Do I need to set routers.cgi*UpperLimit[$graphtarget_name]: -120 to make
this work right? I'm running 2.21beta of routers2.cgi. I think my reading
of the routers2 docs suggests routers.cgi*UpperLimit was only applicable to
targets and not to pseudo graph targets.
I tried to use routers.cgi*Options[] rigid, but that ignores the
LowerLimit[] directive....
--
Daniel J McDonald, CCIE # 2495, CISSP # 78281
More information about the mrtg
mailing list