diff --git a/playbooks/prod_web.yml b/playbooks/prod_web.yml index b6ef37f..185c284 100755 --- a/playbooks/prod_web.yml +++ b/playbooks/prod_web.yml @@ -140,9 +140,6 @@ proxy_pass: http://prometheus:9090 # desu.ltd media bullshit - name: music.desu.ltd - directives: - - "allow {{ common_home_address }}/{{ common_home_address_mask }}" - - "deny all" proxy_pass: http://navidrome:4533 - name: lidarr.media.desu.ltd directives: diff --git a/playbooks/tasks/web/navidrome.yml b/playbooks/tasks/web/navidrome.yml index 4f605d6..3a8df6d 100644 --- a/playbooks/tasks/web/navidrome.yml +++ b/playbooks/tasks/web/navidrome.yml @@ -6,6 +6,7 @@ user: 911:911 env: ND_BASEURL: "https://music.desu.ltd" + ND_PROMETHEUS_ENABLED: "true" ND_LOGLEVEL: "info" networks: - name: web diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index 2f0a706..42d3a61 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -81,6 +81,27 @@ scrape_configs: {# #} {% endfor %} {% endfor %} +{% endfor %} + + # This job takes in information from Netbox on the generic "prom-metrics" tag + # It's useful for all sorts of stuff + - job_name: "generic" + scheme: "https" + static_configs: + - targets: +{% for host in groups['tags_nagios'] %} +{% set vars = hostvars[host] %} +{% for service in vars.services %} +{% for tag in service.tags %} +{# #} +{% if tag.slug == "prom-metrics" %} +{% for port in service.ports %} + - "{{ service.name }}:{{ port }}" +{% endfor %} +{% endif %} +{# #} +{% endfor %} +{% endfor %} {% endfor %} # These two jobs are included for every node in our inventory