-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog post about defining alert triggers in HawkFX #238
Conversation
PR was auto-deployed here: http://209.132.178.114:10238 and it will be available for 4 days. |
|
||
Hawkular-services and now also Hawkular-Metrics standalone have the ability to fire alerts when certain conditions | ||
are met. To define those conditions, one creates a _trigger_ via | ||
the http://www.hawkular.org/docs/rest/rest-alerts.html[Hawkular-Alerts api]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only pointing to the rest api might not be enough.
I would also add this link http://www.hawkular.org/community/docs/developer-guide/alerts.html.
To understand better what a trigger, condition, event and alert is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I though about adding this, but forgot.
to provide the _disable_ command explicitly). | ||
|
||
If you are interested in the grammar behind the DSL, visit the | ||
https://github.com/pilhuhn/hawkfx/blob/master/lib/alert_trigger.treetop[definition file]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DSL opens a lot of new domains :).
I have also in my TODO to explore some DSL also in the IFTTT semantic which is also popular.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Or one could model the Zabbix format so that Zabbix users could (re-)use their existing rules.
PR was auto-deployed here: http://209.132.178.114:10238 and it will be available for 4 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice start, Heiko. HawkFX is a useful tool and playground. If 'autoEnable' and 'autoDisable' are not yet in the DSL those would be nice, quick additions that would be useful. Also, Tags and Context are typically very important to anything usable.
In the end it would be great if we put some effort into a supported explorer UI for Hawkular but perhaps that's not in scope given MIQ.
:jbake-tags: blog, ruby, jruby, javafx, alerts | ||
|
||
HawkFX is an explorer for Hawkular. It is a pet project of mine and https://github.com/pilhuhn/hawkfx[hosted on | ||
Github]. It now got the ability to define alert triggers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It now has the ability to define alerting triggers.
|
||
Hawkular-services and now also Hawkular-Metrics standalone have the ability to fire alerts when certain conditions | ||
are met. To define those conditions, one creates a _trigger_ via | ||
the http://www.hawkular.org/docs/rest/rest-alerts.html[Hawkular-Alerts api]. The alerts team has also written a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...the alerting team...
terms behind Hawkular-Alerts. | ||
|
||
HawkFX now has the ability to directly insert new triggers. For this purpose I have created a | ||
http://pilhuhn.blogspot.de/2016/10/a-dsl-for-alert-trigger-definitions-in.html[DSL] to allow to define the triggers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...to define triggers...
|
||
|
||
When you right-click on a metric in the HawkFX list of metrics, there is now a new context menu item 'New trigger', | ||
that leads you to the insert screen, where you can insert the definition. This will contain a pre-canned definition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
predefined or just canned (pre-canned is redundant)
|
||
== Examples | ||
|
||
.Simple threshold trigger for gaguges |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gauges
define trigger "MyTrigger" | ||
AND( | ||
( threshold counter "mycount" < 5 ) | ||
( string "mymetric" CO "ERROR" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CO is what, contains? If you want natural language I think perhaps just use the full word for the string operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you handle 'start with' or also 'counter rate'? Separate by space(s), dash, underscore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd probably just allow .equals.ignoreCase of the whole string: contains | startsWith | endswith | ... I don't know, what you have is fine, too. It was just a thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That thought is good. I'll change it in the next version of the DSL.
PR was auto-deployed here: http://209.132.178.114:10238 and it will be available for 4 days. |
HawkFX now has the ability to create alert triggers.