When ERROR message appears in Smart Proxy log buffer, we could make a
notification.

Maybe when a host is discovered, not sure.

LZ

On Fri, Jan 20, 2017 at 1:15 PM, Daniel Lobato Garcia
<[email protected]> wrote:
> Hi Foreman devs,
>
> Thanks to Gail Steiger and Ohad Levy -
> https://github.com/theforeman/foreman/pull/4170
> https://github.com/theforeman/foreman/pull/3902
>
> https://cloud.githubusercontent.com/assets/598891/21989268/91469e06-dc0a-11e6-828f-44d37183c572.png
> https://cloud.githubusercontent.com/assets/598891/21989267/91440f06-dc0a-11e6-8940-d1f1a100e79b.png
>
> we have now a fancy-looking notifications drawer in Foreman! It works
> and looks nice, and I'd recommend taking a look at both the React
> implementation and the Rails part as neither are complicated to
> understand in my opinion.
>
> Now, what's this notifications drawer useful for if we don't have any
> notifications? That's where you come into play:
>
> Notifications in Foreman are stored in what we call a
> "NotificationBlueprint", which stores the information about the
> notification (e.g, level, message, subject..). The blueprint should
> contain information about what happened and ideally how to diagnose or
> resolve the problem (if it's a problem)
>
> The idea is that plugins or Foreman itself will define these blueprints
> somwhere (via the engine, or a db seed, for example).
>
> In order to trigger them, you need to instantiate a Notification object
> that uses the NotificationBlueprint you defined. This Notification will
> store information related to the recipients (e.g: when will the
> notification expire, who is it meant for, etcetera). This will
> automatically setup the notification for consumption by users.
>
>
>
> Here's some example code:
>
> a = NotificationBlueprint.new(
>     :group => 'Hi There',
>     :message => "Hello, I'm back",
>     :level => 'info',
>     :subject => SmartProxy.first,
>     :name => 'example',
>     :expires_in => 1.hour
>     )
> b = Notification.new(
>     :notification_blueprint => a,
>     :initiator => User.find_by_login('dlobatog'),
>     :audience => Notification::AUDIENCE_GLOBAL,
>     )
>
> --
>
> What actions would you like to see as notifications in Foreman? We want
> the drawer to only contain important information, as to not overwhelm
> the user with notifications.
>
> So things like: 'host failed a puppetrun' is probably too common an event
> to have notifications for, but things like 'this TFTP proxy went down'
> or 'your RH subscription is about to expire' is a much more important
> notification that should show up. A cronjob could check out the health
> of your infrastructure to add these notifications, or ... do you have
> any ideas? Please reply in this thread as I'd love to see the drawer
> getting some use ASAP for 1.15 :)
>
> Best,
>
> --
> Daniel Lobato Garcia
>
> @dLobatog
> blog.daniellobato.me
> daniellobato.me
>
> GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
> Keybase: https://keybase.io/elobato
>
> --
> You received this message because you are subscribed to the Google Groups 
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.



-- 
Later,
  Lukas @lzap Zapletal

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to