RHQ-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, snmpModules, enterprises
        FROM SNMPv2-SMI
    coldStart
        FROM SNMPv2-MIB
    OBJECT-GROUP, NOTIFICATION-GROUP, MODULE-COMPLIANCE
        FROM SNMPv2-CONF
    DisplayString
        FROM SNMPv2-TC;

rhqMIB MODULE-IDENTITY
    LAST-UPDATED    "201112200000Z"
    ORGANIZATION    "RHQ-Project"
    CONTACT-INFO    "http://www.rhq-project.org/"
    DESCRIPTION
        "The MIB module for RHQ alerts.

        This file is part of the RHQ management platform
        Copyright (C) 2005-2011 Red Hat, Inc.
        All rights reserved.
    "

    REVISION        "200807110000Z"
    DESCRIPTION     "Initial version"
    REVISION        "201010180000Z"
    DESCRIPTION     "Better trap support"
    REVISION        "201112200000Z"
    DESCRIPTION     "Also emit resource lineage"
    ::= { snmpModules 1 }

jboss       OBJECT IDENTIFIER ::= {enterprises 18016 }

rhq         OBJECT IDENTIFIER ::= {jboss 2 }

alert       OBJECT IDENTIFIER ::= {rhq 1 }


alertName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The name of the alert definition for this alert"
    ::= { alert 1 }

alertResourceName   OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The name of the resource that triggered the alert"
    ::= { alert 2 }


alertPlatformName      OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The name of the platform hosting the resource"
    ::= { alert 3 }


alertCondition      OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..4096))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The conditions leading to the alert"
    ::= { alert 4 }

alertSeverity       OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Severity of the alert."
    ::= { alert 5 }

alertUrl        OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..1024))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The url of the individual alert"
    ::= { alert 6 }

alertHierarchy        OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..1024))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The hierarchy of the resource that triggered the alert"
    ::= { alert 6 }

-- conformance information

snmpMIBConformance
               OBJECT IDENTIFIER ::= { rhqMIB 2 }

snmpMIBCompliances
               OBJECT IDENTIFIER ::= { snmpMIBConformance 1 }
snmpMIBGroups  OBJECT IDENTIFIER ::= { snmpMIBConformance 2 }

-- compliance statements

snmpBasicCompliance MODULE-COMPLIANCE
    STATUS  current
    DESCRIPTION "TODO"
    MODULE
        MANDATORY-GROUPS { alertGroup, trapGroup }

    ::= { snmpMIBCompliances 2 }

alertGroup OBJECT-GROUP
    OBJECTS {   alertName,
                alertResourceName,
                alertPlatformName,
                alertCondition,
                alertSeverity,
                alertUrl,
                alertHierarchy }
    STATUS  current
    DESCRIPTION "A collection of objects providing information about an alert"
    ::= { snmpMIBGroups 1 }

trapGroup NOTIFICATION-GROUP
    NOTIFICATIONS { coldStart }
    STATUS  current
    DESCRIPTION "A collection of notifications for alerts"
    ::= { snmpMIBGroups 2 }

END
