![]() |
![]() |
Subject: | command datasource issue |
Author: | [Not Specified] |
Posted: | 2015-07-29 09:24 |
hello I'm relatively new to Zenoss so hopfully this is an easy question to resolve. I need has come up to check for connection that are in a "WAIT" state on our linux boxes. I was using the "ss" command to check for this on the box but wanted to create an automatic event if any of my servers have ports in WAIT. I was going to write a script but there are many servers that I would need to deploy this on so I decided to create a template and write a command datasource to check for the wait ports. Here is the command that I created:
/usr/sbin/ss -tulpn |grep -i wait; if [ $$ = 1 ]; then echo "Ports in WAIT state";exit 1;else echo "ALL Clear";exit 0; fi
if I run the command from the command line it reports back "All Clear" as expected but if I run it from the zenoss template it creates an alarm "Ports in WAIT".
Any ideas as to what I am missing here
Subject: | are you ssh'ing to the box? |
Author: | Andrew Kirch |
Posted: | 2015-07-29 09:34 |
are you ssh'ing to the box ssh user@host
I'm wondering if it's running locally.
Andrew Kirch
akirch@gvit.com
Need Zenoss support, consulting or custom development Look no further. Email or PM me!
Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard
Subject: | https://github.com/trelane |
Author: | Andrew Kirch |
Posted: | 2015-07-29 09:41 |
https://github.com/trelane/ZenPacks.trelane.Postfix should have some useful examples.
Andrew Kirch
akirch@gvit.com
Need Zenoss support, consulting or custom development Look no further. Email or PM me!
Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard
Subject: | Well I have the "use SSH" |
Author: | [Not Specified] |
Posted: | 2015-07-29 10:19 |
Well I have the "use SSH" checkbox checked, do I also need to put the ssh in the command template as well I inherited a nagios template that run nagios scripts that are on the remote box and they do not require me to have ssh in the template.
Subject: | run zencommand manually on a |
Author: | Jay Stanley |
Posted: | 2015-07-29 14:34 |
No, you do not have to put in ssh.
But do make sure your zCommandUsername and zCommandPassword are filled out
Subject: | ^^^ works too, I generally do |
Author: | Andrew Kirch |
Posted: | 2015-07-30 11:18 |
^^^ works too, I generally do the ssh myself
Andrew Kirch
akirch@gvit.com
Need Zenoss support, consulting or custom development Look no further. Email or PM me!
Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard
Subject: | Why you don't use http://wiki |
Author: | Jan Garaj |
Posted: | 2015-07-30 17:31 |
Why you don't use http://wiki.zenoss.org/ZenPack:TCP_Statistics - then you will need to just setup your custom thresholds :-)
Devops Monitoring Expert advice:
Dockerize/automate/monitor all the things.
DevOps stack:
Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform /
Elasticsearch
Subject: | I'm trying to understand how |
Author: | [Not Specified] |
Posted: | 2016-02-26 09:51 |
I'm trying to understand how this works and just want to confirm that I'm understanding this correctly.
If I have a nagios plugininstalled on my Zenoss master, and want to run that script on a remote host, thenI need to build ssh into the plugin (if it's not already there), and if I do that I don't need to click the enable ssh checkbox in the datasource. Otherwise, the nagios plugin needs to be installed on the monitored server, and Zenoss pointed at the directory it is installed in for it to run, and the enable ssh checkbox needs to be selected. Is this correct
Subject: | Yes your understanding is |
Author: | [Not Specified] |
Posted: | 2016-02-26 10:40 |
Yes your understanding is correct. It took me a little while to wrap my brain around this as well.
If you have "usessh" checked off the script needs to reside on the monitored environment.
If you do not have "use ssh" checked off then if your script needs to ssh to the environment then it needs to be built into the script.
I use both methods depending upon what I am trying to monitor. I prefer to use the later since I do not need to deploy an updated script to all monitored systems when I make a change to the script, just update the script on the Zenoss master.
Subject: | Why don't you simply "extend" |
Author: | [Not Specified] |
Posted: | 2016-02-27 12:13 |
Why don't you simply"extend" the net-snmp agent on the machine your need that script to run. This way, the data you need is returned by a simple OID SNMP request and putting this into Zenoss becomes a cake walk.
You can see a demo I gave on extending the agent at this link:
https://www.youtube.com/watchv=pcS62-AHSVo
The demo is Mac oriented but the same holds true for Linux.
Manuel
< |
Previous Relationship Issue |
Next ZENOSS: How to pull a report of events closed/resolved by owner/user ? |
> |