/[monit]/monit/web/next.html
ViewVC logotype

Diff of /monit/web/next.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by hauk, Wed Sep 4 02:37:37 2002 UTC revision 1.16 by hauk, Thu Sep 5 20:34:15 2002 UTC
# Line 189  Today only the following patterns are su Line 189  Today only the following patterns are su
189    
190    
191    
192  <li><b>Add support for a user submitted Notify program and/or SNMP  <li><b>Add support for SNMP via a built in snmp module</b>
193  support.</b><p>Request: <i>At the moment, the only way to get alerts  <p><pre>
194  is to mail them. How about making user defined alerts. I would like to  SNMP-TRAP on {RESTART, TIMEOUT, CHECKSUM} to TARGET
 see a feature where monit runs a certain user defined program and  
 possibly pass information to it for example, what monitored program  
 made this alert.</i>  
 <p>  
 A possible solution could be to use a statement like this in the  
 control file (keywords in capital):  
   
 <pre>  
 NOTIFY program on {RESTART, TIMEOUT, CHECKSUM} with ARGUMENTS {  
                                     arg1= "Apache restarted"  
                                     arg2= $DATE  
                                     arg3= $EVENT  
                                     ..  
                                     argN="this is the last argument"  
                                  }  
 </pre>  
 In other words the NOTIFY statement will work like the alert statement  
 except that monit will start a notify <i>program</i> with arguments  
 given in the ARGUMENT block and where the standard alert variables  
 will also be available. ($EVENT, $PROGRAM, $DATE and $HOST)  
 <p>  
 <i>Martin comments:</i><br> I think this it is general enough to allow  
 users to get the alerts where needed.  
 <p>  
 Maybe monit could have native support for SNMP (mentioned in the past)  
 <pre>  
 NOTIFY SNMP-TRAP on {RESTART, TIMEOUT, CHECKSUM} to TARGET  
195  snmp.manager.com with COMMUNITY abcd1234  snmp.manager.com with COMMUNITY abcd1234
196  </pre>  </pre>
197  <p>  <p>
198  And maybe the target for SNMP can be set with a global <i>set</i>  The target for SNMP can be set with a global <i>set</i>
199  statement with specific options and in the rule we can use only target  statement with specific options and in the rule we can use only target
200  name, such as:  name, such as:
201  <pre>  <pre>
# Line 233  SET TARGET mysnmp Line 206  SET TARGET mysnmp
206  SET TARGET myprogram  SET TARGET myprogram
207     PROGRAM logger     PROGRAM logger
208     ARGUMENTS {...}     ARGUMENTS {...}
   
 SET NOTIFY myprogram on {RESTART, TIMEOUT, CHECKSUM}  
 SET NOTIFY mysnmp on {RESTART, TIMEOUT, CHECKSUM}  
209  </pre>  </pre>
   
 The NOTIFY directive can be used on global level (for example with SET  
 NOTIFY ...) or can be overriden on per-process level (NOTIFY ... )  
 <p>  
 With your syntax (NOTIFY program ...) the above isn't actually needed  
 - users can have external programs that does similar thing - it's on  
 discussion.  
 <p>  
 <i>Jan-Henrik comments:</i><br> Let's chew a bit on this, but I'm  
 inclined to Martins proposal.  
 <p>  
210  <code>  <code>
211  <table border=0 cellspacing=5>  <table border=0 cellspacing=5>
212  <tr>  <tr>
213  <td width=50%>Responsible:</td><td width=50%>Jan-Henrik/Martin</td>  <td width=50%>Responsible:</td><td width=50%>Martin</td>
214  </tr>  </tr>
215  <tr>  <tr>
216  <td width=50%>Progress:</td>  <td width=50%>Progress:</td>

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26