Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Version 2.1.3. (#69)
Browse files Browse the repository at this point in the history
Emit Well Known Alarm Info Time in scan.
Fixes https://vaporio.atlassian.net/browse/VIO-1089.
  • Loading branch information
MatthewHink authored Jul 8, 2021
1 parent 5d97c2a commit 3e272ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

PLUGIN_NAME := snmp
PLUGIN_VERSION := 2.1.2
PLUGIN_VERSION := 2.1.3
IMAGE_NAME := vaporio/snmp-plugin
BIN_NAME := synse-snmp-plugin

Expand Down
4 changes: 2 additions & 2 deletions pkg/snmp/mibs/ups_mib/ups_alarms_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// upsAlarmsInfo is what the device info will be under SNMP OID
// .1.3.6.1.2.1.33.1.6.3 view it in a MIB browser to see the names.
var upsAlarmsInfo = []string{
"upsAlarmBateryBad",
"upsAlarmBatteryBad",
"upsAlarmOnBattery",
"upsAlarmLowBattery",
"upsAlarmDepletedBattery",
Expand Down Expand Up @@ -148,7 +148,7 @@ func (enumerator UpsAlarmsTableDeviceEnumerator) DeviceEnumerator(
}

device = &config.DeviceInstance{
Info: fmt.Sprintf("upsAlarmTime%d", i),
Info: fmt.Sprintf("%sTime", upsAlarmsInfo[i]),
Data: deviceData,
}
statusProto.Instances = append(statusProto.Instances, device)
Expand Down
2 changes: 1 addition & 1 deletion pkg/snmp/mibs/ups_mib/ups_alarms_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func TestUpsAlarmsInfo(t *testing.T) {

var expected = []string{
"upsAlarmBateryBad",
"upsAlarmBatteryBad",
"upsAlarmOnBattery",
"upsAlarmLowBattery",
"upsAlarmDepletedBattery",
Expand Down

0 comments on commit 3e272ea

Please sign in to comment.