WAARP-GATEWAY-MIB DEFINITIONS ::= BEGIN

IMPORTS
    NOTIFICATION-GROUP, OBJECT-GROUP
        FROM SNMPv2-CONF
    MODULE-IDENTITY, NOTIFICATION-TYPE, OBJECT-TYPE, enterprises, Unsigned32, Gauge32, Counter64, TimeTicks
        FROM SNMPv2-SMI
    ;

gateway MODULE-IDENTITY
    LAST-UPDATED "202507230000Z"
    ORGANIZATION
        "Waarp SAS"
    CONTACT-INFO
    "postal: 65 rue de la Croix
             92000 Nanterre - France
     phone: (+33) 01 56 38 51 08
     email: info@waarp.fr"
    DESCRIPTION
        "The MIB module describing the Waarp-Gateway SNMP interface"
    REVISION    "202507230000Z"
    DESCRIPTION
        "Third version of the Waarp Gateway MIB, with the addition of the instance
        name property to notifications."
    ::= { waarp 77 }

-- Root
waarp OBJECT IDENTIFIER ::= { enterprises 66666 }

instanceName OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the Gateway instance (as defined in its config file)"
    ::= { gateway 99 }

-- 1. Notifications
gwNotifs OBJECT IDENTIFIER ::= { gateway 0 }

serviceErrorNotif NOTIFICATION-TYPE
    OBJECTS
        { serviceErrorName, serviceErrorMessage }
    STATUS      current
    DESCRIPTION
        "The SNMP notification sent when a micro-service fails to either start or stop"
    ::= { gwNotifs 1 }

transferErrorNotif NOTIFICATION-TYPE
    OBJECTS {
                transferErrorID,
                transferErrorRemoteID,
                transferErrorRuleName,
                transferErrorClientName,
                transferErrorRequester,
                transferErrorRequested,
                transferErrorFilename,
                transferErrorDate,
                transferErrorCode,
                transferErrorMessage
            }
    STATUS      current
    DESCRIPTION
        "The SNMP notification sent when a transfer error occurs"
    ::= { gwNotifs 2 }

-- 2. Objects
gwObjects OBJECT IDENTIFIER ::= { gateway 1 }

notificationObjects OBJECT IDENTIFIER ::= { gwObjects 1 }
serviceErrorObjects OBJECT IDENTIFIER ::= { notificationObjects 1 }

serviceErrorName OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the service in error"
    ::= { serviceErrorObjects 1 }

serviceErrorMessage OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The error message"
    ::= { serviceErrorObjects 2 }

transferErrorObjects OBJECT IDENTIFIER ::= { notificationObjects 2 }

transferErrorID OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The transfer's internal database ID"
    ::= { transferErrorObjects 1 }

transferErrorRemoteID OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The transfer's public ID"
    ::= { transferErrorObjects 2 }

transferErrorRuleName OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the transfer's rule"
    ::= { transferErrorObjects 3 }

transferErrorClientName OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the client used for the transfer (if this was a client transfer)"
    ::= { transferErrorObjects 4 }

transferErrorRequester OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the local/remote account who requested the transfer"
    ::= { transferErrorObjects 5 }

transferErrorRequested OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the server/partner to which the transfer was requested from"
    ::= { transferErrorObjects 6 }

transferErrorFilename OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The name of the file transfered as it was given in the transfer request"
    ::= { transferErrorObjects 7 }

transferErrorDate OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The date at which the transfer error occured (in ISO-8601 format)"
    ::= { transferErrorObjects 8 }

transferErrorCode OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The code of the transfer's error"
    ::= { transferErrorObjects 9 }

transferErrorMessage OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The transfer's error message"
    ::= { transferErrorObjects 10 }

appInfoObjects OBJECT IDENTIFIER ::= { gwObjects 2 }

appVersion OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The application's current version"
    ::= { appInfoObjects 1 }

appUptime OBJECT-TYPE
    SYNTAX          TimeTicks
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The time elapsed since the application launch (in 100th of a second)"
    ::= { appInfoObjects 2 }

resourcesInfoObjects OBJECT IDENTIFIER ::= { gwObjects 3 }

memoryUsage OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The amount of memory used by the application (in kB)"
    ::= { resourcesInfoObjects 1 }

cpuNumber OBJECT-TYPE
    SYNTAX          Unsigned32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of available (logical) CPU cores on the machine"
    ::= { resourcesInfoObjects 2 }

goroutineNumber OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of active goroutines (or threads) in the appication"
    ::= { resourcesInfoObjects 3 }

incomingConnections OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of open incoming connections made to the application"
    ::= { resourcesInfoObjects 4 }

outgoingConnections OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of open outbboing connections made by the application"
    ::= { resourcesInfoObjects 5 }

--incomingTrafic OBJECT-TYPE
--    SYNTAX          Gauge32
--    MAX-ACCESS      read-only
--    STATUS          current
--    DESCRIPTION
--        "The total incoming trafic on the application (in kB/s)"
--    ::= { resourcesInfoObjects 6 }

--outgoingTrafic OBJECT-TYPE
--    SYNTAX          Gauge32
--    MAX-ACCESS      read-only
--    STATUS          current
--    DESCRIPTION
--        "The total outgoing trafic on the application (in kB/s)"
--    ::= { resourcesInfoObjects 7 }

lastTransferObjects OBJECT IDENTIFIER ::= { gwObjects 4 }

