This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
|
||||
hosts_to_monitor:
|
||||
- "localhost:9100"
|
||||
- "10.7.10.96:9100"
|
||||
- "10.7.10.97:9100"
|
||||
@@ -21,6 +21,9 @@ lb-v3 ansible_host=lb-v3.int.metaunix.net
|
||||
[kickstart_servers]
|
||||
ks-v2 ansible_host=ks-v2.int.metaunix.net
|
||||
|
||||
[monitoring_server]
|
||||
pi5b2g ansible_host=10.7.10.106
|
||||
|
||||
[munin_masters]
|
||||
munin-v1 ansible_host=munin-v1.int.metaunix.net
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,6 +7,10 @@ collections:
|
||||
version: 5.3.0
|
||||
- name: containers.podman
|
||||
version: 1.20.2
|
||||
- name: grafana.grafana
|
||||
version: 6.1.0
|
||||
- name: prometheus.prometheus
|
||||
version: 0.30.1
|
||||
|
||||
roles:
|
||||
- name: gballan.sssd
|
||||
|
||||
Reference in New Issue
Block a user