fortigate_exporter
fortigate_exporter copied to clipboard
Metric for Session Rate
Would it be possible to collect Session Rate? Or even Total Sessions so we could calculate the rate in Prometheus? Specifically looking for the same values that are returned by these SNMP OIDs:
fgSysSesRate1 fgSysSesRate1 1.3.6.1.4.1.12356.101.4.1.11 fgSysSesRate10 fgSysSesRate10 1.3.6.1.4.1.12356.101.4.1.12 fgSysSesRate30 fgSysSesRate30 1.3.6.1.4.1.12356.101.4.1.13 fgSysSesRate60 fgSysSesRate60 1.3.6.1.4.1.12356.101.4.1.14
We could use SNMP, but the exporter is a lot cleaner.
Thank you.
Hi! Wouldn't fortigate_current_sessions work for this?
We have a Fortigate with a lot of short lived sessions. While current sessions is useful it doesn't capture the rate at which sessions are being created and removed. This is also sometimes call setup-rate, if you are looking at performance statistics on the CLI of the Fortigate.
Ah, got it. Makes sense. Let's see if somebody figures out what API could give this.
Great, ty. If you can point me in the direction of the API documentation, I can try and help.
From what I'm seeing, /system/resource/usage is the API end point, same as other session information: "Resource to get usage data for [cpu|mem|disk|session|session6|setuprate|setuprate6|disk_lograte|faz_lograte|forticloud_lograte]."
In this case, I'm looking for 'setuprate', but if someone is going to add this to the exporter, including setup-rate6 wouldn't be a bad thing to have for people who need it.
@mwallace78 from what I can see the monitor API currently doesn't support that.
I finally have access to the API documentation and I was able to validate that the following API end point does in fact return what I'm looking for: /api/v2/monitor/system/resource/usage?resource=setuprate&interval=1-min&&vdom=*
I took a brief look at the code and it looks like some of the bones to have this implemented are in place, but I am not well versed in Go and not sure how big of a lift to get this and setuprate6 would be to get fully implemented.