COVALENT-APACHE-STATUSv2-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Unsigned32, Counter32,
    enterprises
        FROM SNMPv2-SMI
    DisplayString, TEXTUAL-CONVENTION, TimeStamp, TruthValue
        FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP
        FROM SNMPv2-CONF
    applIndex
        FROM NETWORK-SERVICES-MIB;

covalentApacheStatusV2MIB MODULE-IDENTITY
    LAST-UPDATED "200204020000Z"
    ORGANIZATION 
	"Copyright (C) Covalent Technologies (2000-2002).  All Rights Reserved."
    CONTACT-INFO 
        "SNMP Engineering
         Covalent Technologies
         postal: 303 Second Street
                 Suite 375 South
                 San Francisco, CA 94107
         tel:    +1-800-444-1935
         email: support@covalent.net"
    DESCRIPTION 
        "This module defines managed objects to convey management information
         about the current handled connections by the Apache HTTP server.
         
         It provides a per process and per thread handled request information.
         If a process is not handling a request at that moment the
         information of the last handled request is provided.
         The information provided is similar as the server status page,
         http://www/server-status/.

         $Id: COVALENT-APACHE-STATUSv2-MIB.txt 8676 2008-01-17 23:11:17Z ispringer $"
    ::= { covalent 12 }

covalent OBJECT IDENTIFIER
    ::= { enterprises 6100 }

CtApacheStatusOperType ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION 
        "The server status types in which the processes and the threads
         of the Apache HTTP server can be.

         dead(1):       server is dead.
         starting(2):   server is starting up.
         ready(3):      waiting for a connection.
         reading(4):    reading a cleint request.
         write(5):      processing a client request.
         keepalive(6):  waiting for more connection via keepalive.
         log(7):        logging the request.
         dns(8):        looking up a hostname.
         graceful(9):   gracefully finishing request.
         accepting(10): thread is accepting connections
         queueing(11):  thread is putting connection on the queue
         idle_kill(12): server is cleaning up idle children

         If the MPM does not support threading a process is considered
         as using just 1 thread.
         The values are the status values of the Apache HTTP Server."
    SYNTAX      INTEGER { dead(1),
                          starting(2),
                          ready(3),
                          read(4), 
                          write(5),
                          keepalive(6),
                          log(7),
                          dns(8),
                          graceful(9),
                          accepting(10),
                          queueing(11),
                          idleORkill(12)
                        }

CtApacheStatusAdminType ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "The status to which the administrator can set a
         a process or thread. This is used to manage the
         Apache server processes and its client request
         processing.

                      up(1): the process or thread is up.
                    exit(2): the process or thread should exit immediately.
                graceful(3): the process or thread should gracefully exit,
                             by correctly handling its current connection.
             exitRequest(4): the process or thread should stop the
                             processing of the current request.
         gracefulRequest(5): the process or thread should gracefully
                             stop the processing of the current request."
    SYNTAX      INTEGER { up(1),
                          stop(2),
                          graceful(3),
                          exitRequest(4),
                          gracefulRequest(5)
                        }

ctApacheStatusV2MIBObjects OBJECT IDENTIFIER
    ::= { covalentApacheStatusV2MIB 1 }

ctApacheProcessStatusTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF CtApacheProcessStatusEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table maintains managed objects of the Apache Application
         on a per process basis for those processes handling requests.
         The table is maintained via 'slots' in which processes can 
         serve requests from clients.

         This table provides on a per client request handling process 
         basis management information which is used by the Apache 
         application itself."
    ::= { ctApacheStatusV2MIBObjects 1 }

ctApacheProcessStatusEntry OBJECT-TYPE
    SYNTAX      CtApacheProcessStatusEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The CtApacheProcessStatusEntry which provides a per process
         based information of the status of the Apache application.

         NOTE: Only those processes which handle client requests
         are maintained in this table."
    INDEX       { applIndex, ctApacheProcessStatusIndex }
    ::= { ctApacheProcessStatusTable 1 }

