mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 10:15:14 +00:00
Fix hddtemp, add Homepage enrichment
This commit is contained in:
parent
96297891f3
commit
81c86ca1f3
4 changed files with 34 additions and 0 deletions
|
@ -17,6 +17,7 @@ stats_telegraf_port: "9273"
|
||||||
stats_telegraf_influxdb_port: "8086"
|
stats_telegraf_influxdb_port: "8086"
|
||||||
stats_prometheus_smartctl_port: "9902"
|
stats_prometheus_smartctl_port: "9902"
|
||||||
stats_speedtest_exporter_port: "9798"
|
stats_speedtest_exporter_port: "9798"
|
||||||
|
stats_hddtemp_port: "7634"
|
||||||
stats_prometheus_hostname: "prometheus"
|
stats_prometheus_hostname: "prometheus"
|
||||||
stats_grafana_port: "3000"
|
stats_grafana_port: "3000"
|
||||||
stats_grafana_hostname: "grafana"
|
stats_grafana_hostname: "grafana"
|
||||||
|
@ -37,11 +38,16 @@ stats_smartctl_docker_image_version: "latest"
|
||||||
stats_speedtest_container_name: "stats-speedtest"
|
stats_speedtest_container_name: "stats-speedtest"
|
||||||
stats_speedtest_docker_image_name: "miguelndecarvalho/speedtest-exporter"
|
stats_speedtest_docker_image_name: "miguelndecarvalho/speedtest-exporter"
|
||||||
stats_speedtest_docker_image_version: "latest"
|
stats_speedtest_docker_image_version: "latest"
|
||||||
|
stats_hddtemp_docker_container_name: "stats-hddtemp"
|
||||||
|
stats_hddtemp_docker_image_name: "modem7/hddtemp-docker"
|
||||||
|
stats_hddtemp_docker_image_tag: "latest"
|
||||||
|
|
||||||
|
|
||||||
# specs
|
# specs
|
||||||
stats_telegraf_memory: 1g
|
stats_telegraf_memory: 1g
|
||||||
stats_prometheus_memory: 1g
|
stats_prometheus_memory: 1g
|
||||||
stats_prometheus_smartctl_memory: 1g
|
stats_prometheus_smartctl_memory: 1g
|
||||||
|
stats_hddtemp_memory: 128m
|
||||||
stats_speedtest_exporter_memory: 256m
|
stats_speedtest_exporter_memory: 256m
|
||||||
stats_grafana_memory: 1g
|
stats_grafana_memory: 1g
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,22 @@
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
memory: "{{ stats_prometheus_smartctl_memory }}"
|
memory: "{{ stats_prometheus_smartctl_memory }}"
|
||||||
|
|
||||||
|
- name: hddtemp Docker Container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: "{{ stats_hddtemp_docker_container_name }}"
|
||||||
|
image: "{{ stats_hddtemp_docker_image_name }}:{{ stats_hddtemp_docker_image_tag }}"
|
||||||
|
pull: true
|
||||||
|
privileged: true
|
||||||
|
ports:
|
||||||
|
- "{{ stats_hddtemp_port }}:7634"
|
||||||
|
env:
|
||||||
|
HDDTEMP_ARGS: "-q -d -F /dev/sd*"
|
||||||
|
TZ: "{{ ansible_nas_timezone }}"
|
||||||
|
volumes:
|
||||||
|
- "/dev:/dev:ro"
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
memory: "{{ stats_hddtemp_memory }}"
|
||||||
|
|
||||||
- name: Speedtest Exporter Docker Container
|
- name: Speedtest Exporter Docker Container
|
||||||
community.docker.docker_container:
|
community.docker.docker_container:
|
||||||
name: "{{ stats_speedtest_container_name }}"
|
name: "{{ stats_speedtest_container_name }}"
|
||||||
|
|
|
@ -53,6 +53,11 @@
|
||||||
traefik.http.routers.grafana.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
traefik.http.routers.grafana.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||||
traefik.http.routers.grafana.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
traefik.http.routers.grafana.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||||
traefik.http.services.grafana.loadbalancer.server.port: "3000"
|
traefik.http.services.grafana.loadbalancer.server.port: "3000"
|
||||||
|
homepage.group: Monitoring
|
||||||
|
homepage.name: Grafana
|
||||||
|
homepage.icon: grafana
|
||||||
|
homepage.href: "http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ stats_grafana_port }}"
|
||||||
|
homepage.description: Dashboards and centralized observability.
|
||||||
when: stats_enabled is true
|
when: stats_enabled is true
|
||||||
|
|
||||||
- name: Stop Grafana
|
- name: Stop Grafana
|
||||||
|
|
|
@ -46,6 +46,13 @@
|
||||||
traefik.http.routers.prometheus.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
traefik.http.routers.prometheus.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||||
traefik.http.routers.prometheus.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
traefik.http.routers.prometheus.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||||
traefik.http.services.prometheus.loadbalancer.server.port: "9090"
|
traefik.http.services.prometheus.loadbalancer.server.port: "9090"
|
||||||
|
homepage.group: Monitoring
|
||||||
|
homepage.name: Prometheus
|
||||||
|
homepage.icon: prometheus
|
||||||
|
homepage.href: "http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ stats_prometheus_port }}"
|
||||||
|
homepage.description: Metrics and alerting
|
||||||
|
homepage.widget.type: prometheus
|
||||||
|
homepage.widget.url: "http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ stats_prometheus_port }}"
|
||||||
when: stats_enabled is true
|
when: stats_enabled is true
|
||||||
|
|
||||||
- name: Stop Prometheus
|
- name: Stop Prometheus
|
||||||
|
|
Loading…
Reference in a new issue