Add system global location probe#363
Open
rnxmlu wants to merge 3 commits intoprometheus-community:mainfrom
Open
Add system global location probe#363rnxmlu wants to merge 3 commits intoprometheus-community:mainfrom
rnxmlu wants to merge 3 commits intoprometheus-community:mainfrom
Conversation
Add a new probe that retrieves device latitude and longitude from
/api/v2/cmdb/system/global and exposes them as an info metric:
fortigate_location_info{latitude, longitude} 1
The probe is best-effort and returns success even when the location
metadata is not configured.
Signed-off-by: Michael Lucka <michael.lucka@rnetx.com>
Signed-off-by: Michael Lucka <michael.lucka@rnetx.com>
7b57ff8 to
69bdd07
Compare
Signed-off-by: Michael Lucka <michael.lucka@rnetx.com>
69bdd07 to
9114bf3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new optional probe that retrieves geographic
coordinates from the FortiOS system global CMDB endpoint and exposes
them as static metadata.
New metric
The metric is intended for metadata use (e.g. Grafana geomap panels) and
follows the exporter’s existing conventions:
Implementation notes
/api/v2/cmdb/system/globalCompatibility
Tested against FortiOS versions that expose
gui-device-latitudeandgui-device-longitude. On versions where the fields are missing, theprobe returns no metrics but does not fail.
This enables simple geographic visualization of FortiGate devices
without affecting existing dashboards or metrics.