Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ The warning and critical flags support thresholds in the common Nagios format (e
check_hwgroup --community public --snmp-version 2c --port 1161 --host poseidon2-3266.internal --warning 10 --critical 20 --sensor 29448

[CRITICAL] - Poseidon2 3266 SNMP Supervisor v3.8.4 - Sensor value: 25.3|'HTemp Rack 19'=25.3;10;20

```

```bash
check_hwgroup --community public --snmp-version 1 --port 161 --host ste2.internal --warning 10 --critical 20 --sensor 52290

[WARNING] - STE2 r2, fw:1.5.9_2478 - Sensor value: 19.3|'Temp Rack'=19.3;10;20
```

Check for a negative value:
Expand Down
6 changes: 0 additions & 6 deletions internal/hwgroup/hwgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ func (c *Client) QueryDeviceName() (string, error) {
func (c *Client) QuerySensor(deviceType string, sensorID uint) (SensorResult, error) {
var result SensorResult

_, ok := deviceTypeNums[deviceType]

if !ok {
return result, fmt.Errorf("sensor checks are not supported for %s", deviceType)
}

errConnect := c.SNMPClient.Connect()
if errConnect != nil {
return result, fmt.Errorf("could not connect to device: %w", errConnect)
Expand Down