Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network::fortinet::fortigate::restapi::plugin - filter-name option does not affect command result #4930

Closed
BertrandJO opened this issue Feb 29, 2024 · 1 comment

Comments

@BertrandJO
Copy link

BertrandJO commented Feb 29, 2024

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.

@BertrandJO
Copy link
Author

with the correct parameters (--unit=d) and a correct range (30:) , it's better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant