Changes between Version 5 and Version 6 of GENIMonitoring/Alerts


Ignore:
Timestamp:
05/12/15 17:05:42 (4 years ago)
Author:
cody@uky.edu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIMonitoring/Alerts

    v5 v6  
    2626==== Esper query format ====
    2727
    28 In a typical database we query existing data based on some declarative language.  We can think of and Esper query like an upside down SQL, where if events occur in the future, results will be emitted.  The Using the ESPER query language, ''EPL'' (similar to SQL) complex events can are described. 
     28In a typical database we query existing data based on some declarative language.  We can think of and Esper query like an upside down SQL, where if events occur in the future, results will be emitted.  The Using the ESPER query language, ''EPL'' (similar to SQL) complex events can are described.  The EPL language reference and examples can be found here: [[http://esper.sourceforge.net/esper-0.7.5/doc/reference/en/html/EQL.html]] 
    2929
    3030Consider the following EPL query:
     
    7676==== Example GENI monitoring stream queries ====
    7777
     78Note how the following data types are used in the example queries.
     79 
     80{{
     81        ...
     82        String urn;
     83        String metric;
     84        long ts;
     85        double value;
     86        ...
     87}}
     88* If metric ''gpo:is_available'' is set to ''1'' emit ''OK''
     89{{{
     90select urn, metric, ts, value, 'OK' AS alertlevel from LogTick(metric='gpo:is_available') where value = 1
     91}}}
     92
     93* If metric ''gpo:is_available'' is set to ''1'' emit ''CRITICAL''
     94{{{
     95select urn, metric, ts, value, 'CRITICAL' AS alertlevel from LogTick(metric='gpo:is_available') where value = 0
     96}}}
     97
     98* If a urn with the metric ''gpo:is_available'' is observed once, but not observed again for 60 min emit ''WARNING''
     99{{{
     100select a.urn AS urn, a.metric AS metric, a.ts AS ts , 'WARNING' AS alertlevel from pattern [ every a=LogTick(metric='gpo:is_available') -> (timer:interval(60 min)) and not LogTick(urn=a.urn) ] group by a
     101}}}
    78102
    79103* Ping times greater than 10,000ms
     
    82106}}}
    83107
     108* If a urn is seen and then not seen again for 60min
     109{{{
     110select count(*) from pattern [ every a=LogTick -> (timer:interval(60 min)) and not LogTick(urn=a.urn) ] group by a
     111}}}
     112
     113
     114{{{
     115
     116}}}
     117
    84118
    85119*Image from RabbitMQ tutorial [https://www.rabbitmq.com/tutorials/tutorial-three-python.html]