munin: zfs monitoring (#6)

gitlab-user entfernt

typo

munin-vms entfernt

DNS-Resolver angepasst

zfs_list hinzugefügt

Vars verschoben und extra_plugins eingebaut

PR eingebaut: https://github.com/geerlingguy/ansible-role-munin-node/pull/21/files

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#6
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-02-26 17:24:14 +01:00
parent 09b5806a6c
commit 65f59b303e
8 changed files with 63 additions and 31 deletions

View file

@ -1,19 +1,6 @@
---
### wird in vielen Rollen verwendet
empfaenger_mail: michael.grote@posteo.de
### geerlingguy.munin-node
munin_node_bind_host: "*"
munin_node_bind_port: "4949"
munin_node_allowed_cidrs: [192.168.2.0/24]
munin_node_plugins:
- name: apc_nis
- name: hddtemp_smartctl
munin_node_config: {
"apc_nis": {
"env.host": "pve2.grote.lan",
"env.port": "3551"
}
}
### mgrote.postfix
postfix_absender_mailadresse: info@mgrote.net
postfix_absender_passwort: "{{ lookup('keepass', 'postfix_absender_passwort', 'password') }}"

View file

@ -28,17 +28,6 @@
servers:
- production
- test
- username: gitlab-user
password: "{{ lookup('keepass', 'gitlab_user_linux_password_hash', 'password') }}"
update_password: on_create
ssh_key: "{{ lookup('keepass', 'gitlab_user_ssh_pubkey', 'password') }}"
use_sudo: yes
use_sudo_nopass: yes
user_state: present
groups: ssh, sudo, docker
servers:
- production
- test
- username: ansible-user
password: "{{ lookup('keepass', 'ansible_user_linux_password_hash', 'password') }}"
update_password: on_create

View file

@ -17,6 +17,33 @@
zfs_extra_max_usage_health: "80"
### mgrote.apcupsd
apcupsd_slave_polltime: 10 #in Sekunden
### geerlingguy.munin-node
munin_node_bind_host: "*"
munin_node_bind_port: "4949"
munin_node_allowed_cidrs: [192.168.2.0/24]
munin_node_plugins:
- name: apc_nis
- name: hddtemp_smartctl
- name: zpool_iostat
- name: zfsonlinux_stats_
- name: zfsarcstats-counters
- name: zfs_usage_
- name: zfs_arcstats
- name: zfs_list
munin_node_config: {
"apc_nis": {
"env.host": "pve2.grote.lan",
"env.port": "3551"
}
}
munin_node_install_plugins:
- remote_src: https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/zfs/zfs_arcstats
- remote_src: https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/zfs/zfs_usage_
- remote_src: https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/zfs/zfsarcstats-counters
- remote_src: https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/zfs/zfsonlinux_stats_
- remote_src: https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/zfs/zpool_iostat
- remote_src: https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/zfs/zfs_list
# Ansible Variablen
### sudo

View file

@ -58,10 +58,6 @@ all:
hosts:
gitea-test.grote.lan:
gitea.grote.lan:
munin:
hosts:
munin-test.grote.lan:
munin.grote.lan:
production:
hosts:
@ -77,7 +73,6 @@ all:
pve4.grote.lan:
gitea.grote.lan:
pihole2.grote.lan:
munin.grote.lan:
test:
hosts:
wireguard-test.grote.lan:
@ -92,4 +87,3 @@ all:
pve4-test.grote.lan:
gitea-test.grote.lan:
pihole2-test.grote.lan:
munin-test.grote.lan:

View file

@ -6,7 +6,7 @@
- name: Setze DNS-Resolver fuer pihole-*
ansible.builtin.lineinfile:
path: /etc/resolv.conf.head
line: nameserver 192.168.2.2
line: nameserver 192.168.2.3
create: yes
backrefs: false
mode: 0664

View file

@ -65,6 +65,17 @@ This configuration will generate a configuration file at `/etc/munin/plugin-conf
env.regex bash
env.name bash
#### Install external plugins
You can install external plugins via `munin_node_install_plugins`.
Those plugins can be copied from local files or downloaded. For example:
munin_node_install_plugins: []
- src: files/munin/redis_
- remote_src: https://raw.githubusercontent.com/ohitz/phpfpm-multi-munin-plugin/master/phpfpm-multi
## Dependencies
None.

View file

@ -24,6 +24,12 @@ munin_node_plugins: []
# - name: ps_test
# plugin: ps_
# List of munin plugins to install.
munin_node_install_plugins: []
# - src: files/munin/redis_
# - remote_src: https://raw.githubusercontent.com/ohitz/phpfpm-multi-munin-plugin/master/phpfpm-multi
# Plugin configuration options (the key is the plugin heading, items within will
# be options for the plugin).
munin_node_config: {

View file

@ -28,6 +28,24 @@
mode: 0644
notify: restart munin-node
- name: Install extra plugins.
copy:
src: "{{ item.src }}"
dest: "{{ munin_plugin_src_path }}{{ item.src | basename }}"
mode: '0755'
with_items: "{{ munin_node_install_plugins }}"
when: item.src is defined
notify: restart munin-node
- name: Install extra remote plugins.
get_url:
url: "{{ item.remote_src }}"
dest: "{{ munin_plugin_src_path }}{{ item.remote_src | basename }}"
mode: '0755'
with_items: "{{ munin_node_install_plugins }}"
when: item.remote_src is defined
notify: restart munin-node
- name: Enable additional plugins.
file: # noqa 208
path: "{{ munin_plugin_dest_path }}{{ item.name }}"