Apr 27, 2010 11:53 AM
Zenplugin, Modeling SSH, Command Not Found
-
Like (0)
Hey guys, newbie here. I'm trying to model one of my linux servers using SSH and zenplugin.
A lot of the moedeling is working ok, except for a few like mem and cpu.
The event I get after modelling is:
message Cmd: /usr/bin//zenplugin.py mem - Code: 127 - Msg: Command not found
I run the command "zenplugin.py mem" on the server itself and the output shows fine:
MEM OK;|memAvailReal=46813184 hrSwapSize=6081867776 hrMemorySize=2075521024 pageSize=4096 memAvailSwap=6077632512
It looks like the script is adding an extra "/" after /usr/bin//
Anyone have any ideas?
If anyone could just tell me where I could edit the path that it's executing "zenplugin.py" from that would be great, as I'm almost positive that the extra "/" it's adding to /usr/bin is causing the problem.
And yes, the plugin IS in that path.
Alright, so it looks like the command "zenplugin.py" was actually in /usr/local/bin
I changed the path to reflect this and tried to remodel the device.
Now for the CPU I'm getting this event:
message Cmd: /usr/bin//zenplugin.py cpu - Code: 127 - Msg: Command not found
summary Command timed out on device 10.0.0.1: '/usr/local/bin/zenplugin.py cpu'
Why is the message different from the summary?
The message shows the wrong path to the plugin. The summary shows the path I have entered in the zProperties.
Any ideas?
Is this path built into your zencommand path in zProperties?
Guy, thanks for replying, greatly appreciated.
Yes, my server is under the /Devices/Server/Cmd class.
The zProperties for this class for the field you mention "zCommandPath" is /usr/local/bin
I verified that zenplugin.py is located in this directory when I inititated this command on server being monitored:
root@backup:/home/ngarciait# which zenplugin.py
/usr/local/bin/zenplugin.py
Tangential to the parent post... zenplugins are deprecated and not recommended for SSH modeling/monitoring. Take a look at the Linux Monitor, Ubuntu Linux and OpenSolaris ZenPacks (and many more SSH-based ZenPacks) for replacing this functionality.
Hey, Matt, that ZenPack works pretty good.
One question though, since I'm a newbie to Zenoss and Zenpacks.
I see that the class it creates is:
Correct class (/Server/SSH/Linux)
Which is where I assume the device needs to be in order for this Zenpack have an affect on it.
Is there any chance I could change the class to something like /Server/Linux
and still have the Zenpack have an affect on the device? Instead of having them in (/Server/SSH/Linux)
The /Server/Linux device class is SNMP-based and the /Server/SSH/Linux uses SSH. If you put them in the same device class their modeler plugins and performance templates would conflict.
Thanks,
Matt Ray
Zenoss Community Manager
community.zenoss.org
Is there any document that shows some kind of class - modeling mapping?
You say /Server/SSH/Linux is SSH based modeling
and /Server/Linux is SNMP based modeling
I know that there can be many types of classes...so..just wondering.
I'm not aware of one as you could set it up however you like - by
binding templates and selecting collectors.
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
ngarciait wrote, On 4/27/2010 11:29 PM:
Is there any document that shows some kind of class - modeling mapping?
You say /Server/SSH/Linux is SSH based modeling
and /Server/Linux is SNMP based modeling
I know that there can be many types of classes...so..just wondering.
>
James, that's what I thought too. Zenoss gives you a lot of flexibility when it comes to creating classes to assign devices and zProperties to,
and to limit each class to only one type of modeling service seems restrictive, unless what Matt was talking about
was certain, "pre-built" or default classes are customized for a particular modeling service,
like /Server/Linux would be SNMP based.
Then again, I'm just a noob. -_-
Yes, that's what he meant - the built in classes are pre-set with
appropriate Templates and collector plugins. However, in the Zenoss
world, you do want to separate out by device classes different
monitoring methods - that's how it works.
It makes almost no sense to try and hit a server with both SSH and SNMP
for the same thing, knowing that you're at best getting duplicate
graphs, and more likely one of the methods is getting constant access
denied errors that generate events etc. . .
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
ngarciait wrote, On 4/28/2010 9:30 AM:
James, that's what I thought too. Zenoss gives you a lot of flexibility when it comes to creating classes to assign devices and zProperties to,
and to limit each class to only one type of modeling service seems restrictive, unless what Matt was talking about
was certain, "pre-built" or default classes are customized for a particular modeling service,
like /Server/Linux would be SNMP based.
>
Thanks for all the information guys. Greatly appreciated.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||