Peter Tribble wrote: > On Tue, Jun 17, 2008 at 9:35 PM, Liane Praza <liane.praza at sun.com> wrote: >> Dale Ghent wrote: >>> I was thinking this morning about SMF and realized that it lacks a >>> feature to export alerts or service state changes outside of the >>> system. Such a mechanism would be useful in order to alert a NMS that >>> a service has gone offline, online, or is in maintenance. >> Totally agreed. We've called this "Transitions", and while I put some >> of the plumbing into svc.startd to make it easier a while ago, we >> haven't managed to actually staff this work yet. Transitions would >> allow you to select between an SNMP trap, email notification, or simple >> execution of a shell script on a specified state transition. > > As I was reading this, I started to wonder - why does SMF have to build > in snmp traps, or email. Doesn't the 'execution of a shell script' cover those > (and any other sorts of actions that you may wish to trigger)?
For SNMP trap, we'd want to use a standard MIB by default. Email, we'd want a standard template. Shell scripts would allow people to deviate from the standard form if they wanted, but that doesn't mean we shouldn't have a standard form. How that's implemented could be left to the person implementing it. :) > >> (The only real tricky part is the configuration of messages. Some sites >> may not want notification of all transitions for all services. An easy >> an flexible way to describe the desired policy is important. The rest >> is a fairly straightforward fault-tolerant coding exercise.) > > I would leave the configuration policy as pretty simple. In fact, a > list of transition > states to be acted upon or ignored for each service (rather like the way that > 'ignore_error' can be set to act on or ignore signals and core dumps) may be > as > flexible as you need. Any more complex processing beyond that you delegate to > the shell script that gets invoked. > I'd expect you'd end up wanting a global setting and instance-specific overrides available. I agree that the concept's pretty simple, it's just a matter of making sure the simple concept isn't undone by a bad interface. liane