#prometheus (2019-05)
Archive: https://archive.sweetops.com/prometheus/
2019-05-30
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
any advice on the simplest prometheus service discovery options? we’ve a small deployment of dynamic services and am looking for something lightweight
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
dns discovery seems like it might be the best. but the docs are lacking, how to provide custom /metrics
path and port ?
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
@Abel Luck have you checked out the example configs for DNS service discovery?
- https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config
- https://github.com/prometheus/prometheus/blob/release-2.10/config/testdata/conf.good.yml#L79-L123
That’s a full example that touches most of the things you mentioned
- endpoint lookup by DNS name (Lines 96-99)
- custom
/metrics
path (Line 90) - and to get a custom port, I’d replace Line 91 (
scheme: https
) withport: <custom#>
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
The Prometheus monitoring system and time series database. - prometheus/prometheus
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
@tamsky thanks for the link to the example configs, I didn’t know about that.
However, when i meant custom path/port I meant a config such that the path and port are discovered from the DNS SRV entry
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
Port should be automatic if you’re using SRV records
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
You don’t typically need to adjust the path, as it’s always /metrics
on standard exporters. What’s your use case where the /metrics
endpoint also needs to be discoverable?
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
afaik, there’s no custom SRV record type that provides more than service port and weight.