Your Grafana's Dashborad Uptime section query result is 1882461 by below SQL inquiry.
`SELECT "sysUpTime" / 100 FROM "snmp.EdgeOS" WHERE ("agent_host" =~ /^$host$/) AND $timeFilter
So, which part is going wrong to caused this issue?
telegraf related config
[[inputs.snmp.field]]
name = "sysUpTime"
oid = "HOST-RESOURCES-MIB::hrSystemUptime.0"
The HOST-RESOURCES-MIB.txt file in telegraf docker was copied from EdgeRouter /usr/share/snmp/mibs folder
hrSystemUptime OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The amount of time since this host was last
initialized. Note that this is different from
sysUpTime in the SNMPv2-MIB [RFC1907] because
sysUpTime is the uptime of the network management
portion of the system."
::= { hrSystem 1 }
- name: hrSystemUptime
oid: 1.3.6.1.2.1.25.1.1
type: gauge
help: The amount of time since this host was last initialized - 1.3.6.1.2.1.25.1.1
OID 1.3.6.1.2.1.25.1.1 corresponds to HOST-RESOURCES-MIB::hrSystemUptime.
hrSystemUptime is similar to sysUpTime in the SNMP MIB-II, but it's part of the Host Resources MIB. It represents the amount of time since the host was last initialized.
- 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
iso.3.6.1.2.1.1.3.0 is the full OID for the sysUpTime object, representing the time since the last system start-up.
According to the below info, I think what you were using hrSystemUptime is correct.
The difference between the OIDs 1.3.6.1.2.1.25.1.1 and 1.3.6.1.2.1.1.3.0 in SNMP lies in their origin and specific use cases:
OID 1.3.6.1.2.1.1.3.0 (sysUpTime):
This OID comes from the SNMP MIB-II (Management Information Base II) standard.
sysUpTime represents the time since the network management portion of the system was last re-initialized.
It is widely used for general network management purposes.
The uptime reported by sysUpTime resets to zero whenever the SNMP agent (the network management part) is restarted, which can happen independently of the host system's restarts or reboots.
It is a part of the System group in the MIB-II.
OID 1.3.6.1.2.1.25.1.1 (hrSystemUptime):
This OID is from the Host Resources MIB.
hrSystemUptime provides the amount of time since the host (the entire system) was last initialized.
It's more host-centric and is often used for tracking the uptime of the actual computing device (server, workstation, etc.) rather than just the network management aspect.
The uptime reported by hrSystemUptime resets only when the host system is rebooted or restarted.
It belongs to the Host Resources MIB, which includes more detailed information about the host's resources like storage, installed software, and device performance.
In summary, while both OIDs report uptime, sysUpTime is specific to the network management subsystem and can reset independently of the host system, whereas hrSystemUptime is specific to the host system's uptime and resets only when the entire system restarts. This distinction is important when monitoring the uptime for network devices vs. the actual hosts/servers they are part of.
In summary, while both OIDs report uptime, sysUpTime is specific to the network management subsystem and can reset independently of the host system, whereas hrSystemUptime is specific to the host system's uptime and resets only when the entire system restarts. This distinction is important when monitoring the uptime for network devices vs. the actual hosts/servers they are part of.
I'm using EdgeMAX EdgeRouter 4 v2.0.9-hotfix.2
Here is the uptime showing on the device.![image](https://github.com/WaterByWind/grafana-dashboards/assets/47710598/c27fd47d-6a96-4823-ae0b-4a17e7ec5a7b)
Your Grafana's Dashborad Uptime section query result is 1882461 by below SQL inquiry.
So, which part is going wrong to caused this issue?
telegraf related config
The
HOST-RESOURCES-MIB.txt
file in telegraf docker was copied from EdgeRouter/usr/share/snmp/mibs
folderI also tried inquiry SNMP OID
below OID comes from https://github.com/grafana/jsonnet-libs/tree/master/ubnt-edgerouter-mixin
https://github.com/grafana/jsonnet-libs/blob/02db06f540086fa3f67d487bd01e1b314853fb8f/ubnt-edgerouter-mixin/snmp_generator/snmp.yml#L1036C25-L1036C25
OID 1.3.6.1.2.1.25.1.1 corresponds to HOST-RESOURCES-MIB::hrSystemUptime.
hrSystemUptime
is similar to sysUpTime in the SNMP MIB-II, but it's part of the Host Resources MIB. It represents the amount of time since the host was last initialized.iso.3.6.1.2.1.1.3.0 is the full OID for the
sysUpTime
object, representing the time since the last system start-up.According to the below info, I think what you were using
hrSystemUptime
is correct.The difference between the OIDs 1.3.6.1.2.1.25.1.1 and 1.3.6.1.2.1.1.3.0 in SNMP lies in their origin and specific use cases:
sysUpTime
):sysUpTime
represents the time since the network management portion of the system was last re-initialized.hrSystemUptime
):hrSystemUptime
provides the amount of time since the host (the entire system) was last initialized.In summary, while both OIDs report uptime,
sysUpTime
is specific to the network management subsystem and can reset independently of the host system, whereashrSystemUptime
is specific to the host system's uptime and resets only when the entire system restarts. This distinction is important when monitoring the uptime for network devices vs. the actual hosts/servers they are part of.