TECHZEN Zenoss User Community ARCHIVE  

Execute a python script on ZenOSS server

Subject: Execute a python script on ZenOSS server
Author: Bharat Kumar Kobagana
Posted: 2018-07-24 01:22

Hi ZenOSS,

I have a Python script which,
We want to create COMMAND data source which calls this Python script, gather data in data points and generates graph.

And we want create above data source under an HTTP device (which doesn't have SSH details). So I want to run this COMMAND with "USE SSH = FALSE".

How can I do that?



------------------------------
Bharat Kumar Kobagana
India
------------------------------


Subject: RE: Execute a python script on ZenOSS server
Author: Jay Stanley
Posted: 2018-07-24 08:26

Just create a zencommand datasource, add the proper datapoints and you are good.

Writing Command Data Sources - Zenoss Wiki

Plugin format for ZenCommands

------------------------------
jstanley
------------------------------


Subject: RE: Execute a python script on ZenOSS server
Author: Bharat Kumar Kobagana
Posted: 2018-07-24 13:50

Thanks a lot for quick response. Will try that and update you.

If my script is complex, is it possible to copy my script files to ZenOSS core OR collectors OR something. (Instead of running on devices over SSH)?

And is there any common share location for script for all collectors to access and execute.

------------------------------
Bharat Kumar K
India
------------------------------


Subject: RE: Execute a python script on ZenOSS server
Author: Jay Stanley
Posted: 2018-07-24 16:32

The best way is to create a ZenPack and add the script in the ZenPack. This way your script will survive upgrades

------------------------------
jstanley
------------------------------


Subject: RE: Execute a python script on ZenOSS server
Author: Bharat Kumar Kobagana
Posted: 2018-07-24 18:54

Thank you very much Jay. This info really helped me.

------------------------------
Bharat Kumar Kobagana
Visakhapatnam
------------------------------


< Previous
Creating ZenPack. Question from novice
  Next
List Metrics Collected for a Server
>