CYRUS-MASTER-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Counter32, TimeTicks, Gauge32
        FROM SNMPv2-SMI
    DisplayString
        FROM SNMPv2-TC
    cmuCyrus
        FROM CMU-MIB;

cyrusMasterMIB MODULE-IDENTITY
    LAST-UPDATED "201801090840Z"        -- 2018 January 9
    ORGANIZATION "CMU Project Cyrus"
    CONTACT-INFO
                "       WWW: https://github.com/cyrusimap/cyrus-imapd/

                        Project Cyrus
                        Computing Services
                        Carnegie Mellon University
                        Pittsburgh PA. 15213
                "
    DESCRIPTION "A simple MIB for application status of the Cyrus
                 master process.
                "
    REVISION    "201801090840Z"
    DESCRIPTION "Running smilint on the module"
        ::= { cmuCyrus 1 }
           -- cmuCyrus = .1.3.6.1.4.1.3.6
           -- cyrusMasterMIB = .1.3.6.1.4.1.3.6.1

-- general information

cyrusMasterInfo OBJECT IDENTIFIER ::= { cyrusMasterMIB 1 }

  -- version information

   cyrusMasterInfoDescr  OBJECT-TYPE

                         SYNTAX     DisplayString (SIZE (0..255))

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION   "A general textual description

                                        of the Cyrus server."

                         ::= { cyrusMasterInfo 1 }

   cyrusMasterInfoVers   OBJECT-TYPE

                         SYNTAX     DisplayString (SIZE (0..255))

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION  "The version of the Cyrus server."

                         ::= { cyrusMasterInfo 2 }

   cyrusMasterInfoUptime OBJECT-TYPE

                         SYNTAX     TimeTicks

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION "The amount of time since the master
                                      process was last started."

                         ::= { cyrusMasterInfo 3 }

   -- service table

   serviceTable          OBJECT-TYPE

                         SYNTAX     SEQUENCE OF ServiceEntry

                         MAX-ACCESS not-accessible

                         STATUS     current

                         ::= { cyrusMasterMIB 2 }


   serviceEntry          OBJECT-TYPE

                         SYNTAX     ServiceEntry

                         MAX-ACCESS not-accessible

                         STATUS     current

                         INDEX     { serviceId }

                         ::= { serviceTable 1 }


   ServiceEntry      ::= SEQUENCE {

                         serviceForks           Counter32,

                         serviceActive          Gauge32,

                         serviceName            DisplayString (SIZE (0..255)),

                         serviceId              INTEGER,

                         serviceConnections     Counter32

                         }

      -- forks since startup
      serviceForks       OBJECT-TYPE

                         SYNTAX     Counter32

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION  "The total number of forks for this
                                       service since initialization."

                         ::= { serviceEntry 1 }



      -- active children
      serviceActive      OBJECT-TYPE

                         SYNTAX     Gauge32

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION  "The total number of children currently

                                       active."

                         ::= { serviceEntry 2 }


      serviceName        OBJECT-TYPE

                         SYNTAX     DisplayString (SIZE (0..255))

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION  "The name of this service."

                         ::= { serviceEntry 3 }

      serviceId          OBJECT-TYPE

                         SYNTAX     INTEGER

                         MAX-ACCESS not-accessible

                         STATUS     current

                         DESCRIPTION  "The id of the service as configured."

                         ::= { serviceEntry 4 }

      -- connections since startup
      serviceConnections  OBJECT-TYPE

                         SYNTAX     Counter32

                         MAX-ACCESS read-only

                         STATUS     current

                         DESCRIPTION  "The total number of connections for this
                                       service since initialization."

                         ::= { serviceEntry 5 }

-- event table

--   eventTable            OBJECT-TYPE
--                         SYNTAX     SEQUENCE OF eventEntry
--                         ACCESS     not-accessible
--                         STATUS     mandatory
--                         ::= { cyrusMasterMIB 3 }

END
