[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: "case" <casedj (at) 21cn.com>
- Date: Thu, 21 Jun 2007 15:05:28 +0800
- Hmm_attache_num: 0000
- Hmm_source_ip: 10.27.2.4:57174.520535948
- Hmm_source_type: SMTP
- References: <001401c7b332$f8330b60$661fa8c0 (at) cici> <20070620134343.GA10732 (at) hswn.dk>
Hi Henrik and Daniel,
Thanks for support.
Mail message would include specific information about related process or
service' name if we use MAIL in hobbit-alerts.cfg, e.g. "&red Cisco
Systems, Inc. VPN Service - Stopped".
How can we display similar messages in alert script while a process or
service triggers the alert?
Thanks a lot.
Regards,
Case
----- Original Message -----
From: "Henrik Stoerner" <henrik (at) hswn.dk>
To: <hobbit (at) hswn.dk>
Sent: Wednesday, June 20, 2007 9:43 PM
Subject: Re: [hobbit] Why BBSVCNAME,BBHOSTSVC invalid in my alert script?
On Wed, Jun 20, 2007 at 08:03:06PM +0800, casedj wrote:
Hobbit 4.2.0 on RHEL4, BB client 1.08d on Windows XP cici.
hobbit-alerts.cfg:
HOST=cici SERVICE=procs,svcs
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 on <no tty> at 22:21 ...
cici.procs reached error state
EOF
Actually, that's exactly as it should be. BBHOSTSVC contains the
hostname "cici" AND the servicename "procs", joined together with a
dot. So an alert from hosts cici for the procs column has
BBHOSTSVC=cici.procs
BBSVCNAME is the service name, "procs" in this case:
Message from hobbit (at) my_linux on <no tty> at 22:21 ...
procs reached error state
EOF
which is what you also get.
If you want just the hostname, use BBHOSTNAME. See the hobbit-alerts.cfg
man page for a listing of what the various variables contain.
Regards,
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk
----- Original Message -----
From: "Henrik Stoerner" <henrik (at) hswn.dk>
To: <hobbit (at) hswn.dk>
Sent: Wednesday, June 20, 2007 9:43 PM
Subject: Re: [hobbit] Why BBSVCNAME,BBHOSTSVC invalid in my alert script?
On Wed, Jun 20, 2007 at 08:03:06PM +0800, casedj wrote:
Hobbit 4.2.0 on RHEL4, BB client 1.08d on Windows XP cici.
hobbit-alerts.cfg:
HOST=cici SERVICE=procs,svcs
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 on <no tty> at 22:21 ...
cici.procs reached error state
EOF
Actually, that's exactly as it should be. BBHOSTSVC contains the
hostname "cici" AND the servicename "procs", joined together with a
dot. So an alert from hosts cici for the procs column has
BBHOSTSVC=cici.procs
BBSVCNAME is the service name, "procs" in this case:
Message from hobbit (at) my_linux on <no tty> at 22:21 ...
procs reached error state
EOF
which is what you also get.
If you want just the hostname, use BBHOSTNAME. See the hobbit-alerts.cfg
man page for a listing of what the various variables contain.
Regards,
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk