On 06/12/2015 03:56 PM, Lucas Ponce wrote:
Hello,
In hawkular-alerts, the "plugins" are responsible to "deliver" the
alert information into different ways, for example, an email, mobile, snmp or whatever
plugable architecture.
The email is the main plugin configured in hawkular and today is very simple, it just
have the basic architecture to receive the message and send a simple message.
We are working to improve this architecture so the plugins will receive the full alert
content and it will process it to writte a formatted message.
The requeriments would be that a plugin can have a "default" template that can
combine alert data to process a final email before to send.
But the plugin can be configure to have several templates, for example, by tenant,
localization (i18n), or even destination (for example, the email for technical recipients
would be more verbose than for a CTO).
I would simplify l18n and destination into "user preferences". It should
be up to the end user to decide his preferred language (in the UI and
Email) and the level of information he wants (if any).
That said this can be used inside the template or a convention in the
template name, but adding 2 parameters (with defaults) in the template
name makes it tricky, and I would just keep i18n there.
The verbosity should be a template parameter.
In mustache words:
{{#verbose?}}
I am verbose !
{{/verbose?}}
But we may need various templates for various kind of alerts (machine
down != machine slow)
So, the requeriments where I'm working on are the following:
- Default template (if no one exists).
- Add new templates dynamically to be used by tenant, localization (i18n) or
destination.
- Plain / HTML formats.
I'm working for these requeriments for M2, but I would like to share these ideas to
see if we are not missing anything important and we are in the same page.
Also it can be interesting if we can have some idea for the template (plain text and html
- if needed- ).
Ideally it should be customizable like this, this is targetted to a URL
availability issue:
From: {{fromEmail}}
To: {{toEmail}}
Subject: New Hawkular alert for {{resourceFullName} - {{alertId}}
Body:
{{firstName}} {{lastName}}
This message might need your attention.
{{resourceFullName} URL has been reported down since {{time}}.
See the alert details at: {{alertLink}}
Best regards,
The hawk of Hawkular
If we can't we'll have to remain generic, something like this:
From: {{fromEmail}}
To: {{toEmail}}
Subject: New Hawkular alert for {{resourceFullName} - {{alertId}}
Body:
{{firstName}} {{lastName}}
{{resourceFullName} has triggered an alert and needs your attention.
See the alert details at: {{alertLink}}
Best regards,
The hawk of Hawkular
(and similar in HTML format)
----------------------------
That said, we should also send an email when the alert gets resolved (by
itself), bonus point if In-Reply-To can be correctly set for the same
alert...
Thomas
Thanks,
Lucas
_______________________________________________
hawkular-dev mailing list
hawkular-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev