Xymon Mailing List Archive search

problem with CLASS definition

11 messages in this thread

list Charles Jones · Fri, 05 Oct 2007 16:21:53 -0700 ·
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
    PROC "someproc"
    PROC "/some/other/proc"
....
DEFAULT
    PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?

Thanks,
-Charles
list Charles Jones · Wed, 10 Oct 2007 11:00:40 -0700 ·
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles
quoted from Charles Jones

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?
list Charles Jones · Wed, 10 Oct 2007 11:18:41 -0700 ·
I did some poking around, and as far as I can tell, the problem is due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
                CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles
quoted from Charles Jones


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?
list Charles Jones · Wed, 10 Oct 2007 11:48:44 -0700 ·
I also just discovered that CONFIGCLASS gets converted to lowercase (which I should have seen plain as day in the sed command). However this is not the problem as the CONFIGCLASS in the client message is still using the default value of BBOSTYPE.  I'm currently attempting to hack in a work around.

-Charles
quoted from Charles Jones

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?
list Charles Jones · Wed, 10 Oct 2007 12:00:08 -0700 ·
Okay I came up with a workaround. The problem is that CONFIGCLASS gets reset to a default value (in hobbitclient.cfg). So, I created another variable, "CLASS". I then made a small mod to hobbitclient.sh that checks to see if CLASS got set to something, and if it did, it sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
                ;;
          --class=*)
                CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that doesn't get reset
                ;;
          --help)
                echo "Usage: $0 [--hostname=CLIENTNAME] [--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@
  MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"
 -export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS CLASS
  case "$CMD" in
   "start")
@@ -128,6 +129,5 @@
        break;
  esac
• exit 0


--- hobbitclient.sh     2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@
        echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >> $MSGTMPFILE
 fi
 +if [ -n "$CLASS" ]; then #If CLASS was set to something, override the default
+   CONFIGCLASS=$CLASS
+fi
 echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
 $BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
 # logfiles
quoted from Charles Jones


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to lowercase (which I should have seen plain as day in the sed command). However this is not the problem as the CONFIGCLASS in the client message is still using the default value of BBOSTYPE.  I'm currently attempting to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?
list Charles Jones · Tue, 16 Oct 2007 16:14:01 -0700 ·
Henrik,

Just making sure that you saw this bug that I found, and hopefully implement a fix (I'm sure you have a more elegant way to fix it than I did) for Hobbit 4.3 
-Charles
quoted from Charles Jones

Charles Jones wrote:
Okay I came up with a workaround. The problem is that CONFIGCLASS gets reset to a default value (in hobbitclient.cfg). So, I created another variable, "CLASS". I then made a small mod to hobbitclient.sh that checks to see if CLASS got set to something, and if it did, it sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
               ;;
         --class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that doesn't get reset
               ;;
         --help)
               echo "Usage: $0 [--hostname=CLIENTNAME] [--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@

MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"

-export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS CLASS

case "$CMD" in
  "start")
@@ -128,6 +129,5 @@
       break;

esac
• exit 0


--- hobbitclient.sh     2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@
       echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >> $MSGTMPFILE
fi

+if [ -n "$CLASS" ]; then #If CLASS was set to something, override the default
+   CONFIGCLASS=$CLASS
+fi
echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
# logfiles


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to lowercase (which I should have seen plain as day in the sed command). However this is not the problem as the CONFIGCLASS in the client message is still using the default value of BBOSTYPE.  I'm currently attempting to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?
list Charles Jones · Wed, 31 Oct 2007 10:56:41 -0700 ·
I don't want this to fall through the cracks, so I'm going to keep bumping it until Henrik sees it :)

-Charles
quoted from Charles Jones

Charles Jones wrote:
Henrik,

Just making sure that you saw this bug that I found, and hopefully implement a fix (I'm sure you have a more elegant way to fix it than I did) for Hobbit 4.3
-Charles

Charles Jones wrote:
Okay I came up with a workaround. The problem is that CONFIGCLASS gets reset to a default value (in hobbitclient.cfg). So, I created another variable, "CLASS". I then made a small mod to hobbitclient.sh that checks to see if CLASS got set to something, and if it did, it sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
               ;;
         --class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that doesn't get reset
               ;;
         --help)
               echo "Usage: $0 [--hostname=CLIENTNAME] [--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@

MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"

-export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS CLASS

case "$CMD" in
  "start")
@@ -128,6 +129,5 @@
       break;

esac
• exit 0


--- hobbitclient.sh     2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@
       echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >> $MSGTMPFILE
fi

+if [ -n "$CLASS" ]; then #If CLASS was set to something, override the default
+   CONFIGCLASS=$CLASS
+fi
echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
# logfiles


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to lowercase (which I should have seen plain as day in the sed command). However this is not the problem as the CONFIGCLASS in the client message is still using the default value of BBOSTYPE.  I'm currently attempting to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?
list Josh Luthman · Wed, 31 Oct 2007 15:00:56 -0400 ·
*Psst*

http://sourceforge.net/tracker/?group_id=128058&atid=710488
quoted from Charles Jones

On 10/31/07, Charles Jones <user-e86b4aeade4e@xymon.invalid> wrote:
I don't want this to fall through the cracks, so I'm going to keep
bumping it until Henrik sees it :)

-Charles

Charles Jones wrote:
Henrik,

Just making sure that you saw this bug that I found, and hopefully
implement a fix (I'm sure you have a more elegant way to fix it than I
did) for Hobbit 4.3
-Charles

Charles Jones wrote:
Okay I came up with a workaround. The problem is that CONFIGCLASS
gets reset to a default value (in hobbitclient.cfg). So, I created
another variable, "CLASS". I then made a small mod to hobbitclient.sh
that checks to see if CLASS got set to something, and if it did, it
sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
               ;;
         --class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr
'[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that doesn't get
reset
               ;;
         --help)
               echo "Usage: $0 [--hostname=CLIENTNAME]
[--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@

MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"

-export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS CLASS

case "$CMD" in
  "start")
@@ -128,6 +129,5 @@
       break;

esac
• exit 0


--- hobbitclient.sh     2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@
       echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >>
$MSGTMPFILE
fi

+if [ -n "$CLASS" ]; then #If CLASS was set to something, override
the default
+   CONFIGCLASS=$CLASS
+fi
echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
# logfiles


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to lowercase
(which I should have seen plain as day in the sed command). However
this is not the problem as the CONFIGCLASS in the client message is
still using the default value of BBOSTYPE.  I'm currently attempting
to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is
due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr
'[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default
configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the
client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE
$CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that
CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water
without this working as it should.  I tried emailing Henrik as
well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh
--class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something
similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked
on the host.  The expected behavior is that the CLASS would be
used and other other procs checked instead. I know this has
nothing to do with the DEFAULT setting, as using HOST=hostname
works fine. I just cant get it to check the procs by CLASS.  Is
there any way to debug this?  Shouldn't the CLASS show up in the
"info" section?  Do I need to put the class name in quotes on the
command line?
-- 

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Charles Jones · Wed, 31 Oct 2007 13:30:31 -0700 ·
Thanks for the info Josh. Is that the official place we are supposed to 
report bugs and submit patches? Since I see open bugs there that are 
literally years old, and assigned to "nobody", I'm not that confident 
that's the proper place.

-Charles

Josh Luthman wrote:
*Psst*

http://sourceforge.net/tracker/?group_id=128058&atid=710488 
quoted from Josh Luthman
<http://sourceforge.net/tracker/?group_id=128058&atid=710488>;

On 10/31/07, * Charles Jones* <user-e86b4aeade4e@xymon.invalid 
<mailto:user-e86b4aeade4e@xymon.invalid>> wrote:

    I don't want this to fall through the cracks, so I'm going to keep
    bumping it until Henrik sees it :)

    -Charles

    Charles Jones wrote:
Henrik,

Just making sure that you saw this bug that I found, and hopefully
implement a fix (I'm sure you have a more elegant way to fix it
    than I
did) for Hobbit 4.3
-Charles

Charles Jones wrote:
Okay I came up with a workaround. The problem is that CONFIGCLASS
gets reset to a default value (in hobbitclient.cfg). So, I created
another variable, "CLASS". I then made a small mod to
    hobbitclient.sh
