[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Why BBSVCNAME,BBHOSTSVC invalid in my alert script?
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Why BBSVCNAME,BBHOSTSVC invalid in my alert script?
- From: Daniel Bourque <dbourque (at) weatherdata.com>
- Date: Wed, 20 Jun 2007 11:47:33 -0500
- References: <001401c7b332$f8330b60$661fa8c0 (at) cici>
- User-agent: Mozilla Thunderbird 1.0.7 (X11/20051011)
In your script, do a "set > /tmp/foo" . When hobbit runs the script,
look at /tmp/foo you'll see all the environment variables used by
hobbit. lots of stuff, you'll see the ones you're looking for.
-Dan
>
> SCRIPT /home/hobbit/server/etc/alert-svcs.sh cici
> Some environment variables,e.g,BBSVCNAME,BBHOSTSVC are used in alert
> script,
> but they actually weren't shown as specific service or process that
> triggered the alert while the service or process reached down, just
> generic string procs.
> alert-svcs.sh
> #!/bin/sh
> echo "$BBHOSTSVC reached error state" |write hobbit
> echo "$BBSVCNAME reached error state" |write hobbit
> The result displayed as below:
> Message from hobbit (at) my_linux <mailto:hobbit (at) my_linux> on <no tty> at
> 22:21 ...
> cici.procs reached error state
> EOF
> Message from hobbit (at) my_linux <mailto:hobbit (at) my_linux> on <no tty> at
> 22:21 ...
> procs reached error state
> EOF
>
> Thanks a lot.
> Regards,
> Case