Skip to main content

Hello

Has anyone already implemented filters on the hardware::server::lenovo::xcc::snmp::plugin plugin for fan named 6A, 7B, etc?
I have already set up filters for fans named with a simple digit, but I can't do it when there is a digit and a letter.

 

exemple : 

centreon_plugins.pl --hostname XXX.XXX.XXX.XXX --snmp-username centreon --snmp-timeout 30 --snmp-version 3 --plugin hardware::server::lenovo::xcc::snmp::plugin --mode=hardware --component=fan --filter=Fan,6A
 

CRITICAL: Fan 'Fan 6A Tach' status is 'Unknown' - Fan 'Fan 6B Tach' status is 'Unknown' - Fan 'Fan 7A Tach' status is 'Unknown' - Fan 'Fan 7B Tach' status is 'Unknown' | 'fan_Fan 1A Tach'=27%;;;0;100 'fan_Fan 1B Tach'=24%;;;0;100 'fan_Fan 2A Tach'=27%;;;0;100 'fan_Fan 2B Tach'=24%;;;0;100 'fan_Fan 3A Tach'=27%;;;0;100 'fan_Fan 3B Tach'=24%;;;0;100 'fan_Fan 4A Tach'=26%;;;0;100 'fan_Fan 4B Tach'=25%;;;0;100 'fan_Fan 5A Tach'=26%;;;0;100 'fan_Fan 5B Tach'=25%;;;0;100 'count_fan'=14;;;;

 

Best regards

Hello :)

 

As it stands, the filter option only allows you to filter on instance numbers that will be excluded:

=item B<--filter>

Exclude some components. This option can be called several times (example: --filter=component1 --filter=component2).
You can also exclude components from a specific instance (example: --filter=component_name,instance_value).

It is therefore not possible to use regexes in this case.

Kind regards


Reply