--  ============================================================================
-- AT-LINKMON-MIB, Allied Telesis enterprise MIB:
-- Link Monitoring MIB objects.
--
-- Copyright (c) 2020 by Allied Telesis, Inc.
-- All rights reserved.
--
-- ============================================================================

    AT-LINKMON-MIB DEFINITIONS ::= BEGIN

        IMPORTS
            Integer32, Unsigned32, Counter64, OBJECT-TYPE, MODULE-IDENTITY
                FROM SNMPv2-SMI
            TEXTUAL-CONVENTION, TruthValue
                FROM SNMPv2-TC
            InetVersion
                FROM INET-ADDRESS-MIB
            modules, DisplayStringUnsized
                FROM AT-SMI-MIB
        ;

        -- 1.3.6.1.4.1.207.8.4.4.4.606
        atLinkMon MODULE-IDENTITY
            LAST-UPDATED "202009150000Z"
            ORGANIZATION
                "Allied Telesis, Inc"
            CONTACT-INFO
                "http://www.alliedtelesis.com"
            DESCRIPTION
                "The AT Link Monitoring MIB for reporting probe configuration, probe metrics, historical metric configuration and collection."
            REVISION "202009150000Z"
            DESCRIPTION
                "Initial Revision"
            ::= { modules 606 }


--
-- Textual conventions
--

        AtLinkMonType ::= TEXTUAL-CONVENTION
            STATUS current
            DESCRIPTION
                "Indicates the type of the probe."
            SYNTAX INTEGER
                {
                icmp(1),
                http(2)
                }



--
-- Node definitions
--

--
-- Probe Configuration Table
--

        atLinkMonProbeTable OBJECT-TYPE
            SYNTAX SEQUENCE OF AtLinkMonProbeEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "A table of information describing the configured Link Monitoring probes.
                Upon device reboot, probe OID's will be re-assigned based on the alphabetical
                naming of probes in the startup configuration."
            ::= { atLinkMon 1 }


        atLinkMonProbeEntry OBJECT-TYPE
            SYNTAX AtLinkMonProbeEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "The configuration of a specific probe."
            INDEX { atLinkMonProbeID }
            ::= { atLinkMonProbeTable 1 }

        AtLinkMonProbeEntry ::=
            SEQUENCE {
                atLinkMonProbeID
                    Unsigned32,
                atLinkMonProbeName
                    DisplayStringUnsized,
                atLinkMonProbeType
                    AtLinkMonType,
                atLinkMonProbeIPVersion
                    InetVersion,
                atLinkMonProbeDestination
                    DisplayStringUnsized,
                atLinkMonProbeEgressIf
                    DisplayStringUnsized,
                atLinkmonProbeEgreesIfValid
                    TruthValue,
                atLinkMonProbeSource
                    DisplayStringUnsized,
                atLinkMonProbeSourceValid
                    TruthValue,
                atLinkMonProbeDSCP
                    Unsigned32,
                atLinkMonProbePacketSize
                    Unsigned32,
                atLinkMonProbeInterval
                    Unsigned32,
                atLinkMonProbeSampleSize
                    Unsigned32,
                atLinkMonProbeEnabled
                    TruthValue
             }


        atLinkMonProbeID OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "ID of the probe."
            ::= { atLinkMonProbeEntry 1 }


        atLinkMonProbeName OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Name of the probe."
            ::= { atLinkMonProbeEntry 2 }


        atLinkMonProbeType OBJECT-TYPE
            SYNTAX AtLinkMonType
            UNITS "ICMP: 1, HTTP: 2"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Type of probe, ICMP PING or HTTP GET."
            ::= { atLinkMonProbeEntry 3 }


        atLinkMonProbeIPVersion OBJECT-TYPE
            SYNTAX InetVersion
            UNITS "IPv4: 1, IPv6: 2"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "IP version of the probe, IPv4 or IPv6."
            ::= { atLinkMonProbeEntry 4 }


        atLinkMonProbeDestination OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The destination of the probe."
            ::= { atLinkMonProbeEntry 5 }


        atLinkMonProbeEgressIf OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The interface that the probe packets should egress."
            ::= { atLinkMonProbeEntry 6 }


        atLinkmonProbeEgreesIfValid OBJECT-TYPE
            SYNTAX TruthValue
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Indicates if the interface that the probe packets egress is valid."
            ::= { atLinkMonProbeEntry 7 }


        atLinkMonProbeSource OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The source IP address or interface.
                Only applicable for ICMP Probes."
            ::= { atLinkMonProbeEntry 8 }


        atLinkMonProbeSourceValid OBJECT-TYPE
            SYNTAX TruthValue
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Indicates if the source IP address or interface is valid.
                Only applicable for ICMP Probes."
            ::= { atLinkMonProbeEntry 9 }


        atLinkMonProbeDSCP OBJECT-TYPE
            SYNTAX Unsigned32 (0..63)
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The DSCP value to use when sending the packet.
                Only applicable for ICMP Probes."
            ::= { atLinkMonProbeEntry 10 }


        atLinkMonProbePacketSize OBJECT-TYPE
            SYNTAX Unsigned32 (64..1500)
            UNITS "bytes"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The size of a probe packet.
                Only applicable for ICMP Probes."
            ::= { atLinkMonProbeEntry 11 }


        atLinkMonProbeInterval OBJECT-TYPE
            SYNTAX Unsigned32 (100..3600000)
            UNITS "ms"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The number of milliseconds between sending out each probe.
                Range for an ICMP Ping probe is 100-10000.
                Range for an HTTP Get probe is 30000-3600000."
            ::= { atLinkMonProbeEntry 12 }


        atLinkMonProbeSampleSize OBJECT-TYPE
            SYNTAX Unsigned32 (1..100)
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The number of probe results to use when calculating the latency and jitter metrics.
                Only applicable for ICMP Probes."
            ::= { atLinkMonProbeEntry 13 }


        atLinkMonProbeEnabled OBJECT-TYPE
            SYNTAX TruthValue
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Whether the probe is enabled or disabled.
                If it is enabled, then the device will attempt to send probes if the link is up.
                If it is disabled, then no probes will be sent."
            ::= { atLinkMonProbeEntry 14 }


