From: W.J.M. N. <Wim...@nl...> - 2013-09-30 06:25:26
|
Hello Martin, > Perhaps I'm just being lazy, but I'm looking for a way of changing how the > default if_load graphs are displayed on Xymon/Devmon. > > Xymon version is 4.3.12 > Devmon version is 0.3.1-beta1 > > What I want is for the graphs to be displayed in interface or numerical > order, but, out of the box, Devmon and Xymon display the graphs sorted in > alphabetical order. > > Normally this is not an issue, but it is slightly tedious to have to scroll > through the graph for interface Gi0/1 then through Gi0/10, Gi0/11, Gi0/12, > Gi0/13, Gi0/14, Gi0/15, Gi0/16, Gi0/17, Gi0/18 and Gi0/19 graphs to > eventually get to Gi0/2. is there not a way to either adjust the interface > so it reads Gi0/01, Gi0/02 etc or a flag to 'sort numerically'? I am using a patch to Devmon to solve this problem. It changes the name of the interfaced part of the RRD file name. This causes the alphabetical order to be the same as the numerical order. There is a drawback however. For some of the interfaces the RRD file name changes, causing new files to be generated once the patch is applied. If you do not want to loose the history, you need to save / restore / move those files. Anyway, you need to remove the RRD files with the unsed interface names in it, as they will mesh up the graphs on the Xymon page. The patch itself is: Index: dm_tests.pm =================================================================== --- dm_tests.pm (revision 13) +++ dm_tests.pm (revision 14) @@ -2022,6 +2022,11 @@ for my $leaf (@{$rrd{$name}{'leaves'}}) { my $pri_val = $oids->{$pri}{'val'}{$leaf}; $pri_val =~ s/\s*//g; + # + # Map Cisco interface names like "Fa1/0/1" onto "Fa1/0/01". This will cause a + # nicer order of the graphs in the trends column in Xymon. + # + if ( $pri_val =~ m/^(Fa\d\/|Fa\d\/\d\/|Gi\d\/\d\/|Gi\d\/|Po)(\d)$/ ) { + $pri_val = $1 . '0' . $2 ; + } elsif ( $pri_val =~ m/^(Vl)(\d{1,3})$/ ) { + $pri_val = $1 . substr( '000' . $2, -4, 4 ) ; + } # of elsif $temp_data = ''; for my $oid (@{$rrd{$name}{'oids'}}) { Regards, Wim Nelis. ****************************************************************************************************************** The NLR disclaimer is valid for NLR e-mail messages. This message is only meant for providing information. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of the sender. This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. Sender accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. ****************************************************************************************************************** |