Disable of http Test
list James Wade
Hello All, We do a lot of application deploys here which brings down the http server. Of course users don't call-in to disable the hobbit server. I was wondering is there a way to disable a test via the command line from another server, so that I can add the hobbit disable of http test during a deploy of applications. I then want to script re-enabling it at the end of the deploy script. Thanks..James James Wade
list Johann Eggers
Good question... I've just tried this on the hobbit server Disabling: bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" Enabling: bin/bbcmd bin/bb 127.0.0.1 "enable foo.conn" and it works -Johann-
▸
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Donnerstag, 4. Oktober 2007 18:17
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Disable of http Test
Hello All,
We do a lot of application deploys here which brings
down the http server. Of course users don't call-in
to disable the hobbit server.
I was wondering is there a way to disable a test via
the command line from another server, so that I can
add the hobbit disable of http test during a deploy
of applications.
I then want to script re-enabling it at the end of the
deploy script.
Thanks....James
James Wade
list Josh Luthman
Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes? Josh
▸
On 10/4/07, Johann Eggers <user-769b09132207@xymon.invalid> wrote:Good question… I've just tried this on the hobbit server Disabling: bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" Enabling: bin/bbcmd bin/bb 127.0.0.1 "enable foo.conn" and it works -Johann- *From:* James Wade [mailto:user-659655b2ea05@xymon.invalid] *Sent:* Donnerstag, 4. Oktober 2007 18:17 *To:* user-ae9b8668bcde@xymon.invalid *Subject:* [hobbit] Disable of http Test Hello All, We do a lot of application deploys here which brings down the http server. Of course users don't call-in to disable the hobbit server. I was wondering is there a way to disable a test via the command line from another server, so that I can add the hobbit disable of http test during a deploy of applications. I then want to script re-enabling it at the end of the deploy script. Thanks….James James Wade
--
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 Ralph Mitchell
▸
On 10/4/07, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes?
According to the bb man page, that's minutes.
Ralph Mitchell
list Tom Georgoulias
▸
Josh Luthman wrote:
Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes?
Minutes. To run that command from a remote server and not on the hobbit server, you would need to use $BBDISP instead of 127.0.0.1. Tom
list James Wade
What about disable until O.K.? I looked at the manpage and didn't see it. Thanks....James
▸
-----Original Message-----
From: Tom Georgoulias [mailto:user-6a0b8b0f0ae1@xymon.invalid]
Sent: Thursday, October 04, 2007 11:54 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Disable of http Test
Josh Luthman wrote:Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes?
Minutes. To run that command from a remote server and not on the hobbit server, you would need to use $BBDISP instead of 127.0.0.1. Tom
list Ralph Mitchell
▸
On 10/4/07, James Wade <user-659655b2ea05@xymon.invalid> wrote:
What about disable until O.K.? I looked at the manpage and didn't see it.
I think you use a value of -1 to do "until OK". Ralph Mitchell
list James Wade
Hey, I'm having problems scripting the disable. I'm using ksh. Here's what I'm doing: $HOBBIT_HOME/bin/bb 198.168.0.222 "\"disable $machine.http -1 Running Deployment of from $FROM_STREAM to $TO_STREAM\"" Here's the debug output: + machine=server1 + HOBBIT_HOME=/home/hobbit/client + FROM_STREAM=TEST1 + TO_STREAM=TEST2 + /home/hobbit/client/bin/bb 198.168.0.222 "disable tiers_trnprd6.http -1 Running Deployment from TEST1 to TEST2" It doesn't work. Now if I grab the bottom line using cut and paste, and execute it on the line manually, it works just fine. I know it's the way you have to put the disable in double quotes, but I can't seem to get it to work. Any help would be appreciated. Thanks..James
▸
-----Original Message-----
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Thursday, October 04, 2007 1:05 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Disable of http Test
What about disable until O.K.?
I looked at the manpage and didn't see it.
Thanks....James
-----Original Message-----
From: Tom Georgoulias [mailto:user-6a0b8b0f0ae1@xymon.invalid]
Sent: Thursday, October 04, 2007 11:54 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Disable of http Test
Josh Luthman wrote:Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes?
Minutes. To run that command from a remote server and not on the hobbit server, you would need to use $BBDISP instead of 127.0.0.1. Tom
list Galen Johnson
I think you just need to remove the outer quotes...
▸
$HOBBIT_HOME/bin/bb 198.168.0.222 \"disable $machine.http -1 Running
Deployment of from $FROM_STREAM to $TO_STREAM\"
=G=
▸
-----Original Message-----
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Friday, October 05, 2007 4:45 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Disable of http Test
Hey,
I'm having problems scripting the disable.
I'm using ksh. Here's what I'm doing:
$HOBBIT_HOME/bin/bb 198.168.0.222 "\"disable $machine.http -1 Running
Deployment of from $FROM_STREAM to $TO_STREAM\""
Here's the debug output:
+ machine=server1
+ HOBBIT_HOME=/home/hobbit/client
+ FROM_STREAM=TEST1
+ TO_STREAM=TEST2
+ /home/hobbit/client/bin/bb 198.168.0.222 "disable tiers_trnprd6.http
-1
Running Deployment from TEST1 to TEST2"
It doesn't work. Now if I grab the bottom line using cut and paste, and
execute it on the line manually, it works just fine.
I know it's the way you have to put the disable in double quotes, but I
can't seem to get it to work.
Any help would be appreciated.
Thanks..James
-----Original Message-----
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Thursday, October 04, 2007 1:05 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Disable of http Test
What about disable until O.K.?
I looked at the manpage and didn't see it.
Thanks....James
-----Original Message-----
From: Tom Georgoulias [mailto:user-6a0b8b0f0ae1@xymon.invalid]
Sent: Thursday, October 04, 2007 11:54 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Disable of http Test
Josh Luthman wrote:Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes?
Minutes. To run that command from a remote server and not on the hobbit server, you would need to use $BBDISP instead of 127.0.0.1. Tom
list Charles Jones
Also be aware that I believe Hobbit by default will not accept commands from remote hosts, only status updates. To enable a remote host to send commands, see the --admin-senders option of hobbitlaunch.cfg. Don't forget to restart hobbit to enable the change. -Charles
list Josh Luthman
I'm with Galen on this one. Almost every time I encounter or see a situation where you can copy/paste a command into the shell but it doesn't work in a script using the same shell it tends to be some sort of formatting issue (in this case, quotes).
▸
On 10/5/07, Charles Jones <user-e86b4aeade4e@xymon.invalid> wrote:Also be aware that I believe Hobbit by default will not accept commands from remote hosts, only status updates. To enable a remote host to send commands, see the --admin-senders option of hobbitlaunch.cfg. Don't forget to restart hobbit to enable the change. -Charles
-- 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 James Wade
Hi Galen, I tried that but it didn't work. I finally got it to work. I looked at some of the other scripts and did the same thing they were doing: STATUS="disable $machine.http -1 Running Deployment of from $FROM_STREAM to $TO_STREAM" $HOBBIT_HOME/bin/bb 198.168.0.222 "$STATUS" This worked fine. James
▸
-----Original Message-----
From: Galen Johnson [mailto:user-87f955643e3d@xymon.invalid]
Sent: Friday, October 05, 2007 3:59 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Disable of http Test
I think you just need to remove the outer quotes...
$HOBBIT_HOME/bin/bb 198.168.0.222 \"disable $machine.http -1 Running
Deployment of from $FROM_STREAM to $TO_STREAM\"
=G=
-----Original Message-----
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Friday, October 05, 2007 4:45 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Disable of http Test
Hey,
I'm having problems scripting the disable.
I'm using ksh. Here's what I'm doing:
$HOBBIT_HOME/bin/bb 198.168.0.222 "\"disable $machine.http -1 Running
Deployment of from $FROM_STREAM to $TO_STREAM\""
Here's the debug output:
+ machine=server1
+ HOBBIT_HOME=/home/hobbit/client
+ FROM_STREAM=TEST1
+ TO_STREAM=TEST2
+ /home/hobbit/client/bin/bb 198.168.0.222 "disable tiers_trnprd6.http
-1
Running Deployment from TEST1 to TEST2"
It doesn't work. Now if I grab the bottom line using cut and paste, and
execute it on the line manually, it works just fine.
I know it's the way you have to put the disable in double quotes, but I
can't seem to get it to work.
Any help would be appreciated.
Thanks..James
-----Original Message-----
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Thursday, October 04, 2007 1:05 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Disable of http Test
What about disable until O.K.?
I looked at the manpage and didn't see it.
Thanks....James
-----Original Message-----
From: Tom Georgoulias [mailto:user-6a0b8b0f0ae1@xymon.invalid]
Sent: Thursday, October 04, 2007 11:54 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Disable of http Test
Josh Luthman wrote:Just to clarify this, is this command /home/shire/server/bin/bbcmd bin/bb 127.0.0.1 "disable foo.conn 60" then? Is the 60 in seconds or minutes?
Minutes. To run that command from a remote server and not on the hobbit server, you would need to use $BBDISP instead of 127.0.0.1. Tom
list Charles Jones
MSG="disable $MACHINE.http -1 Running Deployment from $FROM_STREAM to $TO_STREAM" $BB $BBDISP "$MSG" BB, BBDISP, and MACHINE are already set for you by Hobbit (to test use the "bbcmd" shell). I used MSG because STATUS seemed a bit confusing as there is a "status" message type. -Charles
▸
James Wade wrote:Hi Galen, I tried that but it didn't work. I finally got it to work. I looked at some of the other scripts and did the same thing they were doing: STATUS="disable $machine.http -1 Running Deployment of from $FROM_STREAM to $TO_STREAM" $HOBBIT_HOME/bin/bb 198.168.0.222 "$STATUS" This worked fine. James