<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=GB2312" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
-Dan<br>
<br>
<blockquote cite="mid001401c7b332$f8330b60$661fa8c0@cici" type="cite">
  <div><br>
          SCRIPT /home/hobbit/server/etc/alert-svcs.sh  cici </div>
  <div> </div>
  <div> Some environment variables,e.g,BBSVCNAME,BBHOSTSVC are used in
alert script,<br>
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. </div>
  <div> </div>
  <div> alert-svcs.sh <br>
#!/bin/sh<br>
echo "$BBHOSTSVC   reached error  state" |write hobbit<br>
echo "$BBSVCNAME   reached error  state" |write hobbit<br>
  </div>
  <div> </div>
  <div> The result displayed as below: </div>
  <div> </div>
  <div> Message from <a href="mailto:hobbit@my_linux">hobbit@my_linux</a>
on <no tty> at 22:21 ...<br>
cici.procs   reached error  state<br>
EOF </div>
  <div> </div>
  <div> Message from <a href="mailto:hobbit@my_linux">hobbit@my_linux</a>
on <no tty> at 22:21 ...<br>
procs   reached error  state<br>
EOF </div>
  <div> </div>
  <div> <br>
Thanks a lot. </div>
  <div>   </div>
  <div> Regards,<br>
Case<br>
  </div>
</blockquote>
</body>
</html>