![]() |
![]() |
Subject: | find out which graphs are broken |
Author: | [Not Specified] |
Posted: | 2014-08-12 05:42 |
Hi All,
We are currently changing our ssh port from 22 to something different together with the user logging in to these systems being monitoring instead of root, due to this allot of ssh scripts will obviously stop working.
My question is, is there any possibility to generate a list somewhere which shows me all graphs that have NaN values in them which allows us to solve them one by one
Thanks in advance.
Subject: | Might want to try the |
Author: | Jay Stanley |
Posted: | 2014-08-12 22:54 |
Might want to try the following community ZenPack:
http://wiki.zenoss.org/ZenPack:NaN_Threshold
A ZenPack which provides facility to alert on datapoints whose value is NaN (no data).
Subject: | Thats a great zenpack, |
Author: | [Not Specified] |
Posted: | 2014-08-13 04:16 |
Thats a great zenpack, exactly what I was looking for. I've installed the ZenPack but are unable to find the monitoring template, how can I connect this to my datapoints
Thanks for the help jstanley
Subject: | I just found out how to do it |
Author: | [Not Specified] |
Posted: | 2014-08-13 05:04 |
I just found out how to do it, unfortunately its not working the way I would like.
for example I got a datasource which checks the uptime of my hosts and graphs it, the datapoint for this graph is named days. So I've added a NaN monitoring datasource with in the datapoints field filled in "days" but this is not working.
What am I doing wrong here
Subject: | zenoss@*:/usr/local/zenoss |
Author: | [Not Specified] |
Posted: | 2014-08-13 05:37 |
zenoss@*:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons$ ./zennanthresh start
starting...
Traceback (most recent call last):
File "/mnt/data01/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/zennanthresh.py", line 27, in
from ZenPacks.community.NanThreshold.services.nanThreshConfig import getVarNames
ImportError: No module named NanThreshold.services.nanThreshConfig
zenoss@*:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons
Subject: | as root it does work |
Author: | [Not Specified] |
Posted: | 2014-08-13 05:47 |
as root it does work
root@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons# ./zennanthresh status
program running; pid=21762
root@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons# ./zennanthresh stop
stopping...
root@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons# ./zennanthresh start
starting...
root@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons# ./zennanthresh status
program running; pid=24398
as user zenoss it does not
zenoss@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons$ ./zennanthresh status
program running; pid=24398
zenoss@amo001:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons$ ./zennanthresh stop
stopping...
zenoss@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/daemons$ ./zennanthresh start
starting...
Traceback (most recent call last):
File "/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/zennanthresh.py", line 180, in
daemon = CollectorDaemon(myPreferences, myTaskSplitter)
File "/usr/local/zenoss/Products/ZenCollector/daemon.py", line 209, in __init__
super(CollectorDaemon, self).__init__(name=self.preferences.collectorName)
File "/usr/local/zenoss/Products/ZenRRD/RRDDaemon.py", line 61, in __init__
PBDaemon.__init__(self, noopts, name=name)
File "/usr/local/zenoss/Products/ZenHub/PBDaemon.py", line 545, in __init__
self.log.critical( traceback.format_exc( 0 ) )
AttributeError: 'CollectorDaemon' object has no attribute 'log'
zenoss@@:/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold
but when its started by root there is no events coming either
Subject: | Never used this ZenPack, so I |
Author: | Jay Stanley |
Posted: | 2014-08-13 18:20 |
Never used this ZenPack, so I am not 100% on usage. But if it has it's own daemon, then I would stop it. Then restart zenoss. then do zenoss status and see if the daemon is there.
I see two different errors in your posts. So, lets start with the above and see if the daemon is there and if it is started.
Subject: | thanks for your answer |
Author: | [Not Specified] |
Posted: | 2014-08-14 00:31 |
thanks for your answer jstanley.
I've restarted zenoss on the main server (got 3 remote collectors to collect data) but unfortunately the daemon is not starting up either.
zenoss@*:~$ zennanthresh status
not running
starting it manualy on the same server gives me the following error:
zenoss@*:~$ zennanthresh start
starting...
Traceback (most recent call last):
File "/usr/local/zenoss/ZenPacks/ZenPacks.community.NanThreshold-1.2.3-py2.7.egg/ZenPacks/community/NanThreshold/zennanthresh.py", line 180, in
daemon = CollectorDaemon(myPreferences, myTaskSplitter)
File "/usr/local/zenoss/Products/ZenCollector/daemon.py", line 209, in __init__
super(CollectorDaemon, self).__init__(name=self.preferences.collectorName)
File "/usr/local/zenoss/Products/ZenRRD/RRDDaemon.py", line 61, in __init__
PBDaemon.__init__(self, noopts, name=name)
File "/usr/local/zenoss/Products/ZenHub/PBDaemon.py", line 545, in __init__
self.log.critical( traceback.format_exc( 0 ) )
AttributeError: 'CollectorDaemon' object has no attribute 'log'
Subject: | ah problem was the logfile, |
Author: | [Not Specified] |
Posted: | 2014-08-14 00:41 |
ah problem was the logfile, it had the wrong permissions because it got created by root because I started the daemon as root yesterday. The daemon is running properly now, I will find out of it works.
Subject: | the daemon is running but it |
Author: | [Not Specified] |
Posted: | 2014-08-14 01:21 |
the daemon is running but it is not generating any events yet
Subject: | damn Im stupid, ofcourse I |
Author: | [Not Specified] |
Posted: | 2014-08-14 01:27 |
damn Im stupid, ofcourse I should be running the daemon on the remote collector because all the graph's are on that server.
Installing the zenpack on the remote collector gives me the following error:
zenoss@*:~/ZenPacks.community.NanThreshold-master$ zenpack --install ZenPacks.community.NanThreshold-1.2.3-py2.7.egg
WARNING:relstorage.adapters.mysql:Unable to connect: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
ERROR:zen.ZenPackCmd:zenpack command failed
Traceback (most recent call last):
File "/usr/local/zenoss/Products/ZenUtils/zenpack.py", line 487, in
zp.run()
File "/usr/local/zenoss/Products/ZenUtils/zenpack.py", line 143, in run
self.connect()
File "/mnt/data01/usr/local/zenoss/Products/ZenUtils/ZenScriptBase.py", line 46, in connect
self.db, self.storage = connectionFactory.getConnection(**self.options.__dict__)
File "/mnt/data01/usr/local/zenoss/Products/ZenUtils/MySqlZodbFactory.py", line 165, in getConnection
storage = relstorage.storage.RelStorage(adapter, **relstoreParams)
File "/mnt/data01/usr/local/zenoss/lib/python/relstorage/storage.py", line 167, in __init__
self._adapter.schema.prepare()
File "/mnt/data01/usr/local/zenoss/lib/python/relstorage/adapters/schema.py", line 856, in prepare
self.connmanager.open_and_call(callback)
File "/mnt/data01/usr/local/zenoss/lib/python/relstorage/adapters/connmanager.py", line 73, in open_and_call
conn, cursor = self.open()
File "/mnt/data01/usr/local/zenoss/Products/ZenUtils/patches/mysqladaptermonkey.py", line 46, in open
conn, cursor = original(self, *args, **kwargs)
File "/mnt/data01/usr/local/zenoss/lib/python/relstorage/adapters/mysql.py", line 231, in open
conn = MySQLdb.connect(**self._params)
File "/mnt/data01/usr/local/zenoss/lib/python/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/mnt/data01/usr/local/zenoss/lib/python/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
He is looking for mysql but its not running on the collector, only on the main server. Does this mean that this zenpack is only usable on a zenoss server that has both the mysql server and the rrd files
Subject: | Dont install the zenpack |
Author: | Jay Stanley |
Posted: | 2014-08-15 14:00 |
Dont install the zenpack manually.. update the collectors using the webui or 'dc-admin update'
Subject: | i've done what you've said |
Author: | [Not Specified] |
Posted: | 2014-08-18 07:02 |
i've done what you've said and the zenpack is successfully installed on the remote collectors.
Next i've created a datasource into the same monitoring template as the datasource/datapoints of the value's I would like to monitor:
https://www.dropbox.com/s/6zzqt8ma2eyaro1/Screenshot%202014-08-18%2014.0...
https://www.dropbox.com/s/i3c9i5u6q908lsf/Screenshot%202014-08-18%2014.0...
I know for sure that some of the datapoints (avg, min, max, loss) are not working and therefore have a nan value, but unfortunately it is not generating events for them.
thanks in advance jstanley.
Subject: | Did you add NAN to the |
Author: | [Not Specified] |
Posted: | 2014-08-26 13:11 |
Did you add NAN to the monitoring template you want to check for NaNs It doesn't necessarily work how you think. You go to a monitoring template, add a datasource of type NaN and then pick the datasources to check...
James Pulver
ZCA Member
CLASSE Computer Group
Cornell University
Subject: | If graph has nan value, then |
Author: | Jan Garaj |
Posted: | 2014-08-27 03:22 |
If graph has nan value, then also source rrd file must have nan value -> new task - find rrd files with nan value;
you can try https://github.com/jangaraj/zenoss/blob/master/scripts/findNANrrds.sh script (poc) - probably you will need to tweak --start --end values for right results.
If you want to monitor nan values, then nan zenpack is right solution of course.
Devops Monitoring Expert advice:
Dockerize/automate/monitor all the things.
DevOps stack:
Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform /
Elasticsearch
< |
Previous Cannot create new User Command |
Next Cannot import SNMPv2-TC |
> |