...
Adding new alarms
- To add a new alarm, add :
- Add a new section into the appropriate xml file in sipXsupervisor/etc/, with a new alarm id.
- Add the description and resolution strings in the appropriate*-strings.xml file in sipXsupervisor/meta/alarms/. Normally there is no need to create new files; however if adding an optional package it might be desirable to capture the alarms in separate files.
- The alarm id is a required field, and can be any unique string. This string is only used internally.
- The alarm code is specified in the config file (e.g. sipXsupervisor/etc/sipXalarms-config.xml). New alarms should be added at the end of the appropriate file, and the code should follow the naming pattern for that file (e.g. SIPXnnnnn, incremented for each new alarm).
...
- Interfaces are provided for Java and C++ code to call to generate alarms. There are only two parameters: the unique internal ID and the parameter string (or list of strings).
- For C++, there is a static function raiseAlarm(alarmId, alarmParams). See sipXsupervisor/src/SipxProcess.cpp for an example (sample C++ update that adds an alarm ).
- For sipXconfig (Java), the object should inject an AlarmContext, then call AlarmContext.raiseAlarm(alarmId, alarmParams...). See sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/login/LoginContextImpl.java for an example. Other
- For other Java processes should , use the SipXAlarmClient in sipXcommons to send xmlrpc to the Alarm Server on the localhost (see sipxbridge/Gateway.java for an example) ().
- Many alarm conditions are detected by the various scripts used by sipx. A script sipx-alarm exists to use the xml-rpc interface to report alarms. Note however that the script can only be used once sipxsupervisor is up and running. See sipXtools/src/sipx-mrtg-threshok.in for an example.