Skip to content
Snippets Groups Projects
Verified Commit 98af6093 authored by Konstantin Shalygin's avatar Konstantin Shalygin
Browse files

Added nss-lookup target to avoid too early Prometheus start (before DNS)

If Prometheus started before DNS avail, HTTP SD will be suspended for a 10 mitues (by default)

```python
Jun 15 23:46:45 prometheus.example.com prometheus[658]: ts=2024-06-15T16:46:45.209Z caller=refresh.go:71 level=error component="discovery manager scrape" discovery=http config=netdata msg="Unable to refresh target groups" err="Get \"https://netbox.example.com/api/plugins/prometheus-sd/virtual-machines/?status=active&has_primary_ip=true&tenant=prometheus&cf_prometheus_server=promethes.example.com\": dial tcp: lookup netbox.example.com: Temporary failure in name resolution"
```
parent f9af7ac4
No related branches found
No related tags found
1 merge request!1Added nss-lookup target to avoid too early Prometheus start (before DNS)
......@@ -22,7 +22,7 @@ source=("prometheus-v$pkgver.tar.gz::https://github.com/prometheus/prometheus/ar
prometheus.conf)
sha256sums=('ed3d92022eacc78061c2768e322e5bc207ae686d3098a4caeca2e5740568166c'
'f358986865bd3d06dc47a265aeb3b5ef64aa644e831f07731c2fc7af64d9e98f'
'a6deb1f678960ee9b406e4458364c5082db11f93fae6286940aacd3e3933beb7'
'2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f'
'6d32deb125381cbebac11b6953a7d9a65eb7e50f209dc1e22c63facf678a3070')
......
[Unit]
Description=Prometheus service
Documentation=https://prometheus.io/docs/prometheus
Requires=network-online.target
After=network-online.target
After=network-online.target nss-lookup.target
Wants=network-online.target nss-lookup.target
[Service]
User=prometheus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment