I’ve just finished adding a basic maintenance mode inside JFFNMS based on action script that disable a host for polling and enable it at a given time (duration can be specified using time spec for AT command)

 

Don’t know how to integer it better inside jffnms (filed inside the DB?, poller and consolidate process that check the field ?) but it works good for now.

 

STEPS

1-       create a new event type called maintenance:

2-       add syslog matching rules (for windows, linux etc …)

3-       add a new action script (place the file maintenance.inc.php inside $jffnms_tree/engine/actions)

4-       create a new trigger that call maintenance if the event maintenance is raised

5-       assign the trigger to a user

 

 

To send the syslog message to jffnms host you can use various way, here are some one, the only thing that you must do is to send a syslog message that is matched by the syslog message rules.

 

------------------

  • using eventcreate builtin exe on Win2k3 + ntsyslog

 

EVENTCREATE /T WARNING /ID 100 /L APPLICATION /SO maintenance /D "host: host1 duration: now + 5 minutes"

EVENTCREATE /T WARNING /ID 100 /L APPLICATION /SO maintenance /D "host: sauv2 duration: 25122006"

 

  • Winall using syslog client binary (from kiwi)  that sends directly to JFFNMS HOSTS

 

klog -h 10.96.0.122 -p warning -F local1 -r "maintenance:"  -m "host: ntsncsauv2 duration: tomorrow + 15:30 minutes"

 

  • Linux/Unix (syslog warnings must be configured to be sent to the jffnms host).

logger -p local1.warn -t maintenance "host: nt3 duration: now + 30 minutes"

 

 

----------------------------------

Files and steps are attached.

 

Cheers

 

 

  _______________

David LIMA

Professional Services

www.scc.com

 

 

 


______________________________________________________________________
Ce message contient des informations dont le contenu est susceptible d'etre confidentiel.
Il est destine au(x) destinataire(s) indique(s) exclusivement.

A moins que vous ne fassiez partie de la liste des destinataires, ou que vous soyez habilite a recevoir le mail a leur place, il vous est interdit de le copier, de l'utiliser ou de devoiler son contenu a un tiers.

Si vous avez recu cet email par erreur, merci de prendre contact avec l'emetteur.

Les opinions exprimees dans cet e-mail sont celles de l'emetteur et ne refletent pas necessairement celles de l'entreprise.

Ce e-mail peut contenir des pieces jointes dont certaines pourraient contenir des virus qui pourraient endommager votre systeme informatique.

La compagnie a pris toutes dispositions afin de minimiser ce risque et decline toute responsabilite pour toute perte ou dommage resultant directement ou indirectement de l'utilisation de cet email ou de son contenu.

Il vous appartient d'effectuer vos propres controles anti-virus avant d'ouvrir la ou les pieces jointes.
______________________________________________________________________
TYPES
+-------+-------------------+----------------+-------------------------------------------------------------------------+-----------------------+---------------------------+------------------------------+----------------+------------------+
| ID    | Description       | Severity       | Event Text                       
                                       | Show in Event Viewer? | Event 
Generates an Alarm? | Different Alarm for Up Event | Alarm Duration | Show Host 
Field? |
+-------+-------------------+----------------+-------------------------------------------------------------------------+-----------------------+---------------------------+------------------------------+----------------+------------------+
| 10005 | Maintenance       | Administrative | Polling for host <interface> is 
disabled (when will be enabled: <info>) | Always                | O             
            | Unknown                      | Default        | O                |




SYSLOG
+-------+------------------------------------------------------------------------------------------+-----------------+----------------+-------------+------------------+-------------------+----------+
| ID    | Text Match                                                            
                   | Interface Field | Username Field | State Field | Extra 
Info Field | Event Type        | Position |
+-------+------------------------------------------------------------------------------------------+-----------------+----------------+-------------+------------------+-------------------+----------+
| 10005 | maintenance\[warning\].*\shost:\s(\w+)\sduration:\s(.*)$              
                   | 1               |                |             | 2         
       | Maintenance       | 1        |
| 10004 | maintenance: host:\s(\w+)\sduration:(.*)$                             
                   | 1               |                |             | 2         
       | Maintenance       | 1        |


ACTIONS

+-------+--------------------------+-------------+-------------------------------------------------+-------------------------------------------+
| ID    | Description              | Command     | Internal Parameters          
                   | User Parameters                           |
+-------+--------------------------+-------------+-------------------------------------------------+-------------------------------------------+
| 10002 | Disable polling for host | maintenance |                              
                   |                                           |
| 10001 | Sms via GSM              | sms         | smsname:<profile-smsalias>   
                   |                                           |


TRIGGERS
+----+-------------------------+--------------+
| ID | Description             | Type         |
+----+-------------------------+--------------+
| 2  | Interface Status Change | Match Alarms |
| 3  | SMS Trigger             | Match Alarms |
| 4  | Maintenance Mode        | Match Events |
+----+-------------------------+--------------+

inside the trigger add a statement like, if type is equal to maitenance then 
action maitenance stop this trigger


Attachment: maintenance.inc.php
Description: maintenance.inc.php

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to