[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why BBSVCNAME,BBHOSTSVC invalid in my alert script?
- To: <hobbit (at) hswn.dk>
- Subject: Why BBSVCNAME,BBHOSTSVC invalid in my alert script?
- From: "casedj" <casedj (at) 21cn.com>
- Date: Wed, 20 Jun 2007 20:03:06 +0800
- Hmm_attache_num: 0000
- Hmm_source_ip: 10.27.2.3:33207.1456298163
- Hmm_source_type: SMTP
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
Message from hobbit (at) my_linux on <no tty> at 22:21 ...
procs reached error state
EOF
Thanks a lot.
Regards,
Case