centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 275 forks source link

[hardware::ups::standard::rfc1628::snmp::plugin] --mode=alarms: add alarm description #4541

Closed joschi99 closed 1 year ago

joschi99 commented 1 year ago

RFC1628 has a "Alarm table" with upsAlarmDescr and upsAlarmTime: RFC1628_V2.MIB.txt

It should be nice to return as verbose mode the description (and maybe alarm time) on the output. Please not that not every RFC1628 compliant UPS returns the alarm table.

garnier-quentin commented 1 year ago

Do you have a snmpwalk with alarms ?

garnier-quentin commented 1 year ago

You have an option: --display-alarms

https://github.com/centreon/centreon-plugins/pull/4556

joschi99 commented 1 year ago

Hi @garnier-quentin, done a test, the alarm table is working different:

 snmpwalk -On -v2c -cpublic 192.168.125.215 .1.3.6.1.2.1.33.1.6.2
.1.3.6.1.2.1.33.1.6.2.1.2.1 = OID: .1.3.6.1.2.1.33.1.6.3.14
.1.3.6.1.2.1.33.1.6.2.1.2.2 = OID: .1.3.6.1.2.1.33.1.6.3.15
.1.3.6.1.2.1.33.1.6.2.1.3.1 = Timeticks: (369000) 1:01:30.00
.1.3.6.1.2.1.33.1.6.2.1.3.2 = Timeticks: (369000) 1:01:30.00

As you can see we have 2 alarm entries and the values from OID .1.3.6.1.2.1.33.1.6.2.1.2 are

.1.3.6.1.2.1.33.1.6.3.14
.1.3.6.1.2.1.33.1.6.3.15

We can map this values to a descrption: image

garnier-quentin commented 1 year ago

thanks. i will update it

garnier-quentin commented 1 year ago

You can test it. It should be ok now

joschi99 commented 1 year ago

works, thanks