Heka Alert IDRouter Lookup Module

idrouter provides identifier specific alert routing. It is intended to be used as a lookup module in the Heka alert module.

The configuration of this module is used to control how alerts are routed.

The subjects configuration contains any user specific alerting parameters. Each entry within subjects should be a key, which represents the standardized user identity string, and a table containing configuration parameters.

At the least, each subjects entry should contain a mapfrom parameter. This is used to locate the correct subject entry using the lookup data subject string. Where the lookup data subject string matches an entry in mapfrom, this identity configuration will be used for the alert.

email and IRC alerts are currently supported. For each type, three categories exist.

Direct notification is used to determine how to route the alert directly to the user, and will be used if senduser is set to true in lookup data.

Global notification is used when sendglobal is set to true in the lookup data.

Error notification is used when senderror is set to true in the lookup data.

A catchall setting can be set for each category for both IRC and email alerts. If the subject entry does not specify a given category setting, the catchall will be used for the alert.

If lookup data is specified that does not contain a subject entry or does not match any known subject, no direct alerts can be generated for the user -- however global and error alerts may still fire depending on the lookup data settings.

Format strings are supported in a given category notification string. If %s is present in the string value, the users standardized identity will be used in its place in the resulting destination. If not specified, the string is used literally.

1. Sample Configuration

alert = {
    lookup = "idrouter",
    modules = {
        idrouter = {
            subjects = {
                riker =  {
                    mapfrom = { "riker", "commanderriker" },
                },
                picard =  {
                    mapfrom = { "picard", "teaearlgreyhot" },
                    email = {
                        direct = "jean-luc@uss-enterprise"
                    }
                },
            },
            email = {
                direct = "manatee-%s@moz-svc-ops.pagerduty.com",
                global = "foxsec-dump+OutOfHours@mozilla.com"
            },
            irc = {
                global = "irc.server#target"
            }
        }
    }
}

source code: idrouter.lua

results matching ""

    No results matching ""