CtApacheProcessStatusEntry ::= SEQUENCE {
    ctApacheProcessStatusIndex                  Unsigned32,
    ctApacheProcessStatusProcessId              Unsigned32,
    ctApacheProcessStatusGeneration             Unsigned32,
    ctApacheProcessStatusShared                 TruthValue,
    ctApacheProcessStatusOperStatus             CtApacheStatusOperType,
    ctApacheProcessStatusAdminStatus            CtApacheStatusAdminType,
    ctApacheProcessStatusWorkers                Unsigned32
}

ctApacheProcessStatusIndex OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The scoreboard index 'slot' from which the request serving
         process maintained in this running Apache HTTP-server."
    ::= { ctApacheProcessStatusEntry 1 }

ctApacheProcessStatusProcessId OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The ProcessID of the current process serving requests
         from this slot."
    ::= { ctApacheProcessStatusEntry 2 }

ctApacheProcessStatusGeneration OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The genarion of the current process for this slot."
    ::= { ctApacheProcessStatusEntry 3 }

ctApacheProcessStatusShared OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An indicator whether the slot is shared amongst processes."
    ::= { ctApacheProcessStatusEntry 4 }

ctApacheProcessStatusOperStatus OBJECT-TYPE
    SYNTAX      CtApacheStatusOperType
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The status of the process."
    ::= { ctApacheProcessStatusEntry 5 }

ctApacheProcessStatusAdminStatus OBJECT-TYPE
    SYNTAX      CtApacheStatusAdminType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The desired state of the process by the administrator.
         This object can be used to explicitly stop a process."
    ::= { ctApacheProcessStatusEntry 6 }

ctApacheProcessStatusWorkers OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of threads handling client requests from this 
         process." 
    ::= { ctApacheProcessStatusEntry 7 }


ctApacheThreadStatusTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF CtApacheThreadStatusEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION 
        "This table maintains managed objects for the scoreboard.
         This table provides on a per thread basis information for
         the apache application processes which handle client
         requests.
         The table is maintained via 'slots' in which threads/processes
         can serve requests from clients."
    ::= { ctApacheStatusV2MIBObjects 2 }

ctApacheThreadStatusEntry OBJECT-TYPE
    SYNTAX      CtApacheThreadStatusEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION 
        "The ctApacheThreadStatusEntry."
    INDEX       { applIndex,
                  ctApacheProcessStatusIndex,
                  ctApacheThreadStatusIndex }
    ::= { ctApacheThreadStatusTable 1 }

CtApacheThreadStatusEntry ::= SEQUENCE {
    ctApacheThreadStatusIndex                  Unsigned32,
    ctApacheThreadStatusProcessId              Unsigned32,
    ctApacheThreadStatusThreadId               Unsigned32,
    ctApacheThreadStatusOperStatus             CtApacheStatusOperType,
    ctApacheThreadStatusAdminStatus            CtApacheStatusAdminType,
    ctApacheThreadStatusAccesses               Counter32,
    ctApacheThreadStatusBytes                  Counter32,
    ctApacheThreadStatusRequests               Counter32,
    ctApacheThreadStatusRequestBytes           Counter32,
    ctApacheThreadStatusConnBytes              Counter32,
    ctApacheThreadStatusConnCount              Counter32,
    ctApacheThreadStatusStartTime              TimeStamp,
    ctApacheThreadStatusStopTime               TimeStamp,
    ctApacheThreadStatusClient                 DisplayString,
    ctApacheThreadStatusRequest                DisplayString,
    ctApacheThreadStatusVirtualHost            Unsigned32
}

ctApacheThreadStatusIndex OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION 
        "The scoreboard index of the request serving process maintained
         in this running Apache HTTP-server."
    ::= { ctApacheThreadStatusEntry 1 }

ctApacheThreadStatusProcessId OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The ProcessID of the current process serving requests from this slot."
    ::= { ctApacheThreadStatusEntry 2 }

ctApacheThreadStatusThreadId OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The ThreadID of the current thread serving requests from this slot.
         If the Apache server is used in a fashion that it does not
         support threads for its client requests this value is 0."
    ::= { ctApacheThreadStatusEntry 3 }

ctApacheThreadStatusOperStatus OBJECT-TYPE
    SYNTAX      CtApacheStatusOperType
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The status of the request serving process."
    ::= { ctApacheThreadStatusEntry 4 }

