Hi,
  I'm trying to create a Command in the Event Manager that will restart
a webserver if it goes down.  I can't figure out how to get the device
name incorporated into the command.  I've tried:

1)  {{{ ssh $device sudo /etc/init.d/httpd restart }}}
2)  {{{ ssh ${device} sudo /etc/init.d/httpd restart }}}
3)  ssh $device sudo /etc/init.d/httpd restart
4)  ssh ${device} sudo /etc/init.d/httpd restart

Each of those returned an error:

2007-03-17 17:34:31 ERROR zen.ZenActions: Error running command httpdCheck
Traceback (most recent call last):
  File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 324, in runEventComm
and
    res = compiled(getEngine().getContext(environ))
  File "/opt/zenoss/lib/python/Products/PageTemplates/Expressions.py", line 224,
 in __call__
    v = var(econtext)
  File "/opt/zenoss/lib/python/Products/PageTemplates/Expressions.py", line 185,
 in __call__
    return self._eval(econtext)
  File "/opt/zenoss/lib/python/Products/PageTemplates/Expressions.py", line 173,
 in _eval
    ob = self._subexprs[-1](econtext)
  File "/opt/zenoss/lib/python/Products/PageTemplates/Expressions.py", line 123,
 in _eval
    ob = vars[base]
KeyError: 'device'


Help?

...thnx,
...dave
-- 
Dave Alden
The Ohio State University
Department of Mathematics
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to