Child pages
  • Event Classes
Skip to end of metadata
Go to start of metadata
Example of "Link Down" and "Link Up" event class
    {
        "name": "Network | Link | Link Down",
        "description": "Link Down",
        "action": "A",
        "link_event": true,
        "text" : {
            "en": {
                "subject_template": "Link Down: {{interface}}",
                "body_template": "Link Down: {{interface}}",
                "symptoms": "Connection lost",
                "probable_causes": "Administrative action, cable damage, hardware or software error either from this or from another side",
                "recommended_actions": "Check configuration, both sides of links and hardware"
            }
        },
        "vars": [
            {
                "name": "interface",
                "description": "Affected interface",
                "type": "interface_name",
                "required": true
            }
        ],
        "disposition": [
            {
                "name": "dispose",
                "action": "raise",
                "alarm_class__name": "Network | Link | Link Down"
            }
        ]
    },
    {
        "name": "Network | Link | Link Up",
        "description": "Link Up",
        "action": "A",
        "link_event": true,
        "text" : {
            "en": {
                "subject_template": "Link Up: {{interface}}{% if speed %}, Speed: {{speed}}{% endif %}{% if duplex %}, Duplex: {{duplex}}{% endif %}",
                "body_template": "Link Up: {{interface}}{% if speed %}, Speed: {{speed}}{% endif %}{% if duplex %}, Duplex: {{duplex}}{% endif %}",
                "symptoms": "Connection restored",
                "probable_causes": "Administrative action, cable or hardware replacement",
                "recommended_actions": "Check interfaces on both sides for possible errors"
            }
        },
        "vars": [
            {
                "name": "interface",
                "description": "Affected interface",
                "type": "interface_name",
                "required": true
            },
            {
                "name": "speed",
                "description": "Link speed",
                "type": "str",
                "required": false
            },
            {
                "name": "duplex",
                "description": "Duplex mode",
                "type": "str",
                "required": false
            }
        ],
        "disposition": [
            {
                "name": "Clear Link Down",
                "action": "clear",
                "alarm_class__name": "Network | Link | Link Down",
                "stop_disposition": false
            },
            {
                "name": "Clear Err-Disable",
                "action": "clear",
                "alarm_class__name": "Network | Link | Err-Disable",
                "stop_disposition": false
            },
            {
                "name": "Clear BPDU Guard Violation",
                "action": "clear",
                "alarm_class__name": "Network | STP | BPDU Guard Violation",
                "stop_disposition": false
            },
            {
                "name": "Clear Root Guard Violation",
                "action": "clear",
                "alarm_class__name": "Network | STP | Root Guard Violation",
                "stop_disposition": false
            }
        ]
    }

You may localize messages, produced by event class, simply type information in another language at "text" section. In this time only "en" localization are available. Messages support a Django template syntax for flexibility.

 

List of variable types, used in "vars" section:

TypeDescription
strValue are still unchanged
intValue will be passed to int() function
ipv4_addressValue will be passed to IPv4Parameter().clean() function
ipv6_addressValue will be passed to IPv6Parameter().clean() function
ip_addressValue will be passed to IPParameter().clean() function
ipv4_prefixValue will be passed to IPv4PrefixParameter.clean() function
ipv6_prefixValue will be passed to IPv6PrefixParameter.clean() function
ip_prefixValue will be passed to IPPrefixParameter.clean() function
macValue will be passed to MAC.clean() function
interface_nameValue will be passed to event.managed_object.profile.convert_interface_name() function
oidValue are still unchanged

List of action types in rule body:

TypeDescription
ALog & Archive
LLog
DDrop

List of action types in "disposition" rules:

TypeDescription
drop 
ignore 
raiseRaise alarm
clearClear alarm