Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
a0733f70e5 | |||
53dc8a68a3 | |||
a8ab382216 | |||
8d6b6eaa3c | |||
ea948d0bb3
|
|||
36699bd248 | |||
3ab6814c16 |
@ -16,6 +16,26 @@
|
|||||||
"label": "load1",
|
"label": "load1",
|
||||||
"diff": "false"
|
"diff": "false"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"oid": ".1.3.6.1.4.1.9676.123.1.4",
|
||||||
|
"label": "stratum",
|
||||||
|
"diff": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"oid": ".1.3.6.1.4.1.9676.123.1.7",
|
||||||
|
"label": "rootdisp",
|
||||||
|
"diff": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"oid": ".1.3.6.1.4.1.9676.123.2.3",
|
||||||
|
"label": "ss-reset",
|
||||||
|
"diff": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"oid": ".1.3.6.1.4.1.9676.123.2.10",
|
||||||
|
"label": "processed-pkts",
|
||||||
|
"diff": "true"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"oid": ".1.3.6.1.2.1.31.1.1.1.6.2",
|
"oid": ".1.3.6.1.2.1.31.1.1.1.6.2",
|
||||||
"label": "lan-in",
|
"label": "lan-in",
|
||||||
@ -35,11 +55,6 @@
|
|||||||
"oid": ".1.3.6.1.2.1.31.1.1.1.11.2",
|
"oid": ".1.3.6.1.2.1.31.1.1.1.11.2",
|
||||||
"label": "lan-out-pkts",
|
"label": "lan-out-pkts",
|
||||||
"diff": "true"
|
"diff": "true"
|
||||||
},
|
|
||||||
{
|
|
||||||
"oid": ".1.3.6.1.4.1.9676.1",
|
|
||||||
"label": "time-req-pkts",
|
|
||||||
"diff": "true"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -101,7 +116,7 @@
|
|||||||
"community": "public",
|
"community": "public",
|
||||||
"oidTopics": [
|
"oidTopics": [
|
||||||
{
|
{
|
||||||
"oid": "1.3.6.1.2.1.25.3.3.1.2.1",
|
"oid": ".1.3.6.1.2.1.25.3.3.1.2.1",
|
||||||
"label": "load1",
|
"label": "load1",
|
||||||
"diff": "false"
|
"diff": "false"
|
||||||
},
|
},
|
||||||
|
@ -56,6 +56,9 @@ func calculateDifference(key string, newValue string) (string, error) {
|
|||||||
Timestamp: currentTime,
|
Timestamp: currentTime,
|
||||||
Value: newValue,
|
Value: newValue,
|
||||||
}
|
}
|
||||||
|
if diffValuePerSecond < 0 {
|
||||||
|
return "", fmt.Errorf("negative difference value: %d", diffValuePerSecond)
|
||||||
|
}
|
||||||
return strconv.Itoa(diffValuePerSecond), nil
|
return strconv.Itoa(diffValuePerSecond), nil
|
||||||
} else {
|
} else {
|
||||||
log.Printf("create lvv for %s", key)
|
log.Printf("create lvv for %s", key)
|
||||||
|
Reference in New Issue
Block a user