that checks to see if CLASS got set to something, and if it
    did, it
sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
               ;;
         --class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr
'[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that
    doesn't get
reset
               ;;
         --help)
               echo "Usage: $0 [--hostname=CLIENTNAME]
[--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@

MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"

-export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS CLASS

case "$CMD" in
  "start")
@@ -128,6 +129,5 @@
       break;

esac
• exit 0


--- hobbitclient.sh      2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@
       echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >>
$MSGTMPFILE
fi

+if [ -n "$CLASS" ]; then #If CLASS was set to something, override
the default
+   CONFIGCLASS=$CLASS
+fi
echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
# logfiles


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to
    lowercase
(which I should have seen plain as day in the sed command).
    However
this is not the problem as the CONFIGCLASS in the client
    message is
still using the default value of BBOSTYPE.  I'm currently
    attempting
to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the
    problem is
due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//'
    | tr
'[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default
configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the
client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE
$CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that
CONFIGCLASS  is being set to "linux" instead of the specified
    class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the
    water
without this working as it should.  I tried emailing Henrik as
well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh
--class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something
similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being
    checked
on the host.  The expected behavior is that the CLASS would be
used and other other procs checked instead. I know this has
nothing to do with the DEFAULT setting, as using HOST=hostname
works fine. I just cant get it to check the procs by CLASS.  Is
there any way to debug this?  Shouldn't the CLASS show up
    in the
"info" section?  Do I need to put the class name in quotes
    on the
command line?
list Josh Luthman · Wed, 31 Oct 2007 22:11:59 -0400 ·
I don't know for sure.  Other projects are always using the SF bug tracker,
so I assumed that Henrik used this one.  I couldn't find anything on the
project page for either the Shire or Hobbitmon.

How about it, Henrik =)

Josh
quoted from Charles Jones

On 10/31/07, Charles Jones <user-e86b4aeade4e@xymon.invalid> wrote:
 Thanks for the info Josh. Is that the official place we are supposed to
report bugs and submit patches? Since I see open bugs there that are
literally years old, and assigned to "nobody", I'm not that confident that's
the proper place.

-Charles

Josh Luthman wrote:

*Psst*

http://sourceforge.net/tracker/?group_id=128058&atid=710488

On 10/31/07, Charles Jones <user-e86b4aeade4e@xymon.invalid> wrote:
I don't want this to fall through the cracks, so I'm going to keep
bumping it until Henrik sees it :)

-Charles

Charles Jones wrote:
Henrik,

Just making sure that you saw this bug that I found, and hopefully
implement a fix (I'm sure you have a more elegant way to fix it than I
did) for Hobbit 4.3
-Charles

Charles Jones wrote:
Okay I came up with a workaround. The problem is that CONFIGCLASS
gets reset to a default value (in hobbitclient.cfg). So, I created
another variable, "CLASS". I then made a small mod to hobbitclient.sh
that checks to see if CLASS got set to something, and if it did, it
sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
               ;;
         --class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr
'[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that doesn't get
reset
               ;;
         --help)
               echo "Usage: $0 [--hostname=CLIENTNAME]
[--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@

MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"

-export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS CLASS

case "$CMD" in
  "start")
@@ -128,6 +129,5 @@
       break;

esac
• exit 0


--- hobbitclient.sh      2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@

       echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE"<@@client#1%7C0%7C127.0.0.1%7C$MACHINEDOTS%7C$BBOSTYPE>>>
quoted from Charles Jones
$MSGTMPFILE
fi

+if [ -n "$CLASS" ]; then #If CLASS was set to something, override
the default
+   CONFIGCLASS=$CLASS
+fi
echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
# logfiles


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to lowercase
(which I should have seen plain as day in the sed command). However
this is not the problem as the CONFIGCLASS in the client message is
still using the default value of BBOSTYPE.  I'm currently attempting
to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is
due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr
'[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME
CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default
configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the
client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE
$CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that
CONFIGCLASS  is being set to "linux" instead of the specified
class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water
without this working as it should.  I tried emailing Henrik as
well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh
--class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something
similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked
on the host.  The expected behavior is that the CLASS would be
used and other other procs checked instead. I know this has
nothing to do with the DEFAULT setting, as using HOST=hostname
works fine. I just cant get it to check the procs by CLASS.  Is
there any way to debug this?  Shouldn't the CLASS show up in the
"info" section?  Do I need to put the class name in quotes on the
command line?
-- 
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Charles Jones · Wed, 07 Nov 2007 16:13:29 -0700 ·
It looks like Henrik is back now, so one last bump :)
signature
I don't want this to fall through the cracks, so I'm going to keep bumping it until Henrik sees it :)

