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

Error from fortigate_exporter accessing to Fortigate REST API #297

Open
ego-kyriarchos opened this issue Aug 29, 2024 · 0 comments
Open

Comments

@ego-kyriarchos
Copy link

ego-kyriarchos commented Aug 29, 2024

I created the account for accessing the rest api, there here is the accprofile configuration

FW1 # show system accprofile monitor
config system accprofile
    edit "monitor"
        set secfabgrp read
        set ftviewgrp read
        set authgrp read
        set sysgrp custom
        set netgrp custom
        set loggrp custom
        set fwgrp custom
        set vpngrp read
        set utmgrp read
        set wifi read
        config netgrp-permission
            set cfg read
            set route-cfg read
        end
        config sysgrp-permission
            set cfg read
        end
        config fwgrp-permission
            set policy read
            set others read
        end
        config loggrp-permission
            set config read
        end
    next
end

Error:

2024/08/29 07:54:51 FortigateExporter 1.24.1 ( c104cfe )
2024/08/29 07:54:51 Loaded 1 API keys
2024/08/29 07:54:51 Fortigate exporter running, listening on ":9710"
2024/08/29 07:55:22 Warning: Failed to map "" to policy config - this should not happen
....
2024/08/29 07:55:22 Warning: Failed to map "" to policy config - this should not happen
2024/08/29 07:55:22 Error: Response code was 424, expected 200 (path: "api/v2/monitor/log/fortianalyzer")
2024/08/29 07:55:22 Error: Response code was 404, expected 200 (path: "api/v2/monitor/system/fortimanager/status")
2024/08/29 07:55:22 Error: Response code was 404, expected 200 (path: "api/v2/monitor/switch-controller/managed-switch")
2024/08/29 07:55:22 Probe of "https://10.10.10.10" failed, took 0.894 seconds

Then I tried:

apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-config-file
  namespace: it
data:
  fortigate-key.yaml: |
    "https://10.10.10.10":
      token: the-super-secure-token
      probes:
        exclude:
          - System/Fortimanager/Status
          - System/Fortimanager/Status
          - Log/Fortianalyzer/Status
          - Switch/ManagedSwitch

but i still get this error:

2024/08/29 07:55:22 Warning: Failed to map "" to policy config - this should not happen
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