--  -*- mode:snmp -*-

MONGO-MIB DEFINITIONS ::= BEGIN

--======================================================================
-- MIB for MongoDB 1.1.x
-- For more information, please see http://www.mongodb.org/
--======================================================================

IMPORTS
   OBJECT-TYPE, enterprises, Counter, Gauge, IpAddress, TimeTicks
      FROM RFC1155-SMI
   DisplayString
      FROM RFC1213-MIB;

--
-- mongodb 
--   server 1
--     system 1,1
--     opcounts 1,2
--        globalopcounts 1,2,1
--     memory 1,3

mongodb                 OBJECT IDENTIFIER ::= { enterprises 37601 }


serverTable OBJECT-TYPE
   SYNTAX SEQUENCE OF serverTableEntry
   ACCESS not-accessible
   STATUS mandatory
   DESCRIPTION
      "This table gives information and statistics for each server."
   ::= { mongodb 1 }

serverTableEntry OBJECT-TYPE
    SYNTAX ServerEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "This defines a server."
    INDEX { serverName }
    ::= { serverTable 1 }

serverName OBJECT-TYPE
   SYNTAX DisplayString (SIZE (0..255))
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "The port of the virtual server is the name."
   ::= { serverTableEntry 1 }

ServerEntry ::= SEQUENCE {
     serverName  DisplayString (SIZE (0..255)),
     system      OBJECT IDENTIFIER,
     opcounts    OBJECT IDENTIFIER,
     memory      OBJECT IDENTIFIER
}

system                  OBJECT IDENTIFIER ::= { serverTableEntry 2 }

opcounts                OBJECT IDENTIFIER ::= { serverTableEntry 3 }
globalopcounts          OBJECT IDENTIFIER ::= { opcounts 1 }

memory                  OBJECT IDENTIFIER ::= { serverTableEntry 4 }


--=============================================================================
-- Root for mongod
--=============================================================================

-- Root OID: .1.3.6.1.4.1.37601.1


--------
-- system
--------

port OBJECT-TYPE
   SYNTAX Integer32
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "port for this process"
   ::= { system 1 }


sysUpTime OBJECT-TYPE
   SYNTAX TimeTicks
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "uptime (in hundredths of a second)"
   ::= { system 2 }


--------
-- op counters
--------


globalOpInsert OBJECT-TYPE
   SYNTAX Counter
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "global insert counts"
   ::= { globalopcounts 1 }

globalOpQuery OBJECT-TYPE
   SYNTAX Counter
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "global query counts"
   ::= { globalopcounts 2 }

globalOpUpdate OBJECT-TYPE
   SYNTAX Counter
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "global update counts"
   ::= { globalopcounts 3 }

globalOpDelete OBJECT-TYPE
   SYNTAX Counter
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "global delete counts"
   ::= { globalopcounts 4 }

globalOpGetMore OBJECT-TYPE
   SYNTAX Counter
   ACCESS read-only
   STATUS mandatory
   DESCRIPTION
      "global get more counts"
   ::= { globalopcounts 5 }



--------
-- memory
--------

memoryResident OBJECT-TYPE
   SYNTAX Integer32
   UNITS       "MB"
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "resident memory used by mongod"
   ::= { memory 1 }

memoryVirtual OBJECT-TYPE
   SYNTAX Integer32
   UNITS       "MB"
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "virtual memory used by mongod"
   ::= { memory 2 }

memoryMapped OBJECT-TYPE
   SYNTAX Integer32
   UNITS       "MB"
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "data mapped into mongod"
   ::= { memory 3 }


END
