Skip to content

Instantly share code, notes, and snippets.

@ashraf-s9s
Last active May 30, 2021 10:55
Show Gist options
  • Save ashraf-s9s/6bb5ee726e4412728ca7ad0b731c692c to your computer and use it in GitHub Desktop.
Save ashraf-s9s/6bb5ee726e4412728ca7ad0b731c692c to your computer and use it in GitHub Desktop.
A proof-of-concept for ClusterControl Alarms' MIB
-- *****************************************************************
-- SEVERALNINES-CLUSTERCONTROL-MIB
-- Severalnines ClusterControl SNMP MIB
--
-- May 8, 2021 Ashraf Sharif (0.1) - POC
--
-- Copyright (c) 2021 by Severalnines AB
-- All rights reserved.
-- *****************************************************************
SEVERALNINES-CLUSTERCONTROL-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, enterprises, OBJECT-TYPE, Integer32, NOTIFICATION-TYPE
FROM SNMPv2-SMI
OBJECT-GROUP
FROM SNMPv2-CONF;
severalnines MODULE-IDENTITY
LAST-UPDATED "202105080000Z"
ORGANIZATION "Severalnines AB"
CONTACT-INFO
"Severalnines AB
severalnines.com
Postal: Knipuddevagen 18,
SE-394 77 Kalmar, Sweden
Phone: +46317538888
Email: info@severalnines.com"
DESCRIPTION
"This MIB contains definition of the SNMP Traps associated
to alerts sent by Severalnines ClusterControl."
REVISION
"202105080000Z"
DESCRIPTION
"First revision for POC"
::= { enterprises 57397 }
-- clustercontrolMIB
-- OID: 1.3.6.1.4.1.57397.1
-- iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).severalnines(57397).clustercontrolMIB(1)
clustercontrolMIB OBJECT IDENTIFIER ::= { severalnines 1 }
-- ClusterControl Alarms
-- OID: 1.3.6.1.4.1.57397.1.1
-- iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).severalnines(57397).clustercontrolMIB(1).alarms(1)
alarms OBJECT IDENTIFIER ::= { clustercontrolMIB 1 }
-- Alarm's summary
-- OID: 1.3.6.1.4.1.57397.1.1.1
-- iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).severalnines(57397).clustercontrolMIB(1).alarms(1).alarmSummary(1)
alarmSummary OBJECT IDENTIFIER ::= { alarms 1 }
totalAlarms OBJECT-TYPE
SYNTAX Integer32(0..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of active alarms."
::= { alarmSummary 1 }
totalCritical OBJECT-TYPE
SYNTAX Integer32(0..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of active critical alarms."
::= { alarmSummary 2 }
totalWarning OBJECT-TYPE
SYNTAX Integer32(0..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of active warning alarms."
::= { alarmSummary 3 }
clusterId OBJECT-TYPE
SYNTAX Integer32(0..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The cluster ID."
::= { alarmSummary 4 }
-- Object group
-- OID: 1.3.6.1.4.1.57397.1.1.2
-- iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).severalnines(57397).clustercontrolMIB(1).alarms(1).alarmSummaryGroup(2)
alarmSummaryGroup OBJECT-GROUP
OBJECTS { totalAlarms, totalCritical, totalWarning, clusterId }
STATUS current
DESCRIPTION
"A collection of objects for alarm's summary"
::= { alarms 2 }
-- Alarm notification
-- OID: 1.3.6.1.4.1.57397.1.1.3
-- iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).severalnines(57397).clustercontrolMIB(1).alarms(1).alarmNotification(3)
alarmNotification OBJECT IDENTIFIER ::= { alarms 3 }
criticalAlarmNotification NOTIFICATION-TYPE
OBJECTS { totalCritical, clusterId }
STATUS current
DESCRIPTION
"Notification if critical alarm is not 0"
::= { alarmNotification 1 }
criticalAlarmNotificationEnded NOTIFICATION-TYPE
OBJECTS { totalCritical, clusterId }
STATUS current
DESCRIPTION
"Notification ended - Critical alarm is 0"
::= { alarmNotification 2 }
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment