Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 28530 Views 28 Replies Latest reply: Apr 1, 2010 6:32 PM by nelliott RSS
that1guy15 Rank: White Belt 48 posts since
Sep 18, 2009
Currently Being Moderated

Feb 22, 2010 1:47 PM

Event Histograms not showing any events

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
  • nelliott Rank: Green Belt 83 posts since
    Sep 10, 2009
    Currently Being Moderated
    2. Feb 22, 2010 4:58 PM (in response to that1guy15)
    Re: Event Histograms not showing any events

    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.

  • nelliott Rank: Green Belt 83 posts since
    Sep 10, 2009
    Currently Being Moderated
    5. Feb 25, 2010 4:44 PM (in response to that1guy15)
    Re: Event Histograms not showing any events

    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. ]

  • nelliott Rank: Green Belt 83 posts since
    Sep 10, 2009
    Currently Being Moderated
    7. Feb 23, 2010 7:12 PM (in response to that1guy15)
    Re: Event Histograms not showing any events

    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

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    9. Mar 25, 2010 5:02 PM (in response to that1guy15)
    Re: Event Histograms not showing any events

    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.

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    11. Mar 25, 2010 5:21 PM (in response to Matt Ray)
    Re: Event Histograms not showing any events

    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)

  • nelliott Rank: Green Belt 83 posts since
    Sep 10, 2009
    Currently Being Moderated
    12. Mar 25, 2010 5:54 PM (in response to Matt Ray)
    Re: Event Histograms not showing any events

    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 

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    13. Mar 25, 2010 9:55 PM (in response to nelliott)
    Re: Event Histograms not showing any events

    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.

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    14. Mar 26, 2010 6:19 PM (in response to Matt Ray)
    Re: Event Histograms not showing any events

    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!

1 2 Previous Next

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points