Hi guys!
We needed to monitor a java process so we have created a shell script that connect via ssh to server and get the status process. We made this because Zenoss truncate process name to "n" character so we could not monitor that process.
After several tryed we found that sometimes, random, we got this error ( below an extract of zencommand debug logging ):
2013-04-02 17:54:34,676 DEBUG zen.SshClient: 10.134.97.213 channel 1 Opening command channel for $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213
2013-04-02 17:54:34,719 DEBUG zen.SshClient: 10.134.97.213 channel 1 CommandChannel exit code for $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 is 126: Command invoked cannot execute, permissions problem or command is not an executable
2013-04-02 17:54:34,719 WARNING zen.SshClient: 10.134.97.213 channel 1 The command $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 returned stderr data (1) from the device: bash: /opt/zenoss/libexec/check_ps_extended.sh: Permission denied
2013-04-02 17:54:34,719 DEBUG zen.SshClient: Unable to send event for {'severity': 4, 'component': 'zencommand', 'agent': 'zencommand', 'summary': 'The command $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 returned stderr data (1) from the device: bash: /opt/zenoss/libexec/check_ps_extended.sh: Permission denied\n', 'device': '10.134.97.213', 'eventClass': '/Cmd/Fail'}
2013-04-02 17:54:34,720 DEBUG zen.SshClient: 10.134.97.213 channel 0 SshConnection closing
2013-04-02 17:54:34,720 DEBUG zen.SshClient: 10.134.97.213 channel 1 CommandChannel closing command channel for command $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 with data: ''
2013-04-02 17:54:34,720 DEBUG zen.zencommand: Process PS_EXTENDED_TEMPLATE/check_process_custom stopped (126), 0.13 seconds elapsed
2013-04-02 17:54:34,721 DEBUG zen.collector.scheduler: Task 10.134.97.213 60 Remote changing state from FETCH_DATA to PARSING_DATA
2013-04-02 17:54:34,721 WARNING zen.zencommand: 10.134.97.213 60 Remote PS_EXTENDED_TEMPLATE/check_process_custom No data returned for command
The strange thing is that sometimes it works and other times it dont work! Actually we have 2 templates that do different thing but just onw is working with same criteria...
Any ideas?
Thanks in advance
Simone