This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Deploy node_exporter across all fleet hosts
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- role: prometheus.prometheus.node_exporter
|
||||
vars:
|
||||
node_exporter_web_listen_address: "0.0.0.0:9100"
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
|
||||
- name: Deploy standalone Prometheus on Raspberry Pi 5
|
||||
hosts: monitoring_server
|
||||
become: true
|
||||
|
||||
vars:
|
||||
# Bind to all interfaces on default port
|
||||
prometheus_web_listen_address: "0.0.0.0:9090"
|
||||
|
||||
# Reduce retention to save storage/microSD wear (default is 15d)
|
||||
prometheus_storage_retention: "60d"
|
||||
|
||||
# Self-scrape configuration
|
||||
prometheus_scrape_configs:
|
||||
- job_name: "prometheus"
|
||||
metrics_path: "/metrics"
|
||||
static_configs:
|
||||
- targets:
|
||||
- "localhost:9090"
|
||||
- job_name: "node_exporter"
|
||||
metrics_path: "/metrics"
|
||||
static_configs:
|
||||
- targets:
|
||||
- "localhost:9100"
|
||||
- "10.7.10.96:9100"
|
||||
- "10.7.10.97:9100"
|
||||
|
||||
roles:
|
||||
- role: prometheus.prometheus.prometheus
|
||||
|
||||
- name: Deploy Grafana on Raspberry Pi 5
|
||||
hosts: monitoring_server
|
||||
become: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Ensure python3-debian is present for deb822 repository support
|
||||
ansible.builtin.apt:
|
||||
name: python3-debian
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
roles:
|
||||
- role: grafana.grafana.grafana
|
||||
vars:
|
||||
grafana_version: "latest"
|
||||
|
||||
# All grafana.ini sections now live under grafana_ini
|
||||
grafana_ini:
|
||||
server:
|
||||
http_port: 3000
|
||||
http_addr: "0.0.0.0"
|
||||
security:
|
||||
admin_user: "admin"
|
||||
admin_password: "LimpBizkit6"
|
||||
analytics:
|
||||
reporting_enabled: false
|
||||
check_for_updates: false
|
||||
|
||||
# Provision datasources directly
|
||||
grafana_datasources:
|
||||
- name: "Prometheus"
|
||||
type: "prometheus"
|
||||
access: "proxy"
|
||||
url: "http://localhost:9090"
|
||||
isDefault: true
|
||||
editable: true
|
||||
|
||||
# Optional: install community plugins automatically
|
||||
# grafana_plugins:
|
||||
# - grafana-piechart-panel
|
||||
@@ -10,6 +10,10 @@
|
||||
import_playbook: nfs_client.yml
|
||||
- name: Packages
|
||||
import_playbook: packages.yml
|
||||
- name: Grafana / Prometheus
|
||||
import_playbook: grafana.yml
|
||||
- name: node_exporter and others for Prometheus
|
||||
import_playbook: exporters.yml
|
||||
- name: Munin
|
||||
import_playbook: munin.yml
|
||||
- name: Gitea
|
||||
|
||||
Reference in New Issue
Block a user