Discussion:
Command data source using bash script
0graham0
2011-12-09 18:09:37 UTC
Permalink
0graham0 [http://community.zenoss.org/people/0graham0] created the discussion

"Command data source using bash script"

To view the discussion, visit: http://community.zenoss.org/message/63184#63184

--------------------------------------------------------------
I'm trying to set up a command data source using a bash script and I may be missing some obvious things...it's not working. Unfortunately I'm not sure what I'm missing after reading over the admin guide and FAQ.

I have a bash script which outputs an integer. I would like to use the information for graphing and thresholds. Here are the steps I've taken:

I created a data source called "test" with Cycle Time set to 5 seconds and Command Template set to "test.sh", a script in $ZENHOME/libexec. Running a test in the data source window returns the script output:

" Preparing Command...   Executing command $ZENHOME/libexec/test.sh against xx.xxx.xx.xx
  -185 
  DONE in 1 seconds "

I created a data point titled "timetest" which is set to RRD Type Gauge. I then created a graph called "time" and added the datapoint "timetest" to the graph.

I've also tried tweaking the script output so it reads: "timetest = Gauge32: -185"

Pardon my ignorance. Any assistance is greatly appreciated.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63184#63184]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2011-12-09 18:29:43 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Command data source using bash script"

To view the discussion, visit: http://community.zenoss.org/message/63173#63173

--------------------------------------------------------------
See:
https://zcaportal.org/wiki/bin/view/ZCA/ZCAFAQ#Why_doesn_39t_my_script_work_63_I_39m_outputting_Nagios_Format_to_stdout_63 https://zcaportal.org/wiki/bin/view/ZCA/ZCAFAQ#Why_doesn_39t_my_script_work_63_I_39m_outputting_Nagios_Format_to_stdout_63

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63173#63173]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
0graham0
2011-12-09 18:31:47 UTC
Permalink
0graham0 [http://community.zenoss.org/people/0graham0] created the discussion

"Re: Command data source using bash script"

To view the discussion, visit: http://community.zenoss.org/message/63185#63185

--------------------------------------------------------------
Thanks very much - I will try that out.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63185#63185]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
0graham0
2011-12-09 18:41:52 UTC
Permalink
0graham0 [http://community.zenoss.org/people/0graham0] created the discussion

"Re: Command data source using bash script"

To view the discussion, visit: http://community.zenoss.org/message/63186#63186

--------------------------------------------------------------
I have the data source parser set to Auto, I imagine it should be changed to Nagios for the above format to work?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63186#63186]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
0graham0
2011-12-09 18:45:08 UTC
Permalink
0graham0 [http://community.zenoss.org/people/0graham0] created the discussion

"Re: Command data source using bash script"

To view the discussion, visit: http://community.zenoss.org/message/63187#63187

--------------------------------------------------------------
After changing the parser to Nagios the data is coming through now. Thanks very much.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63187#63187]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...