--
-- Probe Detail Table
--

        atLinkMonProbeDetailTable OBJECT-TYPE
            SYNTAX SEQUENCE OF AtLinkMonProbeDetailEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "A table of information describing the latest Link Monitoring probe details.
                Upon device reboot, probe OID's will be re-assigned based on the alphabetical
                naming of probes in the startup configuration."
            ::= { atLinkMon 2 }


        atLinkMonProbeDetailEntry OBJECT-TYPE
            SYNTAX AtLinkMonProbeDetailEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "The latest detail of a specific probe."
            INDEX { atLinkMonProbeID }
            ::= { atLinkMonProbeDetailTable 1 }

        AtLinkMonProbeDetailEntry ::=
            SEQUENCE {
                atLinkMonProbeDetailProbesSent
                    Counter64,
                atLinkMonProbeDetailLastTxTime
                    DisplayStringUnsized,
                atLinkMonProbeDetailLastRxTime
                    DisplayStringUnsized
             }


        atLinkMonProbeDetailProbesSent OBJECT-TYPE
            SYNTAX Counter64
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The number of probes that have been sent."
            ::= { atLinkMonProbeDetailEntry 1 }


        atLinkMonProbeDetailLastTxTime OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The time that the last probe was sent."
            ::= { atLinkMonProbeDetailEntry 2 }


        atLinkMonProbeDetailLastRxTime OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The time that the device last successfully received a probe."
            ::= { atLinkMonProbeDetailEntry 3 }


--
-- Probe Latest Metrics Table
--

        atLinkMonProbeLatestMetricsTable OBJECT-TYPE
            SYNTAX SEQUENCE OF AtLinkMonProbeLatestMetricsEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "A table of information describing the latest Link Monitoring probe metrics.
                Upon device reboot, probe OID's will be re-assigned based on the alphabetical
                naming of probes in the startup configuration."
            ::= { atLinkMon 3 }


        atLinkMonProbeLatestMetricsEntry OBJECT-TYPE
            SYNTAX AtLinkMonProbeLatestMetricsEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "The latest metrics of a specific probe."
            INDEX { atLinkMonProbeID }
            ::= { atLinkMonProbeLatestMetricsTable 1 }

        AtLinkMonProbeLatestMetricsEntry ::=
            SEQUENCE {
                atLinkMonProbeLatestMetricsLatency
                    Unsigned32,
                atLinkMonProbeLatestMetricsJitter
                    Unsigned32,
                atLinkMonProbeLatestMetricsPktLoss
                    Unsigned32,
                atLinkMonProbeLatestMetricsCnscPktLoss
                    Integer32
             }


        atLinkMonProbeLatestMetricsLatency OBJECT-TYPE
            SYNTAX Unsigned32
            UNITS "ms"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The average latency based on the last samples in ms."
            ::= { atLinkMonProbeLatestMetricsEntry 1 }


        atLinkMonProbeLatestMetricsJitter OBJECT-TYPE
            SYNTAX Unsigned32
            UNITS "ms"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The average jitter based on the last samples in ms."
            ::= { atLinkMonProbeLatestMetricsEntry 2 }


        atLinkMonProbeLatestMetricsPktLoss OBJECT-TYPE
            SYNTAX Unsigned32 (0..1000)
            UNITS "1/10%"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The percentage of probes lost based on the last 100 probes.
                The value is given in tenth's of a percent."
            ::= { atLinkMonProbeLatestMetricsEntry 3 }


        atLinkMonProbeLatestMetricsCnscPktLoss OBJECT-TYPE
            SYNTAX Integer32
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The number of consecutive probes that have been lost.
                A positive value means consecutive packet lost.
                A negative value means consecutive packets received."
            ::= { atLinkMonProbeLatestMetricsEntry 4 }


