kashalls / external-dns-unifi-webhook

External-DNS Webhook to manage UniFi DNS Records
Apache License 2.0
90 stars 5 forks source link

Improve `/metrics` endpoint #19

Open onedr0p opened 3 months ago

onedr0p commented 3 months ago

Not sure what to gather but maybe there some ideas with the other webhook providers.

jimmy-ungerman commented 3 months ago

Looks like a good starting point https://github.com/stackitcloud/external-dns-stackit-webhook/tree/main/pkg/metrics

onedr0p commented 3 months ago

I implemented the structure, but it needs some work to add more metrics. It only has Go defaults being exported.

kashalls commented 3 months ago

I implemented the structure, but it needs some work to add more metrics. It only has Go defaults being exported.

Probably unifi 404's 405's 401's etc... Records updated

kashalls commented 2 months ago

I'll eventually pick this issue up, but I am unsure how to handle metrics. Might wait for a day to have onedr0p help me with this.

jimmy-ungerman commented 2 weeks ago

I'm going to start working on this but want to get a feel for the metrics that we want to capture.

My thought is:

kashalls commented 2 weeks ago
* Records created by the webhook
* Number of requests grouped by status code
* Response time? Not sure if this one is completely necessary

These should be good enough to get started.

Some fun ones would be records created / updated / removed by the webhook. How often records are being changed?

kashalls commented 2 days ago

Hey @jimmy-ungerman, I wanted to check in and see how it was progressing. Do you need any help?

jimmy-ungerman commented 2 days ago

Oh we're trying lol. I'm away for the holiday weekend, but plan on looking even more next week. First time trying to implement metrics lol

jimmy-ungerman commented 2 days ago

Going to test this commit here for a basic "records count" metric https://github.com/jimmy-ungerman/external-dns-unifi-webhook/commit/00e344c0449994e0a5166ead39db2c53304a5d5f