Discussion:
Zencommand ignores $ZENHOME for one device
Alexander Fortin
2011-11-18 10:04:21 UTC
Permalink
Alexander Fortin [http://community.zenoss.org/people/shaftoe] created the discussion

"Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
Hi folks, with Zenoss 3.2.0 I'm getting troubles with zencommand, this is the error:

WARNING zen.SshClient: 127.0.0.1 channel 7 The command $ZENHOME/libexec/check_stolen_cpu.sh returned stderr data (1) from the device: bash: /libexec/check_stolen_cpu.sh: No such file or directory

check_stolen_cpu.sh is working fine on any other box, just this one that is the zenoss collector is breaking. Device is already under Device/SSH/Linux and data sources/graphs are ok, I just don't get why zencommand can't get the right value for ZENHOME, it works fine from CLI:

***@status:~$ ssh 127.0.0.1

Last login: Fri Nov 18 09:50:01 2011 from localhost
***@status:~$ echo $ZENHOME
/usr/local/zenoss/zenoss
***@status:~$ $ZENHOME/libexec/check_stolen_cpu.sh
STOLEN CPU|status=1 stolen=2583844

Any idea? Thanks
--------------------------------------------------------------

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

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]
Shane Scott
2011-11-18 18:46:30 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
Alexander Fortin:

Be sure that there isnt a local copy of the template on this device. Sounds like there might be and it might contain some differnces.

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

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]
Alexander Fortin
2011-11-21 08:21:07 UTC
Permalink
Alexander Fortin [http://community.zenoss.org/people/shaftoe] created the discussion

"Re: Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
Hi Shane,

I'm not sure what a template local copy is, I just checked the device though and it has just one template bound (the data source is into the base Device monitoring template).

The only difference I can see between this device and any other is that this is the collector itself

Best wishes,
Alex
--------------------------------------------------------------

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

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]
Alexander Fortin
2011-11-22 13:50:47 UTC
Permalink
Alexander Fortin [http://community.zenoss.org/people/shaftoe] created the discussion

"Re: Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
I've solved with what I think is a dirty hack, I did try pretty much anything that came up to my mind with no luck -> I did overwrite zCommandPath for that device (in my case, Ubuntu 10.04, it's /usr/local/zenoss/zenoss/libexec)

It works, but I'm still puzzled by why zencommand doens't run .bashrc or .profile when it connects to the same box it is running (I'm quite sure any other zencommand monitored box does run .bashrc because there's where I set ZENHOME for those)
--------------------------------------------------------------

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

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]
Shane Scott
2011-11-22 16:59:12 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
Alexander:

Dirty hack indeed. :p

Lets check something. As the zenoss user on the zenoss master, zendmd.

Next

d=dmd.Devices.findDevice('your device name')
d.getRRDTemplates()


It'll return a list of the bound templates and the path. Can you post the path?

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

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]
Alexander Fortin
2011-11-24 08:43:16 UTC
Permalink
Alexander Fortin [http://community.zenoss.org/people/shaftoe] created the discussion

"Re: Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
Hi Shane, thanks for your help.

Here's the list:

[<RRDTemplate at /zport/dmd/Devices/Server/SSH/Linux/rrdTemplates/Device>, <RRDTemplate at /zport/dmd/Devices/Server/rrdTemplates/DigMonitor>, <RRDTemplate at /zport/dmd/Devices/Server/SSH/Linux/rrdTemplates/ex-serverdensity>]

This matches to what I expect to be bound to that device
--------------------------------------------------------------

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

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]
Shane Scott
2011-12-01 08:00:12 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Zencommand ignores $ZENHOME for one device"

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

--------------------------------------------------------------
Alexander Fortin:

For the heck of it try $$ZENHOME in the command datasource.

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

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...