Thank YOU, Matt... looks like my ugly script got a nice overhaul.
Nice! updated the Zenpack today and all looks good.
Thanks for the work, this helps out a great deal.
Taking it a step further
I took your mysql statment for pulling events and made a couple changes to it so i could pull the top 5 errors by count with a min severity of 3. I have setup specifc events to not duplicate so i could see in the events each instance.
SELECT severity, summary, COUNT(summary) AS total_count FROM history WHERE lastTime>(UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 60 MINUTE))) AND severity >= 3 GROUP BY severity UNION ALL SELECT severity, summary, COUNT(summary) FROM status WHERE lastTime>(UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 60 MINUTE))) AND severity >= 3 GROUP BY summary ORDER by total_count DESC limit 1,5;
+----------+-----------------------------+-------------+
| severity | summary | total_count |
+----------+-----------------------------+-------------+
| 3 | ERROR1 | 30 |
| 3 | VIDEOLOST | 24 |
| 3 | NOTACCEPTED | 19 |
| 3 | COMMERROR | 16 |
| 3 | NETWORKRELEASE | 15 |
+----------+-----------------------------+-------------+
is there an easy way to have this data displayed (dynamically) on the dashboard? Or a better way to set this up. I need to keep an eye on the top 5 errors and the number of times they occur.
Once again I really appreciate your help on the zenpack!
I did something like this on my Zenoss system... but it is a nasty hack job.
I setup a 'One Hour Top 10 List', and basically I am doing a query that dumps to a text file a list of the 10 devices with the most events in the past hour. The text file is saved on my web server, then I display that on the dashboard with the 'Site Window' portlet.
The Site Window portlet works with either solution. If you have a performance graph (like the custom one described 2 posts up) or the one generated by this ZenPack, you can post it to your dashboard with the Site Window portlet (see the Fun with the Site Window Portlet wiki entry for instructions). You can also have multiple Site Windows on your dashboard, so it's relatively easy to populate your dashboard with your important graphs.
I found that the top event counts often obscure key single events, such as a fan failure or a DSP crash (both of which I've seen in the last month). When I was told about a syslog summary script that summarized all events, it made it easy to not miss those key events. The syslog summary script, with some supporting web scripts, are at http://www.netcraftsmen.net/resources/technical-articles/712-syslog-summary-scripts.html
Alright i love this zenpack. it is awsome!
Tweaks that im thinking about
-Setup a seperate graph based on location, device class or group so only those devices are invloved in the query.
- Be able to sonly graph on a specific severity and above. I really dont need anything below Info.
I know that i can change the query script to specify a location or class but am trying to figure out a better way. Im not good with python, or setting up zenpacks but im trying to dig into this.
any help would be great!
You can can do this with the multi-graph report tool. Setup your graphs up to be area+stacked with all events on a single graph.
The bummer is that RRD will, by default, append a legend line for every single device and severity event making for an absurd graph legend that is much larger than the graph itself. I'm sure there is a way to prevent this, perhaps with customer graph definitions, but I haven't chased it down. Setting the graph definition value 'Has Summary' to False helps, as does removing the 'Legend' values, but this only eliminates a portion of the clutter. If someone else figures this out please share.
Update: Using a custom graph definition that includes the '-g' option will omit all the legend text and produce a simple, clean graph.
"Update: Using a custom graph definition that includes the '-g' option will omit all the legend text and produce a simple, clean graph."
I see the custom graph definition tab but im not sure what to put in there.
All you need is to put '-g' (no quotes) in that box.
Ah that was simple. I was thining i would have to put code for the whole graph Thanks
I like the fact that i can combine graphs into the reports. The only issue that i have is each datapoint from each server has its own color and area on the chart. This makes it difficult to seperate the different severity levels. i would preffer to have each severity assigned its own color no mater which server it comes from. Not sure if this is possible
You can manually specify your own colors when you setup the graph points in the 'Color (Hex value RRGGBB) field'.
Ok we are getting there
Thanks nelliott for your insight!
So the colors now match up but the problem is the graph is layering the devices on top of each other.So its displays Device 1 sev2, 3, 4, then 5.
Then it places device 2 with the number of each severity on top of that. From the docs im reading this is how it processes it. Do you know of a way to make it lump each severity together. I dont mind stacking severities on top of each other just not like this.
I don't know how to change that, but would love to hear about it if you figure it out.
Im thinking that going back to the Zenpack and changing the Device Event script to pull from a group or location instead of by device. This will pull all severities for each device at once into a single graph.
I would then be able to place the device event template on a single device per location.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||