echo "========== Configure SNMP-Exporter =========="
echo "========== Backup current configuration =========="
cp /usr/local/bin/snmp.yml /usr/local/bin/snmp.yml.bk
cat <<EOT > /usr/local/bin/snmp.yml
# WARNING: This file was auto-generated using snmp_exporter generator, manual changes will be lost.
auths:
cisco_v3:
version: 3
username: netops-nagios
password: NAGIOSciscoAUTH0724
auth_protocol: SHA
priv_protocol: AES
security_level: authPriv
priv_password: NAGIOSciscoPRIV0724
modules:
cisco_iosxe:
walk:
- 1.3.6.1.2.1.15.3.1
- 1.3.6.1.2.1.2.2.1.1
- 1.3.6.1.2.1.2.2.1.14
- 1.3.6.1.2.1.2.2.1.2
- 1.3.6.1.2.1.2.2.1.20
- 1.3.6.1.2.1.2.2.1.6
- 1.3.6.1.2.1.2.2.1.7
- 1.3.6.1.2.1.2.2.1.8
- 1.3.6.1.2.1.2.2.1.9
- 1.3.6.1.2.1.31.1.1.1.1
- 1.3.6.1.2.1.31.1.1.1.10
- 1.3.6.1.2.1.31.1.1.1.18
- 1.3.6.1.2.1.31.1.1.1.6
- 1.3.6.1.2.1.4.20.1
- 1.3.6.1.2.1.4.22.1.2
- 1.3.6.1.2.1.47.1.1.1.1.13
- 1.3.6.1.4.1.9.9.109.1.1.1.1
- 1.3.6.1.4.1.9.9.48.1.1.1.5
- 1.3.6.1.4.1.9.9.48.1.1.1.6
- 1.3.6.1.4.1.9.9.715.1.1.6.1.14
- 1.3.6.1.4.1.9.9.91.1.1.1.1
get:
- 1.3.6.1.2.1.1.1.0
- 1.3.6.1.2.1.1.3.0
- 1.3.6.1.2.1.1.5.0
- 1.3.6.1.2.1.1.6.0
metrics:
- name: sysDescr
oid: 1.3.6.1.2.1.1.1
type: DisplayString
help: A textual description of the entity - 1.3.6.1.2.1.1.1
- name: sysUpTime
oid: 1.3.6.1.2.1.1.3
type: gauge
help: The time (in hundredths of a second) since the network management portion
of the system was last re-initialized. - 1.3.6.1.2.1.1.3
- name: sysName
oid: 1.3.6.1.2.1.1.5
type: DisplayString
help: An administratively-assigned name for this managed node - 1.3.6.1.2.1.1.5
- name: sysLocation
oid: 1.3.6.1.2.1.1.6
type: DisplayString
help: The physical location of this node (e.g., 'telephone closet, 3rd floor')
- 1.3.6.1.2.1.1.6
- name: bgpPeerIdentifier
oid: 1.3.6.1.2.1.15.3.1.1
type: InetAddressIPv4
help: The BGP Identifier of this entry's BGP peer. - 1.3.6.1.2.1.15.3.1.1
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerState
oid: 1.3.6.1.2.1.15.3.1.2
type: gauge
help: The BGP peer connection state. - 1.3.6.1.2.1.15.3.1.2
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
enum_values:
1: idle
2: connect
3: active
4: opensent
5: openconfirm
6: established
- name: bgpPeerAdminStatus
oid: 1.3.6.1.2.1.15.3.1.3
type: gauge
help: The desired state of the BGP connection - 1.3.6.1.2.1.15.3.1.3
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
enum_values:
1: stop
2: start
- name: bgpPeerNegotiatedVersion
oid: 1.3.6.1.2.1.15.3.1.4
type: gauge
help: The negotiated version of BGP running between the two peers. - 1.3.6.1.2.1.15.3.1.4
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerLocalAddr
oid: 1.3.6.1.2.1.15.3.1.5
type: InetAddressIPv4
help: The local IP address of this entry's BGP connection. - 1.3.6.1.2.1.15.3.1.5
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerLocalPort
oid: 1.3.6.1.2.1.15.3.1.6
type: gauge
help: The local port for the TCP connection between the BGP peers. - 1.3.6.1.2.1.15.3.1.6
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerRemoteAddr
oid: 1.3.6.1.2.1.15.3.1.7
type: InetAddressIPv4
help: The remote IP address of this entry's BGP peer. - 1.3.6.1.2.1.15.3.1.7
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerRemotePort
oid: 1.3.6.1.2.1.15.3.1.8
type: gauge
help: The remote port for the TCP connection between the BGP peers - 1.3.6.1.2.1.15.3.1.8
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerRemoteAs
oid: 1.3.6.1.2.1.15.3.1.9
type: gauge
help: The remote autonomous system number. - 1.3.6.1.2.1.15.3.1.9
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerInUpdates
oid: 1.3.6.1.2.1.15.3.1.10
type: counter
help: The number of BGP UPDATE messages received on this connection - 1.3.6.1.2.1.15.3.1.10
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerOutUpdates
oid: 1.3.6.1.2.1.15.3.1.11
type: counter
help: The number of BGP UPDATE messages transmitted on this connection - 1.3.6.1.2.1.15.3.1.11
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerInTotalMessages
oid: 1.3.6.1.2.1.15.3.1.12
type: counter
help: The total number of messages received from the remote peer on this connection
- 1.3.6.1.2.1.15.3.1.12
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerOutTotalMessages
oid: 1.3.6.1.2.1.15.3.1.13
type: counter
help: The total number of messages transmitted to the remote peer on this connection
- 1.3.6.1.2.1.15.3.1.13
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerLastError
oid: 1.3.6.1.2.1.15.3.1.14
type: OctetString
help: The last error code and subcode seen by this peer on this connection -
1.3.6.1.2.1.15.3.1.14
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerFsmEstablishedTransitions
oid: 1.3.6.1.2.1.15.3.1.15
type: counter
help: The total number of times the BGP FSM transitioned into the established
state. - 1.3.6.1.2.1.15.3.1.15
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerFsmEstablishedTime
oid: 1.3.6.1.2.1.15.3.1.16
type: gauge
help: This timer indicates how long (in seconds) this peer has been in the Established
state or how long since this peer was last in the Established state - 1.3.6.1.2.1.15.3.1.16
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerConnectRetryInterval
oid: 1.3.6.1.2.1.15.3.1.17
type: gauge
help: Time interval in seconds for the ConnectRetry timer - 1.3.6.1.2.1.15.3.1.17
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerHoldTime
oid: 1.3.6.1.2.1.15.3.1.18
type: gauge
help: Time interval in seconds for the Hold Timer established with the peer
- 1.3.6.1.2.1.15.3.1.18
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerKeepAlive
oid: 1.3.6.1.2.1.15.3.1.19
type: gauge
help: Time interval in seconds for the KeepAlive timer established with the
peer - 1.3.6.1.2.1.15.3.1.19
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerHoldTimeConfigured
oid: 1.3.6.1.2.1.15.3.1.20
type: gauge
help: Time interval in seconds for the Hold Time configured for this BGP speaker
with this peer - 1.3.6.1.2.1.15.3.1.20
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerKeepAliveConfigured
oid: 1.3.6.1.2.1.15.3.1.21
type: gauge
help: Time interval in seconds for the KeepAlive timer configured for this BGP
speaker with this peer - 1.3.6.1.2.1.15.3.1.21
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerMinASOriginationInterval
oid: 1.3.6.1.2.1.15.3.1.22
type: gauge
help: Time interval in seconds for the MinASOriginationInterval timer - 1.3.6.1.2.1.15.3.1.22
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerMinRouteAdvertisementInterval
oid: 1.3.6.1.2.1.15.3.1.23
type: gauge
help: Time interval in seconds for the MinRouteAdvertisementInterval timer -
1.3.6.1.2.1.15.3.1.23
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: bgpPeerInUpdateElapsedTime
oid: 1.3.6.1.2.1.15.3.1.24
type: gauge
help: Elapsed time in seconds since the last BGP UPDATE message was received
from the peer - 1.3.6.1.2.1.15.3.1.24
indexes:
- labelname: bgpPeerRemoteAddr
type: InetAddressIPv4
- name: ifIndex
oid: 1.3.6.1.2.1.2.2.1.1
type: gauge
help: A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ifInErrors
oid: 1.3.6.1.2.1.2.2.1.14
type: counter
help: For packet-oriented interfaces, the number of inbound packets that contained
errors preventing them from being deliverable to a higher-layer protocol -
1.3.6.1.2.1.2.2.1.14
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ifOutErrors
oid: 1.3.6.1.2.1.2.2.1.20
type: counter
help: For packet-oriented interfaces, the number of outbound packets that could
not be transmitted because of errors - 1.3.6.1.2.1.2.2.1.20
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ifPhysAddress
oid: 1.3.6.1.2.1.2.2.1.6
type: PhysAddress48
help: The interface's address at its protocol sub-layer - 1.3.6.1.2.1.2.2.1.6
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ifAdminStatus
oid: 1.3.6.1.2.1.2.2.1.7
type: gauge
help: The desired state of the interface - 1.3.6.1.2.1.2.2.1.7
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
enum_values:
1: up
2: down
3: testing
- name: ifOperStatus
oid: 1.3.6.1.2.1.2.2.1.8
type: gauge
help: The current operational state of the interface - 1.3.6.1.2.1.2.2.1.8
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
enum_values:
1: up
2: down
3: testing
4: unknown
5: dormant
6: notPresent
7: lowerLayerDown
- name: ifLastChange
oid: 1.3.6.1.2.1.2.2.1.9
type: gauge
help: The value of sysUpTime at the time the interface entered its current operational
state - 1.3.6.1.2.1.2.2.1.9
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ifHCOutOctets
oid: 1.3.6.1.2.1.31.1.1.1.10
type: counter
help: The total number of octets transmitted out of the interface, including
framing characters - 1.3.6.1.2.1.31.1.1.1.10
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ifHCInOctets
oid: 1.3.6.1.2.1.31.1.1.1.6
type: counter
help: The total number of octets received on the interface, including framing
characters - 1.3.6.1.2.1.31.1.1.1.6
indexes:
- labelname: ifIndex
type: gauge
lookups:
- labels:
- ifIndex
labelname: ifAlias
oid: 1.3.6.1.2.1.31.1.1.1.18
type: DisplayString
- labels:
- ifIndex
labelname: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
- labels:
- ifIndex
labelname: ifName
oid: 1.3.6.1.2.1.31.1.1.1.1
type: DisplayString
- name: ipAdEntAddr
oid: 1.3.6.1.2.1.4.20.1.1
type: InetAddressIPv4
help: The IP address to which this entry's addressing information pertains.
- 1.3.6.1.2.1.4.20.1.1
indexes:
- labelname: ipAdEntAddr
type: InetAddressIPv4
- name: ipAdEntIfIndex
oid: 1.3.6.1.2.1.4.20.1.2
type: gauge
help: The index value which uniquely identifies the interface to which this
entry is applicable - 1.3.6.1.2.1.4.20.1.2
indexes:
- labelname: ipAdEntAddr
type: InetAddressIPv4
- name: ipAdEntNetMask
oid: 1.3.6.1.2.1.4.20.1.3
type: InetAddressIPv4
help: The subnet mask associated with the IP address of this entry - 1.3.6.1.2.1.4.20.1.3
indexes:
- labelname: ipAdEntAddr
type: InetAddressIPv4
- name: ipAdEntBcastAddr
oid: 1.3.6.1.2.1.4.20.1.4
type: gauge
help: The value of the least-significant bit in the IP broadcast address used
for sending datagrams on the (logical) interface associated with the IP address
of this entry - 1.3.6.1.2.1.4.20.1.4
indexes:
- labelname: ipAdEntAddr
type: InetAddressIPv4
- name: ipAdEntReasmMaxSize
oid: 1.3.6.1.2.1.4.20.1.5
type: gauge
help: The size of the largest IP datagram which this entity can re-assemble
from incoming IP fragmented datagrams received on this interface. - 1.3.6.1.2.1.4.20.1.5
indexes:
- labelname: ipAdEntAddr
type: InetAddressIPv4
- name: ipNetToMediaPhysAddress
oid: 1.3.6.1.2.1.4.22.1.2
type: PhysAddress48
help: The media-dependent 'physical' address. - 1.3.6.1.2.1.4.22.1.2
indexes:
- labelname: ipNetToMediaIfIndex
type: gauge
- labelname: ipNetToMediaNetAddress
type: InetAddressIPv4
- name: entPhysicalModelName
oid: 1.3.6.1.2.1.47.1.1.1.1.13
type: DisplayString
help: The vendor-specific model name identifier string associated with this
physical component - 1.3.6.1.2.1.47.1.1.1.1.13
indexes:
- labelname: entPhysicalIndex
type: gauge
- name: cpmCPUTotalIndex
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.1
type: gauge
help: An index that uniquely represents a CPU (or group of CPUs) whose CPU load
information is reported by a row in this table - 1.3.6.1.4.1.9.9.109.1.1.1.1.1
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotalPhysicalIndex
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.2
type: gauge
help: The entPhysicalIndex of the physical entity for which the CPU statistics
in this entry are maintained - 1.3.6.1.4.1.9.9.109.1.1.1.1.2
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotal5sec
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.3
type: gauge
help: The overall CPU busy percentage in the last 5 second period - 1.3.6.1.4.1.9.9.109.1.1.1.1.3
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotal1min
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.4
type: gauge
help: The overall CPU busy percentage in the last 1 minute period - 1.3.6.1.4.1.9.9.109.1.1.1.1.4
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotal5min
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.5
type: gauge
help: The overall CPU busy percentage in the last 5 minute period - 1.3.6.1.4.1.9.9.109.1.1.1.1.5
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotal5secRev
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.6
type: gauge
help: The overall CPU busy percentage in the last 5 second period - 1.3.6.1.4.1.9.9.109.1.1.1.1.6
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotal1minRev
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.7
type: gauge
help: The overall CPU busy percentage in the last 1 minute period - 1.3.6.1.4.1.9.9.109.1.1.1.1.7
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotal5minRev
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.8
type: gauge
help: The overall CPU busy percentage in the last 5 minute period - 1.3.6.1.4.1.9.9.109.1.1.1.1.8
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMonInterval
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.9
type: gauge
help: CPU usage monitoring interval - 1.3.6.1.4.1.9.9.109.1.1.1.1.9
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUTotalMonIntervalValue
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.10
type: gauge
help: The overall CPU busy percentage in the last cpmCPUMonInterval period -
1.3.6.1.4.1.9.9.109.1.1.1.1.10
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUInterruptMonIntervalValue
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.11
type: gauge
help: The overall CPU busy percentage in the interrupt context in the last cpmCPUMonInterval
period. - 1.3.6.1.4.1.9.9.109.1.1.1.1.11
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryUsed
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.12
type: gauge
help: The overall CPU wide system memory which is currently under use. - 1.3.6.1.4.1.9.9.109.1.1.1.1.12
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryFree
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.13
type: gauge
help: The overall CPU wide system memory which is currently free. - 1.3.6.1.4.1.9.9.109.1.1.1.1.13
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryKernelReserved
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.14
type: gauge
help: The overall CPU wide system memory which is reserved for kernel usage.
- 1.3.6.1.4.1.9.9.109.1.1.1.1.14
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryLowest
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.15
type: gauge
help: The lowest free memory that has been recorded since device has booted.
- 1.3.6.1.4.1.9.9.109.1.1.1.1.15
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryUsedOvrflw
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.16
type: gauge
help: This object represents the upper 32-bit of cpmCPUMemoryUsed - 1.3.6.1.4.1.9.9.109.1.1.1.1.16
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryHCUsed
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.17
type: counter
help: The overall CPU wide system memory which is currently under use - 1.3.6.1.4.1.9.9.109.1.1.1.1.17
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryFreeOvrflw
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.18
type: gauge
help: This object represents the upper 32-bit of cpmCPUMemoryFree - 1.3.6.1.4.1.9.9.109.1.1.1.1.18
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryHCFree
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.19
type: counter
help: The overall CPU wide system memory which is currently free - 1.3.6.1.4.1.9.9.109.1.1.1.1.19
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryKernelReservedOvrflw
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.20
type: gauge
help: This object represents the upper 32-bit of cpmCPUMemoryKernelReserved
- 1.3.6.1.4.1.9.9.109.1.1.1.1.20
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryHCKernelReserved
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.21
type: counter
help: The overall CPU wide system memory which is reserved for kernel usage
- 1.3.6.1.4.1.9.9.109.1.1.1.1.21
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryLowestOvrflw
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.22
type: gauge
help: This object represents the upper 32-bit of cpmCPUMemoryLowest - 1.3.6.1.4.1.9.9.109.1.1.1.1.22
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryHCLowest
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.23
type: counter
help: The lowest free memory that has been recorded since device has booted
- 1.3.6.1.4.1.9.9.109.1.1.1.1.23
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPULoadAvg1min
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.24
type: gauge
help: The overall CPU load Average in the last 1 minute period - 1.3.6.1.4.1.9.9.109.1.1.1.1.24
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPULoadAvg5min
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.25
type: gauge
help: The overall CPU load Average in the last 5 minutes period - 1.3.6.1.4.1.9.9.109.1.1.1.1.25
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPULoadAvg15min
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.26
type: gauge
help: The overall CPU load Average in the last 15 minutes period - 1.3.6.1.4.1.9.9.109.1.1.1.1.26
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryCommitted
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.27
type: gauge
help: The overall CPU wide system memory which is currently Committed. - 1.3.6.1.4.1.9.9.109.1.1.1.1.27
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryCommittedOvrflw
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.28
type: gauge
help: This object represents the upper 32-bit of cpmCPUMemoryCommitted - 1.3.6.1.4.1.9.9.109.1.1.1.1.28
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: cpmCPUMemoryHCCommitted
oid: 1.3.6.1.4.1.9.9.109.1.1.1.1.29
type: counter
help: The overall CPU wide system memory which is currently committed - 1.3.6.1.4.1.9.9.109.1.1.1.1.29
indexes:
- labelname: cpmCPUTotalIndex
type: gauge
- name: ciscoMemoryPoolUsed
oid: 1.3.6.1.4.1.9.9.48.1.1.1.5
type: gauge
help: Indicates the number of bytes from the memory pool that are currently
in use by applications on the managed device. - 1.3.6.1.4.1.9.9.48.1.1.1.5
indexes:
- labelname: ciscoMemoryPoolType
type: gauge
- name: ciscoMemoryPoolFree
oid: 1.3.6.1.4.1.9.9.48.1.1.1.6
type: gauge
help: Indicates the number of bytes from the memory pool that are currently
unused on the managed device - 1.3.6.1.4.1.9.9.48.1.1.1.6
indexes:
- labelname: ciscoMemoryPoolType
type: gauge
- name: ceqfpUtilProcessingLoad
oid: 1.3.6.1.4.1.9.9.715.1.1.6.1.14
type: gauge
help: This object represents the QFP processing load during this interval. -
1.3.6.1.4.1.9.9.715.1.1.6.1.14
indexes:
- labelname: entPhysicalIndex
type: gauge
- labelname: ceqfpUtilTimeInterval
type: gauge
enum_values:
1: fiveSeconds
2: oneMinute
3: fiveMinutes
4: sixtyMinutes
- name: entSensorType
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.1
type: gauge
help: This variable indicates the type of data reported by the entSensorValue
- 1.3.6.1.4.1.9.9.91.1.1.1.1.1
indexes:
- labelname: entPhysicalIndex
type: gauge
enum_values:
1: other
2: unknown
3: voltsAC
4: voltsDC
5: amperes
6: watts
7: hertz
8: celsius
9: percentRH
10: rpm
11: cmm
12: truthvalue
13: specialEnum
- name: entSensorScale
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.2
type: gauge
help: This variable indicates the exponent to apply to sensor values reported
by entSensorValue - 1.3.6.1.4.1.9.9.91.1.1.1.1.2
indexes:
- labelname: entPhysicalIndex
type: gauge
enum_values:
1: yocto
2: zepto
3: atto
4: femto
5: pico
6: nano
7: micro
8: milli
9: units
10: kilo
11: mega
12: giga
13: tera
14: exa
15: peta
16: zetta
17: yotta
- name: entSensorPrecision
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.3
type: gauge
help: This variable indicates the number of decimal places of precision in fixed-point
sensor values reported by entSensorValue - 1.3.6.1.4.1.9.9.91.1.1.1.1.3
indexes:
- labelname: entPhysicalIndex
type: gauge
- name: entSensorValue
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.4
type: gauge
help: This variable reports the most recent measurement seen by the sensor -
1.3.6.1.4.1.9.9.91.1.1.1.1.4
indexes:
- labelname: entPhysicalIndex
type: gauge
- name: entSensorStatus
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.5
type: gauge
help: This variable indicates the present operational status of the sensor.
- 1.3.6.1.4.1.9.9.91.1.1.1.1.5
indexes:
- labelname: entPhysicalIndex
type: gauge
enum_values:
1: ok
2: unavailable
3: nonoperational
- name: entSensorValueTimeStamp
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.6
type: gauge
help: This variable indicates the age of the value reported by entSensorValue
- 1.3.6.1.4.1.9.9.91.1.1.1.1.6
indexes:
- labelname: entPhysicalIndex
type: gauge
- name: entSensorValueUpdateRate
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.7
type: gauge
help: This variable indicates the rate that the agent updates entSensorValue.
- 1.3.6.1.4.1.9.9.91.1.1.1.1.7
indexes:
- labelname: entPhysicalIndex
type: gauge
- name: entSensorMeasuredEntity
oid: 1.3.6.1.4.1.9.9.91.1.1.1.1.8
type: gauge
help: This object identifies the physical entity for which the sensor is taking
measurements - 1.3.6.1.4.1.9.9.91.1.1.1.1.8
indexes:
- labelname: entPhysicalIndex
type: gauge
EOT
echo "========== Configure Prometheus =========="
cp /etc/prometheus/prometheus.yml /etc/prometheus/prometheus.yml.bk
cat <<EOT >> /etc/prometheus/prometheus.yml
- job_name: network
metrics_path: /network
params:
module: [cisco_iosxe]
auth: [cisco_v3]
static_configs:
- targets:
- 10.10.10.1
- 10.10.10.2
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9116 # URL as shown on the UI
EOT
echo "========== Restart SNMP Exporter Service =========="
systemctl restart snmp-exporter.service
if [ $? -eq 0 ]; then
systemctl is-active snmp-exporter.service
else
echo "SNMP-Exporter service failed to restart"
exit 1
fi
echo "========== Restart Prometheus Service =========="
systemctl restart prometheus.service
if [ $? -eq 0 ]; then
systemctl is-active prometheus.service
else
echo "Prometheus service failed to restart"
fi
echo "========== Configure Nginx Service =========="
cat <<EOT > /etc/nginx/conf.d/grafana
server {
listen 80;
server_name your_domain_or_ip;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Redirect HTTP to HTTPS
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name grafana.domain.com;
ssl_certificate /etc/letsencrypt/live/your_domain_or_ip/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your_domain_or_ip/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Proxy Grafana Live WebSocket connections
location /api/live/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_pass http://localhost:3000;
}
}
EOT