--
-- Probe History Table
--

        atLinkMonProbeHistoryTable OBJECT-TYPE
            SYNTAX SEQUENCE OF AtLinkMonProbeHistoryEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "A table of information describing historical Link Monitoring probe metrics."
            ::= { atLinkMon 4 }


        atLinkMonProbeHistoryEntry OBJECT-TYPE
            SYNTAX AtLinkMonProbeHistoryEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "The information for a specific collection of historical probe metrics."
            INDEX { atLinkMonProbeHistoryID }
            ::= { atLinkMonProbeHistoryTable 1 }

        AtLinkMonProbeHistoryEntry ::=
            SEQUENCE {
                atLinkMonProbeHistoryID
                    Unsigned32,
                atLinkMonProbeHistoryProbeName
                    DisplayStringUnsized,
                atLinkMonProbeHistoryInterval
                    Unsigned32,
                atLinkMonProbeHistoryBuckets
                    Unsigned32,
                atLinkMonProbeHistoryLastSmplID
                    Unsigned32,
                atLinkMonProbeHistoryLastSmplTime
                    DisplayStringUnsized
             }


        atLinkMonProbeHistoryID OBJECT-TYPE
            SYNTAX Unsigned32 (1..65535)
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The ID of the Probe History collection"
            ::= { atLinkMonProbeHistoryEntry 1 }


        atLinkMonProbeHistoryProbeName OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The name of the probe the metrics are sampled from."
            ::= { atLinkMonProbeHistoryEntry 2 }


        atLinkMonProbeHistoryInterval OBJECT-TYPE
            SYNTAX Unsigned32 (1..2678400)
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The interval at which the metric data is sampled"
            ::= { atLinkMonProbeHistoryEntry 3 }


        atLinkMonProbeHistoryBuckets OBJECT-TYPE
            SYNTAX Unsigned32 (1..65535)
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The maximum number of historical samples that are kept."
            ::= { atLinkMonProbeHistoryEntry 4 }


        atLinkMonProbeHistoryLastSmplID OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The ID of the latest sample recorded.
                This is always increasing to distinguish new samples."
            ::= { atLinkMonProbeHistoryEntry 5 }


        atLinkMonProbeHistoryLastSmplTime OBJECT-TYPE
            SYNTAX DisplayStringUnsized
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The timestamp of the last sample."
            ::= { atLinkMonProbeHistoryEntry 6 }


--
-- Historical Probe Samples Table
--

        atLinkMonSampleTable OBJECT-TYPE
            SYNTAX SEQUENCE OF AtLinkMonSampleEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "A table of information describing the Link Monitoring metrics of a historical probe sample."
            ::= { atLinkMon 5 }


        atLinkMonSampleEntry OBJECT-TYPE
            SYNTAX AtLinkMonSampleEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "A specific historical probe sample."
            INDEX { atLinkMonProbeHistoryID, atLinkMonSampleBucket  }
            ::= { atLinkMonSampleTable 1 }

        AtLinkMonSampleEntry ::=
            SEQUENCE {
                atLinkMonSampleBucket
                    Unsigned32,
                atLinkMonSampleLatencySum
                    Unsigned32,
                atLinkMonSampleLatencyCount
                    Unsigned32,
                atLinkMonSampleJitterSum
                    Unsigned32,
                atLinkMonSampleJitterCount
                    Unsigned32,
                atLinkMonSamplePktLossSum
                    Unsigned32,
                atLinkMonSamplePktsTx
                    Unsigned32,
                atLinkMonSamplePktsRx
                    Unsigned32
             }


        atLinkMonSampleBucket OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                "The bucket to read the sample data from.
                The first bucket has the oldest available sample.
                A bucket can have no data in it if less samples have been taken then there are buckets"
            ::= { atLinkMonSampleEntry 1 }


        atLinkMonSampleLatencySum OBJECT-TYPE
            SYNTAX Unsigned32
            UNITS "ms"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Sum of latency metric values calculated during the sample interval.
                 Divide by the latency count for an average latency during the interval."
            ::= { atLinkMonSampleEntry 2 }


        atLinkMonSampleLatencyCount OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "The number of latency metric values calculated in the sum."
            ::= { atLinkMonSampleEntry 3 }


        atLinkMonSampleJitterSum OBJECT-TYPE
            SYNTAX Unsigned32
            UNITS "ms"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Sum of jitter metric values calculated during the sample interval.
                 Divide by the jitter count for an average jitter during the interval."
            ::= { atLinkMonSampleEntry 4 }


        atLinkMonSampleJitterCount OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Number of jitter metric values calculated in the sum."
            ::= { atLinkMonSampleEntry 5 }


        atLinkMonSamplePktLossSum OBJECT-TYPE
            SYNTAX Unsigned32
            UNITS "1/10%"
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Sum of the packet loss metric values recorded during the sample interval.
                 The value is given in tenth's of a percent.
                 Divide by packets transmitted for the average of the packet loss metric during the interval."
            ::= { atLinkMonSampleEntry 6 }


        atLinkMonSamplePktsTx OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Number of probes sent during the sample interval."
            ::= { atLinkMonSampleEntry 7 }


        atLinkMonSamplePktsRx OBJECT-TYPE
            SYNTAX Unsigned32
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Number of probes sent that received a reply during the sample interval."
            ::= { atLinkMonSampleEntry 8 }



    END

--
-- at-linkmon.mib
--