ctApacheThreadStatusAdminStatus OBJECT-TYPE
    SYNTAX      CtApacheStatusAdminType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The administrators desired state for this thread."
    ::= { ctApacheThreadStatusEntry 5 }

ctApacheThreadStatusAccesses OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The total number of accesses handled by this slot in the
         server status.

        NOTE: This object has only a correct value when 'ExtendedStatus'
        is 'on'."
    ::= { ctApacheThreadStatusEntry 6 }

ctApacheThreadStatusBytes OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The total number of bytes responded by this slot in the
         server status.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 7 }

ctApacheThreadStatusRequests OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The number of accesses handled by current thread for this slot.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 8 }

ctApacheThreadStatusRequestBytes OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The number of bytes responded by thread for this slot.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 9 }

ctApacheThreadStatusConnBytes OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The number of bytes responded by the current connection for the
        request serving process for this slot.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 10 }

ctApacheThreadStatusConnCount OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The number of connections for the request serving process of
	this slot.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 11 }

ctApacheThreadStatusStartTime OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The timestamp of when this request serving process became active.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 12 }

ctApacheThreadStatusStopTime OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The timestamp of when this request serving process was finished.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 13 }

ctApacheThreadStatusClient OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The client that is connected to the request serving process.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 14 }

ctApacheThreadStatusRequest OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The request that the client request serving process.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 15 }

ctApacheThreadStatusVirtualHost OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION 
        "The virtual host being access at the request serving process.

        NOTE: This object has only a correct value when 'ExtendedStatus' 
        is 'on'."
    ::= { ctApacheThreadStatusEntry 16 }

ctApacheStatusV2MIBConformance OBJECT IDENTIFIER
    ::= { covalentApacheStatusV2MIB 2 }

ctApacheStatusV2MIBCompliances OBJECT IDENTIFIER
    ::= { ctApacheStatusV2MIBConformance 1 }

ctApacheStatusV2MIBGroups OBJECT IDENTIFIER
    ::= { ctApacheStatusV2MIBConformance 2 }

ctApacheProcessStatusV2Group OBJECT-GROUP
    OBJECTS     { ctApacheProcessStatusProcessId,
                  ctApacheProcessStatusGeneration,
                  ctApacheProcessStatusShared,
                  ctApacheProcessStatusOperStatus,
                  ctApacheProcessStatusAdminStatus,
                  ctApacheProcessStatusWorkers }
    STATUS      current
    DESCRIPTION
        "The objects that are maintained via the 'scoreboard' of
         the Apache HTTP server in order to provide management information
         on the current connections.

         This group provides on a per client request handling process
         basis management information which is used by the Apache
         application itself."
    ::= { ctApacheStatusV2MIBGroups 1 }

ctApacheThreadStatusV2Group OBJECT-GROUP
    OBJECTS     { ctApacheThreadStatusProcessId,
                  ctApacheThreadStatusThreadId,
                  ctApacheThreadStatusOperStatus, 
                  ctApacheThreadStatusAdminStatus, 
                  ctApacheThreadStatusAccesses,
                  ctApacheThreadStatusBytes,
                  ctApacheThreadStatusRequests,
                  ctApacheThreadStatusRequestBytes,
                  ctApacheThreadStatusConnBytes,
                  ctApacheThreadStatusConnCount,
                  ctApacheThreadStatusStartTime,
                  ctApacheThreadStatusStopTime,
                  ctApacheThreadStatusClient, 
                  ctApacheThreadStatusRequest,
                  ctApacheThreadStatusVirtualHost }
    STATUS      current
    DESCRIPTION 
        "The objects that are maintained via the 'scoreboard' of
         the Apache HTTP server in order to provide management information
         on the current connections.

         This group provides the per thread information. Those Apache
         application who do not use threading are considere to have just
         1 thread, the mian processing."
    ::= { ctApacheStatusV2MIBGroups 2 }

ctApacheStatusV2BasicCompliance MODULE-COMPLIANCE
    STATUS      current
    DESCRIPTION 
        "The basic compliance statement for the SCOREBOARD-MIB."
    MODULE      -- this module
        MANDATORY-GROUPS        {
                ctApacheProcessStatusV2Group,
                ctApacheThreadStatusV2Group }
    ::= { ctApacheStatusV2MIBCompliances 1 }

END
