Feb 22, 2010 1:47 PM
Event Histograms not showing any events
-
Like (0)
Installed zenpack and bound to the zenoss server and several monitored servers. Left it for the weekend so it could build up a graph. No data looks to be collected after the weekend. Cur/avg/max feilds just show "nan". Currently the majority of events come in via a single server from traps and a transform is used to distribute the events to all servers. Could this have something to do with it? Thanks That1guy15
Question started in Zenpack page an moved to forum. here is the original response.
The data is collected directly from the zenoss database via a shell script, I don't think transforms would have anything to do with that as they are applied before the entries are saved to the database. (I think?)
My first guess would be that something in the script is not compatible with your install. Can you try navigating to "/Devices /Server /Linux /localhost /Templates /AllEventsBySev /Severity_EventSev0 " and use the "test against device" option to try executing the script against "localhost"?
My output looks like this:
Executing command |
/usr/local/zenoss/zenoss/ZenPacks/ZenPacks.community.EventGraph.AllBySeverity/ZenPacks/community/EventGraph/AllBySeverity/libexec/query_all_by_sev.sh 0 |
against localhost |
Severity | EventSev0=0 |
DONE in 0 seconds |
Just to make sure im applying the correct template to the devices. I have the "All Events template applied to the server "localhost" directly and I have the "Device Events" template applied to the /server/Windows group.
I went to /Devices /Server /Linux /localhost and to templates, then clicked on "all events" template. I then clicked on "Severity_AllEvents_0" data source and put "localhost" in the "Test Against Device" and clicked test.
It looks to run fine but finds no events:
Executing command |
/opt/zenoss/ZenPacks/ZenPacks.community.EventGraph.BySeverity-2.0-py2.4.egg/ZenPacks/community/EventGraph/BySeverity/libexec/query_by_sev_all.sh -S 0 |
against localhost |
Total Events | AllEvents_0=0 |
DONE in 0 seconds |
Good thinking moving this conversation to the forums.
That appears to be a valid result that should graph properly. It has been a while since I created this pack, and my memory sucks. I recently discovered how I can revise the script to return all the event counts via a single query (It currently runs the script 6 times per device). This should be a good thing overall and I was planning to submit an update with these changes. I will use this issue as motivation to perform that update. That should refresh my memory on the details.
Simple thought: Did you restart zenoss already? I seem to recall needing to restart certain daemons after adding some zenpacks.
So i removed the zenpack and reisntalled and the queries started bringing back results. But the graphs would not populate.
I then rebooted zenoss completly and it looks like it is graphing now.
Watching my graph for localhost it is only populating and logging the events from itself. I thought "all events" collected event info for all events entering Zenoss??
I rewrote this last night, updated version attached. I have NOT updated the ZenPack page, as this version has some siginficant changes in structure that may break existing installations? [This version returns all severity counts with a single call to the shell script.]
I have requested some feedback on that from someone smarter than me before commiting any changes to the zenpack page.
I competely uninstalled my existing zenpack and reinstalled from this file and it worked properly. The template for graphing events for a single device needs to be bound to devices before it will begin working. The template for all events is configured to be bound to "Sever/Linux/localhost", I'm unsure if this is the best way to do this, but when I bind it to /Server/Linux it tries to run against all of my linux devices. I imagine I am doing something wrong there... but haven't figured out what yet.
[Edit 2/25 : Uploaded new version of zenpack without the path typo. ]
I removed the old zenpack and installed the new one. I restarted Zenoss and then bound the all events to the zenoss server as before and the events to the /server/windows group. I tried testing the all events by going into to the template and using the "test against device". When i enter locolhost and click test i am presented with a zenoss error screen.
Yes, I just found this as well a bit ago. The path to the shell script should have an underscore:
${here/ZenPackManager/packs/ZenPacks.community.Event_Histograms/path}/libexec/query_all.sh
Same goes for the Device Events template. Sorry, been hectic today and haven't had time to write up and resubmit the change. :-P
No worries i know how it goes.
Ive been trying to figure out how to get something similar together and have notived its way beyond my scope of knowledge so your zenpack is a huge save for me!
I'm continuing tuning on this ZenPack, I've got it down to 1 query:
SELECT severity, COUNT(severity) FROM history GROUP BY severity UNION ALL SELECT severity, COUNT(severity) FROM status GROUP BY severity;
I'll get the timestamps in there and the parsing for the different severities soon.
cool! thanks
SQL is fun.
mysql> SELECT severity, COUNT(severity) FROM history WHERE lastTime>(UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 5 MINUTE))) GROUP BY severity UNION ALL SELECT severity, COUNT(severity) FROM status WHERE lastTime>(UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 5 MINUTE))) GROUP BY severity;
+----------+-----------------+
| severity | COUNT(severity) |
+----------+-----------------+
| 2 | 28 |
| 3 | 24 |
| 4 | 106 |
| 5 | 20 |
| 4 | 11 |
+----------+-----------------+
5 rows in set (0.00 sec)
Sweet! Why did you get 2 results for severity level 4 I wonder?
This will require tweaking the data collection script to insert zero values for any severity that is not returned, but that should be trivial. I will try to update my 'test' build and post an update soon.
Thank you
I'm selecting from both the status and history tables, everything for the last 5 minutes and then summing in the Python wrapper. I've converted the bash script to Python and doing a little more tuning. Going to get this down to 1 Python script with 1 MySQL call.
I rewrote the query and the script to reduce the number of shell and SQL calls the ZenPack was making and updated it in SVN and on the Event Histograms page.
Thanks Nathan!
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||