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 274 forks source link

[snmp_stardard::plugin] output format #1137

Closed oasisck closed 5 years ago

oasisck commented 6 years ago

Hi, I'm trying to customize output with snmp_standard command

This is OIDs I'm interesting

.1.3.6.1.4.1.674.10892.5.1.1.1.0 = STRING: "Integrated Dell Remote Access Controller 8"
.1.3.6.1.4.1.674.10892.5.1.1.2.0 = STRING: "iDRAC8"
.1.3.6.1.4.1.674.10892.5.1.1.3.0 = STRING: "This system component provides a complete set of remote management functions for Dell PowerEdge Servers"
.1.3.6.1.4.1.674.10892.5.1.1.4.0 = STRING: "Dell Inc."
.1.3.6.1.4.1.674.10892.5.1.1.5.0 = STRING: "2.52.52.52"
.1.3.6.1.4.1.674.10892.5.1.1.6.0 = STRING: "https://1.2.3.4:443"
.1.3.6.1.4.1.674.10892.5.1.1.7.0 = INTEGER: 32
.1.3.6.1.4.1.674.10892.5.1.1.8.0 = STRING: "2.52.52.52"

I want to output format like this OK : iDRAC8, 2.52.52.52 I use this command perl centreon_plugins.pl --plugin=snmp_standard::plugin --mode=string-value --oid-table=.1.3.6.1.4.1.674.10892.5.1.1 --snmp-version=2c --snmp-community=public --hostname=1.2.3.4 --format-ok='%{details_ok}' and this command perl centreon_plugins.pl --plugin=snmp_standard::plugin --mode=string-value --oid=.1.3.6.1.4.1.674.10892.2.1.1.2.0 --oid=.1.3.6.1.4.1.674.10892.2.1.1.5.0 --snmp-version=2c --snmp-community=public --hostname=1.2.3.4 --format-ok='%{details_ok}' I saw in help I can used those format output but none seems working for what I want Can used: %{rows}, %{filter_rows}, %{details_warning}, %{details_ok}, %{details_critical}, %{details_unknown}

Your advice ? Thanks for your amazing works

garnier-quentin commented 5 years ago

Thank you. You use the mode to display information only ? It s not the purpose of that mode. We can add a mode to display snmp information.

oasisck commented 5 years ago

Indeed, it's for display. Or maybe add this information in IDRAC plugin -> health option ? More usefull than 3 output OK information ;-) idrac

garnier-quentin commented 5 years ago

Yes we ll do that

garnier-quentin commented 5 years ago

Could you test it with the last version ?

oasisck commented 5 years ago

Perfect as usual 👍 image

garnier-quentin commented 5 years ago

Thanks!