mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-16 00:21:01 +00:00
101 lines
3.4 KiB
Text
101 lines
3.4 KiB
Text
{
|
|
/* An example alert configuration. See the EcAlerter documentation for
|
|
* details on what you can configure here.
|
|
*/
|
|
Debug = NO; /* Defaults ... do not log email alerts sent */
|
|
Quiet = NO; /* Defaults ... suppress logging of alarms */
|
|
|
|
/* If we wish to extend/override the function of the EcAlerter class in
|
|
* handling alerts, we may do so by specifying the name of a subclass of
|
|
* EcAlerter. The Control server used will attempt to find a bundle with
|
|
* that name, and load it to obtain the class to use in place of EcAlerter.
|
|
AlerterBundle = "foo";
|
|
*/
|
|
|
|
/* Default setup is to alert for high priority alarms and to
|
|
* send out reminders at five minute intervals.
|
|
* Individual rules should use the ReminderInterval option to
|
|
* control how often the rule handles a reminder (eg 1 in 6 will
|
|
* mean the rule action applies once every half hour).
|
|
*/
|
|
AlertAlarmThreshold = 2; /* Send alerts for critical and major alarms */
|
|
AlertReminderInterval = 5; /* Produce alarm reminders every 5 minutes */
|
|
|
|
/* The default email configuration is usual;ly correct for ht host and
|
|
* port but almost always wrong for the sender address ... edit it!
|
|
*/
|
|
EmailFrom = "alerter.test@localhost.localdomain";
|
|
EmailHost = "127.0.0.1";
|
|
EmailPort = "25";
|
|
|
|
Rules = (
|
|
|
|
/* We start by adding rules to handle alerts for cleared alarms,
|
|
* by adding some extra text to the basic alarm message.
|
|
*/
|
|
{
|
|
Type = "Clear";
|
|
DurationAbove = "59"; /* Alarm outstanding for an hour or more */
|
|
Rewrite = "{Original}\n\nCleared after {Hours} hours.";
|
|
},
|
|
{
|
|
Type = "Clear";
|
|
DurationBelow = "60"; /* Alarm outstanding for under an hour */
|
|
Rewrite = "{Original}\n\nCleared after {Minutes} minutes.";
|
|
},
|
|
{
|
|
Type = "Clear";
|
|
/* Set a good subject for the email.
|
|
*/
|
|
Subject = "Clear {Identifier} ({SeverityText})";
|
|
Email = (
|
|
/* Send to the responsible email destination defined in the alarm
|
|
* or fall back to sending to myaccount@localhost.localdomain
|
|
*/
|
|
"{ResponsibleEmail}myaccount@localhost.localdomain"
|
|
);
|
|
Stop = YES; /* Don't go on to any general alerts */
|
|
},
|
|
|
|
/* Now the remaining uncleared alarms.
|
|
*/
|
|
{
|
|
Type = "Alarm";
|
|
DurationAbove = "59"; /* Alarm outstanding for an hour or more */
|
|
Rewrite = "{Original}\n\nAlarm outstanding for {Hours} hours.";
|
|
},
|
|
{
|
|
Type = "Alarm";
|
|
DurationBelow = "60"; /* Alarm outstanding for under an hour */
|
|
Rewrite = "{Original}\n\nAlarm outstanding for {Minutes} minutes.";
|
|
},
|
|
{
|
|
Type = "Alarm";
|
|
Subject = "Alarm {Identifier} ({SeverityText})";
|
|
Email = (
|
|
"{ResponsibleEmail}myaccount@localhost.localdomain"
|
|
);
|
|
Stop = YES; /* Don't go on to any general alerts */
|
|
},
|
|
|
|
{
|
|
/* Discard any unmatched alarm reminders by matching all of them.
|
|
*/
|
|
ReminderInterval = 1;
|
|
Stop = YES;
|
|
},
|
|
{
|
|
/* Fallback rule ... there are no 'matching' fields in this
|
|
* rule, so it matches any message which has not already been
|
|
* matched by a rule containing 'Stop=YES'
|
|
* All previously unmatched messages get emailed.
|
|
*/
|
|
Email = (
|
|
"myaccount@localhost.localdomain"
|
|
);
|
|
/* Log all alerts.
|
|
*/
|
|
Log = ("file:alertlog");
|
|
}
|
|
);
|
|
}
|