-- *****************************************************************
-- NETROUNDS-MIB:  Juniper Networks
--
-- Copyright (c) 2020, Juniper Networks
--
-- ****************************************************************

NETROUNDS-MIB  DEFINITIONS ::= BEGIN

IMPORTS
   MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, enterprises, Integer32
      FROM SNMPv2-SMI
   OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
      FROM SNMPv2-CONF;

netroundsMIB  MODULE-IDENTITY
   LAST-UPDATED "202012180000Z"
   ORGANIZATION "Juniper Networks"
   CONTACT-INFO
      "Juniper Networks
       1133 Innovation Way
       Sunnyvale, California 94089
       USA
       E-mail: paragonactiveassurance@juniper.net"
   DESCRIPTION
      "MIB definition for alarms from PAA."

   REVISION "202012180000Z"
   DESCRIPTION
       "Adapt to the Juniper"

   REVISION "202003060000Z"
   DESCRIPTION
       "Adds clearTime"

   REVISION "202001070000Z"
   DESCRIPTION
       "Adds endpoint and eventTime"

   REVISION "201910140000Z"
   DESCRIPTION
       "New and updated MIB conforming to the new alarm solution"

   REVISION "201909160000Z"
   DESCRIPTION
       "Added groupId, monitoringId and streamId fields"

   REVISION "201811230000Z"
   DESCRIPTION
       "Move the OID subtree definition"

   REVISION "201412030000Z"
   DESCRIPTION
      "Updates to the MIB to better conform to standards"

   REVISION "201411120000Z"
   DESCRIPTION
      "New and updated MIB conforming to the new alarm solution"

   ::= { enterprises 34143 }

-- #########################################################
-- Netrounds objects
-- #########################################################

netroundsNotifications OBJECT IDENTIFIER ::= { netroundsMIB 0 }
netroundsTrapObjects OBJECT IDENTIFIER ::= { netroundsMIB 1 }
netroundsCompliances OBJECT IDENTIFIER ::= { netroundsMIB 2 }
netroundsNotificationGroup OBJECT IDENTIFIER ::= { netroundsMIB 3 }

key OBJECT-TYPE
   SYNTAX Integer32
   MAX-ACCESS accessible-for-notify
   STATUS current
   DESCRIPTION
     "The identifier for the alarm. This is equal to stream id when
     traps per stream are being used and monitor id otherwise.
     The key may not be unique when there are multiple alarms with mixed
     snmp trap per stream setting."
   ::= { netroundsTrapObjects 1 }

type OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The type of the stream that caused the error. This will be
      for example DNS, HTTP, or UDP."
   ::= { netroundsTrapObjects 2 }

monitor OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The name of the monitor."
   ::= { netroundsTrapObjects 3 }

testAgent OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The name of the test agent reporting the problem."
   ::= { netroundsTrapObjects 4 }

testAgentId OBJECT-TYPE
   SYNTAX Integer32
   MAX-ACCESS accessible-for-notify
   STATUS current
   DESCRIPTION
     "The id of the test agent reporting the problem."
   ::= { netroundsTrapObjects 5 }

stream OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The name of the stream experiencing the problem."
   ::= { netroundsTrapObjects 6 }

severity OBJECT-TYPE
   SYNTAX INTEGER {
      clear(0),
      warning(1),
      minor(2),
      major(3),
      critical(4)
   }
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The severity that the alarm currently has."
   ::= { netroundsTrapObjects 7 }

alarmInfo OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "Textual description containing human readable information about the
      alarm and its cause."
   ::= { netroundsTrapObjects 8 }

action OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "Action created when specifying the alarm thresholds."
   ::= { netroundsTrapObjects 9 }

link OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "Link to the monitor that triggered the alarm."
   ::= { netroundsTrapObjects 10 }

tags OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS accessible-for-notify
   STATUS current
   DESCRIPTION
     "Tags for monitor that triggered the alarm."
   ::= { netroundsTrapObjects 11 }

monitorId OBJECT-TYPE
   SYNTAX Integer32
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The id of the monitor that triggered the alarm."
   ::= { netroundsTrapObjects 12 }

taskId OBJECT-TYPE
   SYNTAX Integer32
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The id of the task that triggered the alarm."
   ::= { netroundsTrapObjects 13 }

streamId OBJECT-TYPE
   SYNTAX Integer32
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The id of the stream that triggered the alarm."
   ::= { netroundsTrapObjects 14 }

task OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..100))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The name of the task that triggered the alarm."
   ::= { netroundsTrapObjects 15 }

endpoint OBJECT-TYPE
   SYNTAX  OCTET STRING (SIZE (0..1024))
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "The name of the stream endpoint."
   ::= { netroundsTrapObjects 16 }

eventTime OBJECT-TYPE
   SYNTAX  Integer32
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "Timestamp when the event occured."
   ::= { netroundsTrapObjects 17 }

clearTime OBJECT-TYPE
   SYNTAX  Integer32
   MAX-ACCESS  accessible-for-notify
   STATUS current
   DESCRIPTION
      "Timestamp when the event was closed."
   ::= { netroundsTrapObjects 18 }



-- #########################################################
-- Compliance
-- #########################################################

netroundsCompliance MODULE-COMPLIANCE
   STATUS current
   DESCRIPTION
      "Compliance statement"
   MODULE
      MANDATORY-GROUPS {
         netroundsObjects,
         netroundsNotification
      }
   ::= { netroundsCompliances 1 }

netroundsObjects OBJECT-GROUP
   OBJECTS {
      key,
      type,
      monitor,
      testAgent,
      testAgentId,
      stream,
      severity,
      action,
      alarmInfo,
      link,
      tags,
      monitorId,
      taskId,
      streamId,
      task,
      endpoint,
      eventTime,
      clearTime
   }
   STATUS current
   DESCRIPTION "Objects specified in the MIB"
   ::= { netroundsMIB 4 }

netroundsNotification NOTIFICATION-GROUP
   NOTIFICATIONS { netroundsAlarm }
   STATUS current
   DESCRIPTION
      "Compliance statement"
   ::= { netroundsNotificationGroup 5 }

-- #########################################################
-- Netrounds notifications
-- #########################################################

netroundsAlarm NOTIFICATION-TYPE
   OBJECTS {
      key,
      type,
      monitor,
      testAgent,
      testAgentId,
      severity,
      alarmInfo,
      action,
      link,
      tags,
      monitorId,
      taskId,
      stream,
      streamId,
      task,
      endpoint,
      eventTime,
      clearTime
   }
   STATUS current
   DESCRIPTION
      "The notification sent when a monitor raises an alarm."
   ::= { netroundsNotifications 2 }

END
