Skip to content

Add Prometheus instrumentation#181

Merged
aceberg merged 4 commits intoaceberg:mainfrom
gabe565:add-prometheus
Mar 21, 2025
Merged

Add Prometheus instrumentation#181
aceberg merged 4 commits intoaceberg:mainfrom
gabe565:add-prometheus

Conversation

@gabe565
Copy link
Copy Markdown
Contributor

@gabe565 gabe565 commented Mar 17, 2025

This PR adds an optional /metrics endpoint which allows for Prometheus instrumentation. This adds another means to display data in Grafana. Standard Go metrics are available, plus watch_your_lan_up, documented as:

# HELP watch_your_lan_up Whether the host is up (1 for yes, 0 for no)
# TYPE watch_your_lan_up gauge

Each host will have an entry, with labels for iface, ip, known, mac, and name.

Example Grafana dashboard

Grafana dashboard screenshot

Config page

Added Prometheus config section

Closes #88

@gabe565 gabe565 changed the title Add Prometheus metrics endpoint Add Prometheus metrics Mar 17, 2025
@gabe565 gabe565 changed the title Add Prometheus metrics Add Prometheus instrumentation Mar 17, 2025
@aceberg
Copy link
Copy Markdown
Owner

aceberg commented Mar 17, 2025

Hi! This and #180 PR looks interesting. I am now working on a big update of the UI (SolidJS), so I will merge them a bit later, maybe in a week.

@gabe565
Copy link
Copy Markdown
Contributor Author

gabe565 commented Mar 17, 2025

Sounds good! Once you push the UI update, I can rebase this branch and redo the Prometheus UI changes

@aceberg aceberg merged commit 8f122db into aceberg:main Mar 21, 2025
aceberg added a commit that referenced this pull request Mar 25, 2025
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

Successfully merging this pull request may close these issues.

Feature request: Prometheus exporter

2 participants