-Charles

quoted from Charles Jones
Charles Jones wrote:
Henrik,

Just making sure that you saw this bug that I found, and hopefully implement a fix (I'm sure you have a more elegant way to fix it than I did) for Hobbit 4.3
-Charles

Charles Jones wrote:
Okay I came up with a workaround. The problem is that CONFIGCLASS gets reset to a default value (in hobbitclient.cfg). So, I created another variable, "CLASS". I then made a small mod to hobbitclient.sh that checks to see if CLASS got set to something, and if it did, it sets CONFIGCLASS to that value.  Here are the changes:

--- runclient.sh        2006-08-09 20:09:58.000000000 +0000
+++ /tmp/runclient.sh   2007-10-10 18:55:00.000000000 +0000
@@ -32,6 +32,7 @@
               ;;
         --class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"
+                CLASS=$CONFIGCLASS # Use a variable that doesn't get reset
               ;;
         --help)
               echo "Usage: $0 [--hostname=CLIENTNAME] [--os=rhel3|linux22] [--class=CLASSNAME] start|stop
"
@@ -61,7 +62,7 @@

MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"

-export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS
+export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS CLASS

case "$CMD" in
  "start")
@@ -128,6 +129,5 @@
       break;

esac
• exit 0


--- hobbitclient.sh     2006-08-09 20:09:58.000000000 +0000
+++ /tmp/hobbitclient.sh        2007-10-10 18:55:28.000000000 +0000
@@ -48,6 +48,9 @@
       echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >> $MSGTMPFILE
fi

+if [ -n "$CLASS" ]; then #If CLASS was set to something, override the default
+   CONFIGCLASS=$CLASS
+fi
echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE
$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE
# logfiles


Charles Jones wrote:
I also just discovered that CONFIGCLASS gets converted to lowercase (which I should have seen plain as day in the sed command). However this is not the problem as the CONFIGCLASS in the client message is still using the default value of BBOSTYPE.  I'm currently attempting to hack in a work around.

-Charles

Charles Jones wrote:
I did some poking around, and as far as I can tell, the problem is due to hobbitclient.cfg overriding the CONFIGCLASS variable.
Here are some snippets from runclient.sh:

--class=*)
               CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`"

export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS

hobbitclient.cfg contains this:
./hobbitclient.cfg:CONFIGCLASS="$BBOSTYPE"         # Default configuration class for logfiles

hobbitclient.sh uses the CONFIGCLASS variable when sending the client message:
./bin/hobbitclient.sh:echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS"  >>  $MSGTMPFILE

Heres the actual client message header Im sending (not that CONFIGCLASS  is being set to "linux" instead of the specified class:
client host-app-23.linux linux

-Charles


Charles Jones wrote:
Anyone have any thoughts on this? I'm currently dead in the water without this working as it should.  I tried emailing Henrik as well but I'm sure he is too busy to reply.

-Charles

Charles Jones wrote:
I have a host whose client was started via: "./runclient.sh --class=APP_PRIMARY start"

In the hobbit servers hobbit-clients.cfg, I have something similar to:

CLASS=APP_PRIMARY
   PROC "someproc"
   PROC "/some/other/proc"
....
DEFAULT
   PROC sshd

The problem is that only the default proc "sshd" is being checked on the host.  The expected behavior is that the CLASS would be used and other other procs checked instead. I know this has nothing to do with the DEFAULT setting, as using HOST=hostname works fine. I just cant get it to check the procs by CLASS.  Is there any way to debug this?  Shouldn't the CLASS show up in the "info" section?  Do I need to put the class name in quotes on the command line?