munin: 3.33 – You Can (Not) Redo. (#203)

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#203
Co-authored-by: mg <mg@noreply.git.mgrote.net>
Co-committed-by: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
Michael Grote 2021-09-24 10:11:54 +02:00
parent 7799f2a4fe
commit 9b3e5a664b
11 changed files with 203 additions and 41 deletions

View file

@ -23,15 +23,15 @@
### geerlingguy.munin-node ### geerlingguy.munin-node
munin_node_plugins: munin_node_plugins:
- name: chrony - name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/chrony src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status - name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/systemd_status src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: lvm_ - name: lvm_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/lvm_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/lvm_
config: | config: |
[lvm_*] [lvm_*]
user root user root
- name: acng - name: acng
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/acng src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/acng
config: | config: |
env.logfile /var/log/apt-cacher-ng/apt-cacher.log env.logfile /var/log/apt-cacher-ng/apt-cacher.log

View file

@ -15,18 +15,21 @@
- name: ntp # verursacht zu viele dns ptr request - name: ntp # verursacht zu viele dns ptr request
- name: hddtempd # ersetzt durch hddtemp_smartctl - name: hddtempd # ersetzt durch hddtemp_smartctl
- name: ipmi_power # für pve2, leeres diagramm - name: ipmi_power # für pve2, leeres diagramm
- name: docker_images
- name: docker_status
munin_node_plugins: munin_node_plugins:
- name: chrony - name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/chrony src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status - name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/systemd_status src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: lvm_ - name: lvm_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/lvm_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/lvm_
config: | config: |
[lvm_*] [lvm_*]
user root user root
### mgrote.dotfiles ### mgrote.dotfiles
dotfiles_repo_url: https://git.mgrote.net/mg/dotfiles dotfiles_repo_url: https://git.mgrote.net/mg/dotfiles
dotfiles_repo_path: /home/mg/dotfiles dotfiles_repo_path: /home/mg/dotfiles

View file

@ -25,32 +25,28 @@
### geerlingguy.munin-node ### geerlingguy.munin-node
munin_node_plugins: munin_node_plugins:
- name: chrony - name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/chrony src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status - name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/systemd_status src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: lvm_ - name: lvm_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/lvm_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/lvm_
config: | config: |
[lvm_*] [lvm_*]
user root user root
- name: docker_containers - name: docker_containers
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
config: | config: |
[docker_*] [docker_*]
user root user root
env.DOCKER_HOST unix://run/docker.sock env.DOCKER_HOST unix://run/docker.sock
- name: docker_cpu - name: docker_cpu
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: docker_images
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_
- name: docker_memory - name: docker_memory
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: docker_network - name: docker_network
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: docker_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_
- name: docker_volumes - name: docker_volumes
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
### mgrote.docker-compose-deploy ### mgrote.docker-compose-deploy
docker_compose_base_dir: /home/mg/docker docker_compose_base_dir: /home/mg/docker

View file

@ -124,10 +124,10 @@
- name: lvm_ - name: lvm_
munin_node_plugins: munin_node_plugins:
- name: chrony - name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/chrony src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status - name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/systemd_status src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: samba_users - name: samba_users
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/samba_users src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/samba_users
- name: samba_locked - name: samba_locked
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/samba_locked src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/samba_locked

View file

@ -29,3 +29,26 @@
### mgrote.apt_manage_sources ### mgrote.apt_manage_sources
manage_sources_apt_proxy_server: "" manage_sources_apt_proxy_server: ""
manage_sources_apt_proxy_port: "" manage_sources_apt_proxy_port: ""
### geerlingguy.munin-node
munin_node_plugins:
- name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: lvm_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/lvm_
config: |
[lvm_*]
user root
- name: pihole_cache
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/pihole/pihole_cache
config: |
[pihole_*]
user root
env.host 127.0.0.1
env.port 80
env.api /admin/api.php
- name: pihole_clients
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/pihole/pihole_clients
- name: pihole_queries
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/pihole/pihole_queries

View file

@ -21,32 +21,48 @@
- name: squid_requests - name: squid_requests
- name: squid_traffic - name: squid_traffic
- name: nfsd4 - name: nfsd4
- name: nfsd
- name: kvm_vm_count
- name: proxmox_lxc_count
- name: proxmox_vm_count
- name: zfs_usage_rpool # liest falsch ein
- name: zfs_usage_hdd_data_raidz # liest falsch ein
munin_node_plugins: munin_node_plugins:
- name: chrony - name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/chrony src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status - name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/systemd_status src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: lvm_ - name: lvm_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/lvm_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/lvm_
config: | config: |
[lvm_*] [lvm_*]
user root user root
- name: zfs_arcstats - name: zfs_arcstats
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zfs_arcstats src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/zfs_arcstats
- name: zfsonlinux_stats_ - name: zfsonlinux_stats_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zfsonlinux_stats_ src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/zfsonlinux_stats_
- name: zpool_iostat - name: zpool_iostat
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zpool_iostat src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/zpool_iostat
- name: zfs_list - name: zfs_list
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zfs_list src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/zfs_list
- name: zpool_capacity - name: zpool_capacity
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zpool_capacity src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/zpool_capacity
- name: kvm_mem - name: kvm_mem
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/kvm_mem src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/kvm_mem
- name: kvm_net - name: kvm_net
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/kvm_net src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/kvm_net
- name: kvm_cpu - name: kvm_cpu
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/kvm_cpu src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/kvm_cpu
- name: zpool_fragmentation
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zpool_fragmentation
- name: proxmox_count
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/proxmox_count
config: |
[proxmox_count]
user root
group root
- name: zfs_count
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/zfs_count
# Ansible Variablen # Ansible Variablen
### sudo ### sudo

View file

@ -23,3 +23,24 @@
dir_name: docker-lazydocker dir_name: docker-lazydocker
repository_url: git.mgrote.net/mg/docker-lazydocker repository_url: git.mgrote.net/mg/docker-lazydocker
state: absent # danach löschen state: absent # danach löschen
- name: munin-master-test
dir_name: docker-munin-master-test
repository_url: git.mgrote.net/mg/docker-munin-master_test
state: present
### geerlingguy.munin-node
munin_node_allowed_cidrs: [0.0.0.0/0] # weil der munin-server aus einem anderen subnet zugreift
munin_node_allowed_ips: # weil der munin-server aus einem anderen subnet zugreift
- '^127\.0\.0\.1$'
- '^::1$'
- ^0\.0\.0\.0$
### oefenweb.ufw
ufw_rules: # ist extra weil bei munin kein subnet angegeben ist
- rule: allow
to_port: 22
protocol: tcp
comment: 'ssh'
from_ip: 192.168.2.0/24
- rule: allow
to_port: 4949
protocol: tcp
comment: 'munin'

View file

@ -3,9 +3,7 @@
docker_compose_projects: docker_compose_projects:
- name: munin-master - name: munin-master
dir_name: docker-munin-master dir_name: docker-munin-master
repository_url: git.mgrote.net/mg/docker-munin-master repository_url: git.mgrote.net/mg/docker-munin-master_production
repository_user: mg
repository_user_password: "{{ lookup('keepass', 'gitea_mg_https_password', 'password') }}"
state: present state: present
- name: watchtower - name: watchtower
dir_name: docker-watchtower dir_name: docker-watchtower
@ -38,3 +36,110 @@
to_port: 4949 to_port: 4949
protocol: tcp protocol: tcp
comment: 'munin' comment: 'munin'
### mgrote.apt_install_packages
programs_extra:
- libwww-curl-perl # für munin-plugin: unifi
- libjson-perl # für munin-plugin: unifi
### geerlingguy.munin-node
munin_node_plugins:
- name: chrony
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/chrony
- name: systemd_status
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/systemd_status
- name: lvm_
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/lvm_
config: |
[lvm_*]
user root
- name: docker_containers
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
config: |
[docker_*]
user root
env.DOCKER_HOST unix://run/docker.sock
- name: docker_cpu
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: docker_memory
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: docker_network
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: docker_volumes
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_
- name: mt_system_hex
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/mikrotik/mt_system
config: |
[mt_system_hex]
user root
env.ssh_user munin
env.ssh_password hallowelt
env.ssh_host 192.168.2.1
- name: mt_system_crs309
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/mikrotik/mt_system
config: |
[mt_system_crs309]
user root
env.ssh_user munin
env.ssh_password hallowelt
env.ssh_host 192.168.2.223
- name: unifi
src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/unifi
config: |
[unifi*]
# User name to login to unifi controller API. Default is "ubnt". Ideally, this should
# point to a read-only account.
env.user munin
# Password to login to unifi controller API. Default is "ubnt"
env.pass hallowelt
# URL of the API, with port if needed. No trailing slash.
env.api_url https://docker2.grote.lan:8443
# Verify SSL certificate name against host.
# Note: if using a default cloudkey certificate, this will fail unless you manually add it
# to the local keystore.
# Default is "yes"
env.ssl_verify_host no
# Verify Peer's SSL vertiicate.
# Note: if using a default cloudkey certificate, this will fail
# Default is "yes"
env.ssl_verify_peer no
# The human readable name of the unifi site - used for graph titles
env.name Unifi
# By default, Use standard munin well know categories -
env.force_category unifi
#---
# Show device CPU utilization
env.enable_device_cpu yes
# Show device memory usage
env.enable_device_mem yes
# Show device load average (switches and APs only)
env.enable_device_load yes
# Show device uptime
env.enable_device_uptime yes
# Show number of clients connected to each device
env.enable_clients_device yes
# Show detailed graphs for each device (per device graphs)
env.enable_detail_clients_device yes
# Show number of clients connected to each network type
env.enable_clients_type yes
# Show detailed graphs for each client type (per type graphs)
env.enable_detail_clients_type yes
# Show unauthorized / authorized client list
# if you are not using the guest portal, this is useless
env.show_authorized_clients_type yes
# Show transfer statistics on switch ports
env.enable_xfer_port yes
# Show detailed graphs per switch port
env.enable_detail_xfer_port yes
# Hide ports that have no link (When set to no, unplugged ports will transfer 0, not be undefined)
env.hide_empty_xfer_port no
# Show transfer statistics per device
env.enable_xfer_device no
# Show detailed graphs for each device
env.enable_detail_xfer_device yes
# Show transfer statistics per named network
env.enable_xfer_network no
# Show detailed graphs for each named network
env.enable_detail_xfer_network no
# Show transfer statistics per radio
env.enable_xfer_radio no
# Show detailed graphs for each radio
env.enable_detail_xfer_radio no

View file

@ -1,3 +0,0 @@
---
dependencies:
- role: geerlingguy.docker

View file

@ -21,7 +21,7 @@
munin_plugin_conf_dest_path: /etc/munin/plugin-conf.d/ munin_plugin_conf_dest_path: /etc/munin/plugin-conf.d/
# munin_node_plugins: #plugins to install # munin_node_plugins: #plugins to install
# - name: docker_volumes # name # - name: docker_volumes # name
# src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/docker_ #src # src: https://git.mgrote.net/mg/munin-plugins/raw/branch/master/extern/docker_ #src
# config_file_name: /etc/munin/plugin-conf.d/docker # where to put plugin config # config_file_name: /etc/munin/plugin-conf.d/docker # where to put plugin config
# content of config # content of config
# config: | # config: |

View file

@ -5,6 +5,7 @@
dest: "{{ munin_plugin_src_path }}{{ item.name }}" dest: "{{ munin_plugin_src_path }}{{ item.name }}"
mode: '0755' mode: '0755'
loop: "{{ munin_node_plugins }}" loop: "{{ munin_node_plugins }}"
notify: restart munin-node
- name: enable additional plugins - name: enable additional plugins
file: file: