While reviewing the different metrics that the exporter can retrieve, I noticed there is a section for managed switches with the following endpoint: api/v2/monitor/switch-controller/managed-switch.
However, when trying to query this endpoint, the page returns a 404 error. After an exhaustive review, I realized that this route is valid for FortiGate versions 6.x, while I am currently working with FortiGate version 7.4.7.
After consulting the Fortinet Developer Network (FNDN), I found that new endpoints are available for checking the health status of switches in versions 7.2 and above:
GET api/v2/monitor/switch-controller/managed-switch/status
GET api/v2/monitor/switch-controller/managed-switch/health
How can I modify the fields in the Prometheus exporter to correctly display the availability of the switches using these new endpoints?