Skip to content
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

Merged
merged 3 commits into from
Oct 24, 2016
Merged

Blog post about defining alert triggers in HawkFX #238

merged 3 commits into from
Oct 24, 2016

Conversation

pilhuhn
Copy link
Member

@pilhuhn pilhuhn commented Oct 24, 2016

HawkFX now has the ability to create alert triggers.

@hawkular-website-bot
Copy link

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].
Copy link
Contributor

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.

Copy link
Member Author

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].
Copy link
Contributor

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.

Copy link
Member Author

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.

@hawkular-website-bot
Copy link

PR was auto-deployed here: http://209.132.178.114:10238 and it will be available for 4 days.

Copy link
Contributor

@jshaughn jshaughn left a 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.
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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" )
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

@hawkular-website-bot
Copy link

PR was auto-deployed here: http://209.132.178.114:10238 and it will be available for 4 days.

@pilhuhn pilhuhn merged commit 709a45b into hawkular:pages Oct 24, 2016
@pilhuhn pilhuhn deleted the hawkfx-alert-triggers branch October 24, 2016 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants