Skip to content

Commit 033cdb8

Browse files
feat(probe): add remote certificate metrics via with_remote parameter (#396)
Add with_remote=1 query parameter to the available-certificates API calls in probeSystemAvailableCertificates, enabling the endpoint to return remote certificates (type=remote-cer) alongside local ones. Remote certificates were previously invisible to the exporter despite being visible in the FortiGate GUI, as the API omits them by default. Signed-off-by: Luis Coutinho <luis.p.coutinho@gmail.com>
1 parent b3513d6 commit 033cdb8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/probe/system_available_certificates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ func probeSystemAvailableCertificates(c fortigatehttpclient.FortiHTTP, _ *Target
6363
}
6464

6565
var globalResponse Response
66-
if err := c.Get("api/v2/monitor/system/available-certificates", "scope=global", &globalResponse); err != nil {
66+
if err := c.Get("api/v2/monitor/system/available-certificates", "scope=global&with_remote=1", &globalResponse); err != nil {
6767
log.Printf("Error: %v", err)
6868
return nil, false
6969
}
7070
globalResponse.Scope = "global"
7171

7272
var vdomResponses []Response
7373

74-
if err := c.Get("api/v2/monitor/system/available-certificates", "vdom=*", &vdomResponses); err != nil {
74+
if err := c.Get("api/v2/monitor/system/available-certificates", "vdom=*&with_remote=1", &vdomResponses); err != nil {
7575
log.Printf("Error: %v", err)
7676
return nil, false
7777
}

0 commit comments

Comments
 (0)