From: Buchan M. <bg...@st...> - 2008-06-06 15:32:56
|
On Thursday 05 June 2008 14:13:14 Gaëtan Frenoy wrote: > Good day, > > Recently, I upgraded devmon from v0.2.2 to v0.3 final > (devmon-0.3.0.tar.gz / 2008-04-03 06:52 on Sourceforce). > > Below are some hacks I had to do to make it working for me. > Any comment is of course very welcome. > > > 1) CONN test must be green > > All our firewalls have ICMP ping disabled. In our bb-hosts, they are > all marked as "noping". So the "conn" status of all those firewalls is > "clear". > > With v0.3, it looks that devmon is skipping all devices that are not > marked as conn=green. You can disable this feature globally by changing BBTYPE in devmon.cfg to something other than "hobbit". I see now this change was not documented in the CHANGELOG, but it was implemented before I took over maintainership. At present there is no way to disable it on a per-device basis. > This is not applicable for us. I guess we should have a global > variable that gives all acceptable status (with default = green) but so > far, I just changed the tests within dm_snmp.pm and dm_tests.pm to > accept "clear" status. > > > 2) UNPACK did not work > > In file modules/dm_tests.pm, function trans_unpack, line 782, changed : > > my @vars = unpack $type, $packed; > > to > > my @vars = unpack "$type*", $packed; > > (and the same at line 795) Hmm, it is working here, it is used in the compaq-server/log/transforms template file, and I have a number of servers using this template, and the values work correctly. Can you provide more detail on when/where/how it isn't working? > 3) SUBSTR did not work ... in specific cases. > (btw, I have the feeling I already fixed this before...) > > In file modules/dm_tests.pm, function trans_substr, line 548 and > following, changed: > > if(defined $length) { > $oid_h->{'val'}{$leaf} = substr $string, $offset, $length; > } > else { > $oid_h->{'val'}{$leaf} = substr $string, $offset; > } > > to > > my $string_length = length($string); > if ($offset <= $string_length) { > if(defined $length) { > if ($offset + $length <= $string_length) { > $oid_h->{'val'}{$leaf} = substr $string, $offset, > $length; } else { > # Length outside string limit, review length > $oid_h->{'val'}{$leaf} = substr $string, $offset, > $string_length - $offset; } > } else { > $oid_h->{'val'}{$leaf} = substr $string, $offset; > } > } else { > # Offset outside string limit, returns an empty string > $oid_h->{'val'}{$leaf} = ''; > } > > The fix looks fine. Could you send a diff instead? > 4) VERSION is still "rc1" > Yes, I noticed it a few weeks ago. > And a last very minor change : > > In modules/dm_config.pm, line 38 : changed version from 0.3.0-rc1 to > 0.3.0 I think what I will do is try and fix all the real bugs (no features) in the next week or three, and release a 0.3.1. Thanks for the feedback. Regards, Buchan |