lastTransferID OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The ID of the last started transfer"
    ::= { lastTransferObjects 1 }

lastTransferDate OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The last transfer's start time (in ISO 8601 format)"
    ::= { lastTransferObjects 2 }

lastTransferStatus OBJECT-TYPE
    SYNTAX          OCTET STRING
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The last transfer's status (running, error, ...)"
    ::= { lastTransferObjects 3 }

transfersStatisticsObjects OBJECT IDENTIFIER ::= { gwObjects 5 }

nbTransfersRunning OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of currently running transfers on the application"
    ::= { transfersStatisticsObjects 1 }

nbTransfersInError OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The total number of transfers currently in error"
    ::= { transfersStatisticsObjects 2 }

nbTransfersFinished OBJECT-TYPE
    SYNTAX          Counter64
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The total number of finished transfers"
    ::= { transfersStatisticsObjects 3 }

nbTransfersCanceled OBJECT-TYPE
    SYNTAX          Counter64
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The total number of canceled transfers"
    ::= { transfersStatisticsObjects 4 }

nbTransfersAll OBJECT-TYPE
    SYNTAX          Counter64
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The total number of all transfers"
    ::= { transfersStatisticsObjects 5 }

transferErrorStatisticsObjects OBJECT IDENTIFIER ::= { gwObjects 6 }

nbTransfersErrorUnknown OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with unknown errors"
    ::= { transferErrorStatisticsObjects 1 }

nbTransfersErrorInternal OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with internal errors"
    ::= { transferErrorStatisticsObjects 2 }

nbTransfersErrorConnection OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with connection errors"
    ::= { transferErrorStatisticsObjects 3 }

nbTransfersErrorAuthentication OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with authentication errors"
    ::= { transferErrorStatisticsObjects 4 }

nbTransfersErrorAuthorization OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with authorization errors"
    ::= { transferErrorStatisticsObjects 5 }

nbTransfersErrorFileNotFound OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with file not found errors"
    ::= { transferErrorStatisticsObjects 6 }

nbTransfersErrorExternalOp OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with external operations errors"
    ::= { transferErrorStatisticsObjects 7 }

nbTransfersErrorFinalization OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with finalization errors"
    ::= { transferErrorStatisticsObjects 8 }

nbTransfersErrorIntegrity OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The number of transfers with file integrity errors"
    ::= { transferErrorStatisticsObjects 9 }

-- 3. Groups
gwGroups OBJECT IDENTIFIER ::= { gateway 2 }

gwNotifsGroup NOTIFICATION-GROUP
    NOTIFICATIONS
        { serviceErrorNotif, transferErrorNotif }
    STATUS          current
    DESCRIPTION
        "The group of all Waarp-Gateway SNMPv2 notifications"
    ::= { gwGroups 1 }

serviceErrorGroup OBJECT-GROUP
    OBJECTS
        { instanceName, serviceErrorName, serviceErrorMessage }
    STATUS      current
    DESCRIPTION
        "The properties sent in the service error notification"
    ::= { gwGroups 2 }

transferErrorGroup OBJECT-GROUP
    OBJECTS {
                instanceName,
                transferErrorID,
                transferErrorRemoteID,
                transferErrorRuleName,
                transferErrorClientName,
                transferErrorRequester,
                transferErrorRequested,
                transferErrorFilename,
                transferErrorDate,
                transferErrorCode,
                transferErrorMessage
            }
    STATUS          current
    DESCRIPTION
        "The properties sent in the transfer notification"
    ::= { gwGroups 3 }

applicationInfoGroup OBJECT-GROUP
    OBJECTS
        { appVersion, appUptime }
    STATUS          current
    DESCRIPTION
        "Properties of the Gateway application itself"
    ::= { gwGroups 4 }

ressourcesInfoGroup OBJECT-GROUP
    OBJECTS
        {
            memoryUsage,
            cpuNumber,
            goroutineNumber,
            incomingConnections,
            outgoingConnections
            --incomingTrafic,
            --outgoingTrafic
        }
    STATUS          current
    DESCRIPTION
        "Information about the machine ressources allocated to the application"
    ::= { gwGroups 5 }

lastTransferInfoGroup OBJECT-GROUP
    OBJECTS
        { lastTransferID, lastTransferDate, lastTransferStatus }
    STATUS          current
    DESCRIPTION
        "Properties of the last transfer"
    ::= { gwGroups 6 }

transferStatsGroup OBJECT-GROUP
    OBJECTS
        {
            nbTransfersAll,
            nbTransfersRunning,
            nbTransfersInError,
            nbTransfersFinished,
            nbTransfersCanceled
        }
    STATUS          current
    DESCRIPTION
        "Statistics about file transfers"
    ::= { gwGroups 7 }

transferErrorsStatsGroup OBJECT-GROUP
    OBJECTS
        {
            nbTransfersErrorUnknown,
            nbTransfersErrorInternal,
            nbTransfersErrorConnection,
            nbTransfersErrorAuthentication,
            nbTransfersErrorAuthorization,
            nbTransfersErrorFileNotFound,
            nbTransfersErrorExternalOp,
            nbTransfersErrorFinalization,
            nbTransfersErrorIntegrity
        }
    STATUS          current
    DESCRIPTION
        "Statistics about transfers errors"
    ::= { gwGroups 8 }

END