Skip to main content

Hi,
Is there posibilty to filter output that centreon will show me only interfaces where packets flow?
 

/usr/lib/centreon/plugins/centreon-plugins/centreon_plugins.pl --plugin=network::dell::nseries::snmp::plugin --mode=interfaces --add-errors --hostname=172.20.1.6 --snmp-version=2c --snmp-community=public  --snmp-autoreduce --snmp-timeout=20 --snmp-force-getnext --verbose

 

Hello :)

In principle, the short output should satisfy your request, so if I understand correctly your question concerns the long output?
In this case, you might want to try adding the following options: 

--filter-perfdata-adv='%(value) == 0' / --filter-perfdata-adv='%(value) != 0'

=item B<--filter-perfdata-adv>

Filter perfdata based on a "if" condition using the following variables:
label, value, unit, warning, critical, min, max.
Variables must be written either %{variable} or %(variable).
Example: adding --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")' will
remove all metrics whose value equals 0 and that don't have a maximum value.

or 

--change-long-output='cequejeveuxvirer~~'

=item B<--change-short-output> B<--change-long-output>

Modify the short/long output that is returned by the plugin.
Syntax: --change-short-output=pattern~replacement~modifier
Most commonly used modifiers are i (case insensitive) and g (replace all occurrences).
Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up'

I hope this may help
Kind regards.


Reply