TECHZEN Zenoss User Community ARCHIVE  

User Commands

Subject: User Commands
Author: [Not Specified]
Posted: 2016-05-01 09:45

I have a bash script that we previously executed on Zenoss 4 without problems, but due to the Docker nature of 5 I am having a hard time getting it to run. Basically the script updates a Microsoft SQL table so that we know what devices should be restarted or not. I connected to a new instance and dropped the script in there, but I am continuing to get failures on the command side saying either the script is not found or isql is not found.

cd /opt/zenoss/libexec/
bash isqlscript.sh "'${evt/firstTime}'" "'${evt/device}'" "'${evt/component}'" "'${evt/component}'" 0

Now in Zenoss 5 I have attempted to commit the Docker change like:
# serviced service shell -s SQLScript -i zope/0 bash
make the changes, install ODBCconnectivity, SQL script testing.....
then exit and commit with the following:
# serviced snapshot commit SQLScript

But then I am not sure how this gets called from the Edit Notification Command. The process is always returning: command not found.

Command Command failed (exit code A process has ended with a probable error condition: process ended with exit code 127.) -- 127: stdout: '2016/04/27 23:07:35.000' 'aus101.solutioncenter.biz' 'Print Spooler' 0 stderr: /opt/zenoss/libexec/iSQLScript.sh: line 13: isql: command not found



Subject: The missing command
Author: Larry Virden
Posted: 2016-06-01 07:24

> stderr: /opt/zenoss/libexec/iSQLScript.sh: line 13: isql: command not found

This error says that there was an attempt to run the script, but when the script attempted to locate isql, that was not found in the $PATH being used.

So, either isql is not available inside the docker, or it is there in a path that is not a part of the default environment.



Subject: Pretty sure you would need to
Author: Jay Stanley
Posted: 2016-06-01 09:36

Pretty sure you would need to do it to the zenactiond container.



Subject: Pretty sure you would need to
Author: Jay Stanley
Posted: 2016-06-01 09:38

Pretty sure you would need to do it to the zenactiond container.



< Previous
How to configure network zenoss for VLANs.
  Next
Enable Hyperlinks in Event Fields: Zenoss Core
>