centreon-plugins
centreon-plugins copied to clipboard
network::fortinet::fortigate::restapi::plugin - filter-name option does not affect command result
Hi,
We are using Fortigate Rest API plugin to monitor Forticare status with --filter-name='^forticare' option (we do not care about other expired licenses status).
The output is well filtered but status is still CRITICAL although the 2 remaining licences status is "licensed".
CRITICAL: License 'forticare:support:enhanced' expires in 2y 8M 4d 13h 21m 34s - License 'forticare:support:hardware' expires in 2y 8M 4d 13h 21m 34s License 'forticare:support:enhanced' status: licensed, expires in 2y 8M 4d 13h 21m 34s License 'forticare:support:hardware' status: licensed, expires in 2y 8M 4d 13h 21m 34s
-
Environment: Linux xxxxxx 3.10.0-1160.102.1.el7.x86_64 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux CentOS Linux release 7.9.2009 (Core)
-
Version of the plugin: centreon-plugin-Network-Fortinet-Fortigate-Restapi-20240212-151851.el7.noarch
-
Information about the monitored resource: Fortigate 101F v7.0.8
-
Command line:
/usr/lib/centreon/plugins/centreon_fortinet_fortigate_restapi.pl --plugin=network::fortinet::fortigate::restapi::plugin --mode=licenses --hostname='xxxxxxxxxx' --port='443' --proto='https' --access-token='xxxxxxxxxx' --insecure --filter-name='^forticare' --unit='' --warning-status='' --critical-status='%{status} =~ /expired/i' --warning-expires='45' --critical-expires='30' --verbose --output-ignore-perfdata
Expected result
OK: License 'forticare:support:enhanced' expires in 2y 8M 4d 13h 21m 34s - License 'forticare:support:hardware' expires in 2y 8M 4d 13h 21m 34s License 'forticare:support:enhanced' status: licensed, expires in 2y 8M 4d 13h 21m 34s License 'forticare:support:hardware' status: licensed, expires in 2y 8M 4d 13h 21m 34s
Regards,
Bertrand.