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

fortigate_exporter REST API #298

Open
daniynwa opened this issue Sep 18, 2024 · 2 comments
Open

fortigate_exporter REST API #298

daniynwa opened this issue Sep 18, 2024 · 2 comments

Comments

@daniynwa
Copy link

daniynwa commented Sep 18, 2024

I have done testing with

curl 'localhost:9710/probe?target=https://192.168.2.31&token=ghi6eItWzWewgbrFMsazvBVwDjZzzb'

but I get the following error:

2024/09/18 07:19:04 FortigateExporter 1.24.1-1-g2aaf029 ( 2aaf029 )

2024/09/18 07:19:04 Loaded 1 API keys

2024/09/18 07:19:04 Fortigate exporter running, listening on ":9710"

2024/09/18 07:20:39 Error: API connectivity test failed, Get "https://10.11.10.100:21443/api/v2/monitor/system/status": x509: certificate signed by unknown authority

2024/09/18 07:20:39 Probe of "https://10.11.10.100:21443" failed, took 3.104 seconds

fortigate-key.yaml

auth_keys:
"https://10.11.10.100:21443":
token: api-key-goes-here

@daniynwa
Copy link
Author

access in browser https://fwl-psy.digisign.id:21443/api/v2/cmdb/firewall/address/?access_token=

Too Many Requests

The user has sent too many requests in a given amount of time.

Additionally, a 429 Too Many Requests error was encountered while trying to use an ErrorDocument to handle the request.

logs fortigate_exporter

2024/09/22 13:20:43 Probe of "https://fwl-psy.digisign.id:21443" failed, took 0.011 seconds
2024/09/22 13:21:07 Error: Response code was 424, expected 200 (path: "api/v2/monitor/log/fortianalyzer")
2024/09/22 13:21:08 Warning: Response code was 404, expected 200 (path: "api/v2/monitor/system/sensor-info")
2024/09/22 13:21:08 Error: Response code was 404, expected 200 (path: "api/v2/monitor/switch-controller/managed-switch")
2024/09/22 13:21:08 Probe of "https://fwl05-tmt.digisign.id:21443" failed, took 1.161 seconds
2024/09/22 13:21:43 Error: API connectivity test failed, Response code was 401, expected 200 (path: "api/v2/monitor/system/status")
2024/09/22 13:21:43 Probe of "https://fwl-psy.digisign.id:21443" failed, took 0.011 seconds

@daniynwa
Copy link
Author

2024/09/23 06:04:41 Warning: Failed to map "" to policy config - this should not happen
2024/09/23 06:04:41 Warning: Failed to map "" to policy config - this should not happen
2024/09/23 06:04:41 Warning: Failed to map "" to policy config - this should not happen
2024/09/23 06:04:41 Error: Response code was 424, expected 200 (path: "api/v2/monitor/log/fortianalyzer")
2024/09/23 06:04:43 Warning: Response code was 404, expected 200 (path: "api/v2/monitor/system/sensor-info")
2024/09/23 06:04:44 Error: Response code was 404, expected 200 (path: "api/v2/monitor/switch-controller/managed-switch")
2024/09/23 06:04:44 Probe of "https://fwl-psy.digisign.id:21443" failed, took 3.093 seconds
2024/09/23 06:05:25 Error: Response code was 424, expected 200 (path: "api/v2/monitor/log/fortianalyzer")
2024/09/23 06:05:26 Warning: Response code was 404, expected 200 (path: "api/v2/monitor/system/sensor-info")
2024/09/23 06:05:26 Error: Response code was 404, expected 200 (path: "api/v2/monitor/switch-controller/managed-switch")
2024/09/23 06:05:26 Probe of "https://fwl05-tmt.digisign.id:21443" failed, took 1.056 seconds

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