Xymon Mailing List Archive search

question on disable until ok

16 messages in this thread

list Marco Avvisano · Wed, 31 May 2006 19:13:23 +0200 ·
Hi all,

One question,
it's normal that after i use 'disable until ok', if i restart the hobbit 
server the service disabled go red?
May be more useful keep the disabled status until the service go green?

Marco
list Lars Ebeling · Wed, 31 May 2006 20:43:15 +0200 ·
Agree, I wrote about this 13th of March

Lars

----- Original Message ----- From: "Marco Avvisano" <user-e09c0f3f8c70@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Wednesday, May 31, 2006 7:13 PM
Subject: [hobbit] question on disable until ok
quoted from Marco Avvisano

Hi all,

One question,
it's normal that after i use 'disable until ok', if i restart the hobbit server the service disabled go red?
May be more useful keep the disabled status until the service go green?

Marco

list Henrik Størner · Wed, 31 May 2006 22:14:19 +0200 ·
quoted from Marco Avvisano
On Wed, May 31, 2006 at 07:13:23PM +0200, Marco Avvisano wrote:
it's normal that after i use 'disable until ok', if i restart the hobbit 
server the service disabled go red?
May be more useful keep the disabled status until the service go green?
It's a bug, which I fixed earlier today.


Henrik
list Marco Avvisano · Thu, 1 Jun 2006 09:00:06 +0200 ·
Hi Enrick,

i see also that no files are created for disabled hosts in 
HOBBITHOME/data/disabled/

regards,

Marco
quoted from Marco Avvisano

On Wed, May 31, 2006 at 07:13:23PM +0200, Marco Avvisano wrote:
it's normal that after i use 'disable until ok', if i restart the hobbit
server the service disabled go red?
May be more useful keep the disabled status until the service go green?
It's a bug, which I fixed earlier today.


Henrik

list Frédéric Mangeant · Thu, 01 Jun 2006 09:11:58 +0200 ·
quoted from Marco Avvisano
Marco Avvisano a écrit :
Hi Enrick,

i see also that no files are created for disabled hosts in HOBBITHOME/data/disabled/

Hi

have you enabled this task in hobbitlaunch.cfg ?


# "bbenadis" updates the files used to indicate that a host or test has been enabled or disabled.
# Unless you are running server side scripts that look at these files, you do not need this.

[bbenadis]
        ENVFILE /BB/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD hobbitd_channel --channel=enadis --log=$BBSERVERLOGS/enadis.log hobbitd_filestore --enadis

-- 

Frédéric Mangeant

Steria EDC Sophia-Antipolis
list Marco Avvisano · Thu, 1 Jun 2006 09:17:14 +0200 ·
uhhh, no!
but  no more files are created in HOBBITHOME/data/disabled/ for hosts disabled (similar to BB)?

M.
quoted from Marco Avvisano
Marco Avvisano a écrit :
Hi Enrick,

i see also that no files are created for disabled hosts in HOBBITHOME/data/disabled/

Hi

have you enabled this task in hobbitlaunch.cfg ?


# "bbenadis" updates the files used to indicate that a host or test has been enabled or disabled.
# Unless you are running server side scripts that look at these files, you do not need this.

[bbenadis]
       ENVFILE /BB/hobbit/server/etc/hobbitserver.cfg
       NEEDS hobbitd
       CMD hobbitd_channel --channel=enadis --log=$BBSERVERLOGS/enadis.log hobbitd_filestore --enadis

-- 

Frédéric Mangeant

Steria EDC Sophia-Antipolis

list Frédéric Mangeant · Thu, 01 Jun 2006 09:25:50 +0200 ·
quoted from Marco Avvisano
Marco Avvisano a écrit :
uhhh, no!
but  no more files are created in HOBBITHOME/data/disabled/ for hosts 
disabled (similar to BB)?

By default, no (Henrik, correct me if I'm wrong).

-- 

Frédéric Mangeant

Steria EDC Sophia-Antipolis
list Henrik Størner · Thu, 1 Jun 2006 13:27:37 +0200 ·
quoted from Frédéric Mangeant
On Thu, Jun 01, 2006 at 09:25:50AM +0200, Fr?d?ric Mangeant wrote:
Marco Avvisano a écrit :
uhhh, no!
but  no more files are created in HOBBITHOME/data/disabled/ for hosts 
disabled (similar to BB)?
By default, no (Henrik, correct me if I'm wrong).
You're quite right. Hobbit has no use for the data/disabled/ files, so
they're not created unless you enable the compatibility task that
Frederic mentioned.


Henrik
list Marco Avvisano · Wed, 13 Sep 2006 18:38:38 +0200 ·

 Hi Enrick,

 i have always the problem in 4.2.0, if i use 'disable until ok', that no 
files are created in
see  HOBBITHOME/data/disabled/

Regards

Marco
list Francesco Duranti · Wed, 13 Sep 2006 20:09:46 +0200 ·
I think no files are even creted in HOBBITHOME/data/disabled
If I remember well Hobbit will still continue to receive and update the files and graphs also if the host is disabled but it's marked "blue" so that also graphs can continue to receive data also.
That directory was used by bb server to make an entire host offline from the test (so that no test are run for that host) and hobbit is not using it i think.
 
Francesco
 

Da: Marco Avvisano [mailto:user-e09c0f3f8c70@xymon.invalid]
Inviato: mer 13/09/2006 18.38
A: user-ae9b8668bcde@xymon.invalid
Oggetto: [hobbit] question on disable until ok
quoted from Marco Avvisano


 Hi Enrick,

 i have always the problem in 4.2.0, if i use 'disable until ok', that no
files are created in
see  HOBBITHOME/data/disabled/

Regards

Marco
list Henrik Størner · Wed, 13 Sep 2006 21:52:16 +0200 ·
quoted from Marco Avvisano
On Wed, Sep 13, 2006 at 06:38:38PM +0200, Marco Avvisano wrote:
i have always the problem in 4.2.0, if i use 'disable until ok', that no 
files are created in see  HOBBITHOME/data/disabled/
That's possible. Do you need them ? Hobbit doesn't use those files, they
are purely for the benefit of any add-on scripts that use the old
BB-style file interface.

I'll probably deprecate the hobbitd_filestore module and remove it
entirely in in Hobbit version 5.


Regards,
Henrik
list Dominique Frise · Thu, 14 Sep 2006 07:38:18 +0200 ·
quoted from Henrik Størner
Henrik Stoerner wrote:
On Wed, Sep 13, 2006 at 06:38:38PM +0200, Marco Avvisano wrote:
i have always the problem in 4.2.0, if i use 'disable until ok', that no files are created in see  HOBBITHOME/data/disabled/
That's possible. Do you need them ? Hobbit doesn't use those files, they
are purely for the benefit of any add-on scripts that use the old
BB-style file interface.

I'll probably deprecate the hobbitd_filestore module and remove it
entirely in in Hobbit version 5.


Regards,
Henrik

Please DO NOT remove the hobbitd_filestore.
We have quite a few lot custom scripts that use this "old BB-style file interface"

Dominique
UNIL - University of Lausanne
list Marco Avvisano · Thu, 14 Sep 2006 14:53:39 +0200 ·
quoted from Dominique Frise
Henrik Stoerner wrote:
On Wed, Sep 13, 2006 at 06:38:38PM +0200, Marco Avvisano wrote:
i have always the problem in 4.2.0, if i use 'disable until ok', that no files are created in see  HOBBITHOME/data/disabled/
That's possible. Do you need them ? Hobbit doesn't use those files, they
are purely for the benefit of any add-on scripts that use the old
BB-style file interface.

I'll probably deprecate the hobbitd_filestore module and remove it
entirely in in Hobbit version 5.


Regards,
Henrik

Please DO NOT remove the hobbitd_filestore.
We have quite a few lot custom scripts that use this "old BB-style file interface"
Yes there are many scripts that using these files ... for example bb-xsnmp if not find these files stop to make check..
so if it's possible not only to remove from the new version, but add it also a in 'disable until'

best regards

Marco
list Francesco Duranti · Thu, 14 Sep 2006 16:29:37 +0200 ·
If you use the last bb-xsnmp it also check with hobbit query command to see if a host is alive but it check only if the host is "red" so it will not get disabled. I got some problem with it because if it get a error in snmp response it exit and don't continue to check other hosts... I've modified it to continue to check.. Attached is a patch with the 1.79 version available on deadcat that check if a host exist in the bbhost file and if it's "conn" state is not "green" (so if you've disabled the conn test it will not check for snmp.
 

Da: Marco Avvisano [mailto:user-e09c0f3f8c70@xymon.invalid]
Inviato: gio 14/09/2006 14.53
A: user-ae9b8668bcde@xymon.invalid
Oggetto: Re: [hobbit] question on disable until ok
quoted from Marco Avvisano

Please DO NOT remove the hobbitd_filestore.
We have quite a few lot custom scripts that use this "old BB-style file
interface"
Yes there are many scripts that using these files ... for example bb-xsnmp
if not find these files stop to make check..
so if it's possible not only to remove from the new version, but add it also
a in 'disable until'

best regards

Marco
list Francesco Duranti · Thu, 14 Sep 2006 16:46:37 +0200 ·
I think the patch didn't got in .... Here it's the patch 

--- bb-xsnmp.pl.1_79	2006-09-14 16:18:55.000000000 +0200
+++ bb-xsnmp.pl	2006-05-14 00:10:48.000000000 +0200
@@ -1,6 +1,6 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 
 # Monolithic SNMP gatherer for BigBrother.
 
 # Ported to work with Hobbit which doesn't have bb-combo.sh
 # Added support for quering the hobbit server to see if a conn test is
red
@@ -14,12 +14,12 @@
 
 use strict;
 use Carp;
 use FileHandle;
 use FindBin qw($Bin $Script);
-#use lib $ENV{'BBHOME'}."/ext/perl/";
-use lib qw(/local/packages/IT/HOBBIT/hobbit/server/ext/perl/);
+use lib $ENV{'BBHOME'}."/ext/perl/";
+#use lib qw(/local/packages/IT/HOBBIT/hobbit/server/ext/perl/);
 use Net::SNMP qw(:snmp);
 use vars qw($VERSION);
 ( $VERSION ) = '$Revision: 1.79 $' =~ /\$Revision:\s+([^\s]+)/;
 
 my $debug = $ENV{'DEBUG'};
@@ -28,14 +28,14 @@
                          # I was not called by BigBrother.
                          # In this case, I assume I'm testing and
                          # print to stdout instead of
                          # sending to BB.
 
-my $defbbtmp = '/var/BB/bb/tmp';
-my $defbbhome = '/var/BB/bb';
+my $defbbtmp = '/home/hobbit/server/tmp';
+my $defbbhome = '/home/hobbit/server';
 my $defbb = "$defbbhome/bin/bb";
-my $defbbdisp = 'enterprise.tigr.org';
+my $defbbdisp = 'itromlx10';
 my $defmachine = 'localhost';
 
 # For SNMP
 my $defretries = 3;
 my $deftimeout = 5;
@@ -331,10 +331,14 @@
   529 => 'ascend',
   789 => 'netapp',
   1991 => 'foundry',
   2021 => 'ucdavis',
   3224 => 'netscreen',
+  5624 => 'vhswitch',
+  629  => 'mrswitch',
+  52   => 'vhswitch',
+  97   => 'cabletron',
 );
 
 my %snmpsyntaxdb = (
   # .1.3.6.1.2.1.2.2.1.8
   'ifOperStatus' => {
@@ -721,11 +725,11 @@
 my $compaq_pct_temp_panic = 90;
 
 # For disk checks
 my $diskthreshdb_ref = undef;
 my $disk_defyellow = exists($ENV{'DFWARN'}) ? $ENV{'DFWARN'} : 90;
-my $disk_defred    = exists($ENV{'DFWARN'}) ? $ENV{'DFWARN'} : 90;
+my $disk_defred    = exists($ENV{'DFPANIC'}) ? $ENV{'DFPANIC'} : 90;
 
 # Turn on or off depending on whether or not you have more servers
defined
 # than BB can display in one page. TODO: Automate this decision.
 # bindtree is the minimum necessary.
 my $l4_show_realservers = 0;
@@ -806,12 +810,12 @@
   }
 
   # Get a list of disabled hosts
   my @disabled;
   print "$ENV{'BBVAR'}/disabled\n" if $debug;
-#  opendir(DISABLED,"$ENV{'BBVAR'}/disabled")
-  opendir(DISABLED,"/local/packages/IT/HOBBIT/hobbit/data/disabled")
+  opendir(DISABLED,"$ENV{'BBVAR'}/disabled")
+#  opendir(DISABLED,"/local/packages/IT/HOBBIT/hobbit/data/disabled")
 	|| warn "Could not open the disabled hosts directory: $!\n";
   while (my $dhost  = readdir(DISABLED)) {
 	if ($dhost =~ /^\.*$/) { next; }
 	$dhost =~ s/\..*$//;
 	$dhost =~ s/,/\./g;
@@ -821,34 +825,41 @@
   closedir(DISABLED)
 	|| warn "Could not close the DISABLED directory handle: $!\n";
 
 SNMP: while (my($host,$community) = each(%$commdb_ref)) {
     # Make only one session
• +
     my($snmpsession,$snmperror) = Net::SNMP->session(
       -hostname => $host,
       -community => $community,
       -debug => $debug,
       -retries => $defretries,
       -timeout => $deftimeout,
       -translate => [ -timeticks => 0x0 ],
     ); # Net::SNMP->session
• +#
+# check if host is down  Butch Deal
+#
     if(grep(/$host/, at disabled) >= 1) {
 	print "$host is disabled.  Skipping.\n";
 	next SNMP;
     }
-#
-# check if host is down  Butch Deal
-#
• if ( $HOBBIT ) {
         my $string = "query ".$host.".conn";
-        my $hoststat = `$ENV{'BB'} $ENV{'BBDISP'} "$string"`;
-        if ($hoststat =~ "red") {
+        my $hoststat = `$ENV{'BB'} $ENV{'BBDISP'} "$string" `;
+        if ( length($hoststat) == 0 ) {
+	    print "$host is not in bbhost file.  Skipping.\n";
+	    next SNMP;
+	} 
+	if ($hoststat !~ "green") {
 	    print "$host is down.  Skipping.\n";
 	    next SNMP;
         }
       }
• if (! defined($snmpsession)) {
       print((caller(0))[3].": SNMP session failed for '$host':
$snmperror\n");
       next SNMP;
     }
@@ -868,15 +879,16 @@
       (my $brandnum =
substr($objectid,length($snmpoids{'enterprises'})+1)) =~ s/\..*$//;
       if (exists($enterprisenumbers{$brandnum})) {
         $enterprise = $enterprisenumbers{$brandnum};
       } else {
         print("Unknown enterprise number '$brandnum' in ObjectID
'$objectid'\n");
+        print("Unknown enterprise number '$brandnum' in ObjectID
'$objectid'\n");
         next;
       }
     } else {
       print((caller(0))[3].": SNMP get request failed for '$host':
".$snmpsession->error()."\n");
-      return;
+      next SNMP;
     }
 
     # Determine what OS version the machine is.
     my $version = undef;
     unless ($version = &detect_version($host,$snmpsession,$enterprise))
{
@@ -2882,11 +2894,11 @@
         $powercolors{$index} = 'red';
       }
     } # while (my($index,$state) = each(%statedb))
 
     # find worst color 
-    my $worstcolor = &color_compare(values(%statedb));
+    my $worstcolor = &color_compare(values(%powercolors));
 
     # compose message
     $message = "status $commahost.$test $worstcolor
".scalar(localtime)."\n\n";
     my @indices = sort { $a <=> $b } keys(%statedb);
     foreach my $index (@indices) {
@@ -3356,11 +3368,11 @@
 
     # Get disk names, skip over "snapshots" and aggregates
     # Skip trailing slashes to make it more like Unix
     if (my $result = $snmpsession->get_table(-baseoid =>
$snmpoids{'dfFileSys'})) {
       while (my($key,$value) = each(%$result)) {
-        next if $value =~ /\.snapshot$|^aggr/;
+        next if $value =~ /\/\.\.$|\.snapshot$|^aggr/;
         (my $index = $key) =~ s/^.*\.//;
         $value =~ s/\/$//;
         $disknamedb{$index} = $value;
       } # while (($key,$value) = each(%$result))
     } else {
@@ -3479,12 +3491,12 @@
 
   my $worstcolor = 'green';
   # This is where I insert any messages about specific partitions going
over their limits
   my @indices = sort { $a <=> $b } keys(%disknamedb);
   foreach my $index (@indices) {
-    my $yellowlimit = $ENV{'DFWARN'};
-    my $redlimit = $ENV{'DFPANIC'};
+    my $yellowlimit = $disk_defyellow;
+    my $redlimit = $disk_defred;
     if ((exists($diskthreshdb_ref->{$host})) &&
         (defined($diskthreshdb_ref->{$host})) &&
         (exists($diskthreshdb_ref->{$host}{$diskmntdb{$index}})) &&
         (defined($diskthreshdb_ref->{$host}{$diskmntdb{$index}}))) {
       $redlimit =
$diskthreshdb_ref->{$host}{$diskmntdb{$index}}{'red'};
@@ -3557,12 +3569,12 @@
     my $worstcolor = 'green';
 
     # This is where I insert any messages about specific partitions
going over their limits
     my @indices = sort { $a <=> $b } keys(%disknamedb);
     foreach my $index (@indices) {
-      my $yellowlimit = $ENV{'DFWARN'};
-      my $redlimit = $ENV{'DFPANIC'};
+      my $yellowlimit = $disk_defyellow;
+      my $redlimit = $disk_defred;
       if ((exists($diskthreshdb_ref->{$host})) &&
           (defined($diskthreshdb_ref->{$host})) &&
           (exists($diskthreshdb_ref->{$host}{$diskmntdb{$index}})) &&
           (defined($diskthreshdb_ref->{$host}{$diskmntdb{$index}}))) {
         $redlimit =
$diskthreshdb_ref->{$host}{$diskmntdb{$index}}{'red'};
quoted from Francesco Duranti
 
-----Original Message-----
From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid] 
Sent: Thursday, September 14, 2006 4:30 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] R: [hobbit] question on disable until ok

If you use the last bb-xsnmp it also check with hobbit query 
command to see if a host is alive but it check only if the 
host is "red" so it will not get disabled. I got some problem 
with it because if it get a error in snmp response it exit 
and don't continue to check other hosts... I've modified it 
to continue to check.. Attached is a patch with the 1.79 
version available on deadcat that check if a host exist in 
the bbhost file and if it's "conn" state is not "green" (so 
if you've disabled the conn test it will not check for snmp.
 

Da: Marco Avvisano [mailto:user-e09c0f3f8c70@xymon.invalid]
Inviato: gio 14/09/2006 14.53
A: user-ae9b8668bcde@xymon.invalid
Oggetto: Re: [hobbit] question on disable until ok

Please DO NOT remove the hobbitd_filestore.
We have quite a few lot custom scripts that use this "old 
BB-style file
interface"
Yes there are many scripts that using these files ... for 
example bb-xsnmp
if not find these files stop to make check..
so if it's possible not only to remove from the new version, 
but add it also
a in 'disable until'

best regards

Marco

list Marco Avvisano · Thu, 14 Sep 2006 17:17:47 +0200 ·
thanks a lot Francesco

Marco
quoted from Francesco Duranti

----- Original Message ----- 
From: "Francesco Duranti" <user-7104dcecbfef@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Thursday, September 14, 2006 4:46 PM
Subject: RE: [hobbit] R: [hobbit] question on disable until ok

I think the patch didn't got in .... Here it's the patch 

--- bb-xsnmp.pl.1_79 2006-09-14 16:18:55.000000000 +0200
+++ bb-xsnmp.pl 2006-05-14 00:10:48.000000000 +0200
@@ -1,6 +1,6 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl

# Monolithic SNMP gatherer for BigBrother.

# Ported to work with Hobbit which doesn't have bb-combo.sh
# Added support for quering the hobbit server to see if a conn test is
red
@@ -14,12 +14,12 @@

use strict;
use Carp;
use FileHandle;
use FindBin qw($Bin $Script);
-#use lib $ENV{'BBHOME'}."/ext/perl/";
-use lib qw(/local/packages/IT/HOBBIT/hobbit/server/ext/perl/);
+use lib $ENV{'BBHOME'}."/ext/perl/";
+#use lib qw(/local/packages/IT/HOBBIT/hobbit/server/ext/perl/);
use Net::SNMP qw(:snmp);
use vars qw($VERSION);
( $VERSION ) = '$Revision: 1.79 $' =~ /\$Revision:\s+([^\s]+)/;

my $debug = $ENV{'DEBUG'};
@@ -28,14 +28,14 @@
                         # I was not called by BigBrother.
                         # In this case, I assume I'm testing and
                         # print to stdout instead of
                         # sending to BB.

-my $defbbtmp = '/var/BB/bb/tmp';
-my $defbbhome = '/var/BB/bb';
+my $defbbtmp = '/home/hobbit/server/tmp';
+my $defbbhome = '/home/hobbit/server';
my $defbb = "$defbbhome/bin/bb";
-my $defbbdisp = 'enterprise.tigr.org';
+my $defbbdisp = 'itromlx10';
my $defmachine = 'localhost';

# For SNMP
my $defretries = 3;
my $deftimeout = 5;
@@ -331,10 +331,14 @@
  529 => 'ascend',
  789 => 'netapp',
  1991 => 'foundry',
  2021 => 'ucdavis',
  3224 => 'netscreen',
+  5624 => 'vhswitch',
+  629  => 'mrswitch',
+  52   => 'vhswitch',
+  97   => 'cabletron',
);

my %snmpsyntaxdb = (
  # .1.3.6.1.2.1.2.2.1.8
  'ifOperStatus' => {
@@ -721,11 +725,11 @@
my $compaq_pct_temp_panic = 90;

# For disk checks
my $diskthreshdb_ref = undef;
my $disk_defyellow = exists($ENV{'DFWARN'}) ? $ENV{'DFWARN'} : 90;
-my $disk_defred    = exists($ENV{'DFWARN'}) ? $ENV{'DFWARN'} : 90;
+my $disk_defred    = exists($ENV{'DFPANIC'}) ? $ENV{'DFPANIC'} : 90;

# Turn on or off depending on whether or not you have more servers
defined
# than BB can display in one page. TODO: Automate this decision.
# bindtree is the minimum necessary.
my $l4_show_realservers = 0;
@@ -806,12 +810,12 @@
  }

  # Get a list of disabled hosts
  my @disabled;
  print "$ENV{'BBVAR'}/disabled\n" if $debug;
-#  opendir(DISABLED,"$ENV{'BBVAR'}/disabled")
-  opendir(DISABLED,"/local/packages/IT/HOBBIT/hobbit/data/disabled")
+  opendir(DISABLED,"$ENV{'BBVAR'}/disabled")
+#  opendir(DISABLED,"/local/packages/IT/HOBBIT/hobbit/data/disabled")
 || warn "Could not open the disabled hosts directory: $!\n";
  while (my $dhost  = readdir(DISABLED)) {
 if ($dhost =~ /^\.*$/) { next; }
 $dhost =~ s/\..*$//;
 $dhost =~ s/,/\./g;
@@ -821,34 +825,41 @@
  closedir(DISABLED)
 || warn "Could not close the DISABLED directory handle: $!\n";

SNMP: while (my($host,$community) = each(%$commdb_ref)) {
    # Make only one session
• +
    my($snmpsession,$snmperror) = Net::SNMP->session(
      -hostname => $host,
      -community => $community,
      -debug => $debug,
      -retries => $defretries,
      -timeout => $deftimeout,
      -translate => [ -timeticks => 0x0 ],
    ); # Net::SNMP->session
• +#
+# check if host is down  Butch Deal
+#
    if(grep(/$host/, at disabled) >= 1) {
 print "$host is disabled.  Skipping.\n";
 next SNMP;
    }
-#
-# check if host is down  Butch Deal
-#
• if ( $HOBBIT ) {
        my $string = "query ".$host.".conn";
-        my $hoststat = `$ENV{'BB'} $ENV{'BBDISP'} "$string"`;
-        if ($hoststat =~ "red") {
+        my $hoststat = `$ENV{'BB'} $ENV{'BBDISP'} "$string" `;
+        if ( length($hoststat) == 0 ) {
+     print "$host is not in bbhost file.  Skipping.\n";
+     next SNMP;
+ } 
+ if ($hoststat !~ "green") {
     print "$host is down.  Skipping.\n";
     next SNMP;
        }
      }
• if (! defined($snmpsession)) {
      print((caller(0))[3].": SNMP session failed for '$host':
$snmperror\n");
      next SNMP;
    }
@@ -868,15 +879,16 @@
      (my $brandnum =
substr($objectid,length($snmpoids{'enterprises'})+1)) =~ s/\..*$//;
      if (exists($enterprisenumbers{$brandnum})) {
        $enterprise = $enterprisenumbers{$brandnum};
      } else {
        print("Unknown enterprise number '$brandnum' in ObjectID
'$objectid'\n");
+        print("Unknown enterprise number '$brandnum' in ObjectID
'$objectid'\n");
        next;
      }
    } else {
      print((caller(0))[3].": SNMP get request failed for '$host':
".$snmpsession->error()."\n");
-      return;
+      next SNMP;
    }

    # Determine what OS version the machine is.
    my $version = undef;
    unless ($version = &detect_version($host,$snmpsession,$enterprise))
{
@@ -2882,11 +2894,11 @@
        $powercolors{$index} = 'red';
      }
    } # while (my($index,$state) = each(%statedb))

    # find worst color 
-    my $worstcolor = &color_compare(values(%statedb));
+    my $worstcolor = &color_compare(values(%powercolors));

    # compose message
    $message = "status $commahost.$test $worstcolor
".scalar(localtime)."\n\n";
    my @indices = sort { $a <=> $b } keys(%statedb);
    foreach my $index (@indices) {
@@ -3356,11 +3368,11 @@

    # Get disk names, skip over "snapshots" and aggregates
    # Skip trailing slashes to make it more like Unix
    if (my $result = $snmpsession->get_table(-baseoid =>
$snmpoids{'dfFileSys'})) {
      while (my($key,$value) = each(%$result)) {
-        next if $value =~ /\.snapshot$|^aggr/;
+        next if $value =~ /\/\.\.$|\.snapshot$|^aggr/;
        (my $index = $key) =~ s/^.*\.//;
        $value =~ s/\/$//;
        $disknamedb{$index} = $value;
      } # while (($key,$value) = each(%$result))
    } else {
@@ -3479,12 +3491,12 @@

  my $worstcolor = 'green';
  # This is where I insert any messages about specific partitions going
over their limits
  my @indices = sort { $a <=> $b } keys(%disknamedb);
  foreach my $index (@indices) {
-    my $yellowlimit = $ENV{'DFWARN'};
-    my $redlimit = $ENV{'DFPANIC'};
+    my $yellowlimit = $disk_defyellow;
+    my $redlimit = $disk_defred;
    if ((exists($diskthreshdb_ref->{$host})) &&
        (defined($diskthreshdb_ref->{$host})) &&
        (exists($diskthreshdb_ref->{$host}{$diskmntdb{$index}})) &&
        (defined($diskthreshdb_ref->{$host}{$diskmntdb{$index}}))) {
      $redlimit =
$diskthreshdb_ref->{$host}{$diskmntdb{$index}}{'red'};
@@ -3557,12 +3569,12 @@
    my $worstcolor = 'green';

    # This is where I insert any messages about specific partitions
going over their limits
    my @indices = sort { $a <=> $b } keys(%disknamedb);
    foreach my $index (@indices) {
-      my $yellowlimit = $ENV{'DFWARN'};
-      my $redlimit = $ENV{'DFPANIC'};
+      my $yellowlimit = $disk_defyellow;
+      my $redlimit = $disk_defred;
      if ((exists($diskthreshdb_ref->{$host})) &&
          (defined($diskthreshdb_ref->{$host})) &&
          (exists($diskthreshdb_ref->{$host}{$diskmntdb{$index}})) &&
          (defined($diskthreshdb_ref->{$host}{$diskmntdb{$index}}))) {
        $redlimit =
$diskthreshdb_ref->{$host}{$diskmntdb{$index}}{'red'};

-----Original Message-----
From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid] 
Sent: Thursday, September 14, 2006 4:30 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] R: [hobbit] question on disable until ok

If you use the last bb-xsnmp it also check with hobbit query 
command to see if a host is alive but it check only if the 
host is "red" so it will not get disabled. I got some problem 
with it because if it get a error in snmp response it exit 
and don't continue to check other hosts... I've modified it 
to continue to check.. Attached is a patch with the 1.79 
version available on deadcat that check if a host exist in 
the bbhost file and if it's "conn" state is not "green" (so 
if you've disabled the conn test it will not check for snmp.
 

Da: Marco Avvisano [mailto:user-e09c0f3f8c70@xymon.invalid]
Inviato: gio 14/09/2006 14.53
A: user-ae9b8668bcde@xymon.invalid
Oggetto: Re: [hobbit] question on disable until ok

Please DO NOT remove the hobbitd_filestore.
We have quite a few lot custom scripts that use this "old 
BB-style file
interface"
Yes there are many scripts that using these files ... for 
example bb-xsnmp
if not find these files stop to make check..
so if it's possible not only to remove from the new version, 
but add it also
a in 'disable until'

best regards

Marco