Commit ae06c6d8 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

zabbix-agent: monitor btrfs subvolumes for dragon

parent ece4a52f
......@@ -17,3 +17,4 @@ archbuild_fs: 'btrfs'
zabbix_agent_templates:
- Template OS Linux
- Template Btrfs
#!/bin/bash
btrfs subvol list -d / | wc -l
......@@ -95,6 +95,7 @@
- postgresql-dbsize-stats.pl
- postgresql-user-stats.pl
- memcached-stats.py
- zabbix-btrfs-subvolume.sh
- name: Install helper scripts
copy: src=nginx-zabbix.pl dest=/usr/local/bin/nginx-zabbix.pl mode=0755 owner=root group=root
......
zabbix-agent ALL=(root) NOPASSWD: /usr/local/bin/borg list --json --format {start}{end} --sort-by timestamp --last 1, /usr/local/bin/mysql-dbsize-stats.pl, /usr/local/bin/memcached-stats.py
zabbix-agent ALL=(root) NOPASSWD: /usr/local/bin/borg list --json --format {start}{end} --sort-by timestamp --last 1, /usr/local/bin/mysql-dbsize-stats.pl, /usr/local/bin/memcached-stats.py, /usr/local/bin/zabbix-btrfs-subvolume.sh
zabbix-agent ALL=(postgres) NOPASSWD: /usr/local/bin/postgresql-dbsize-stats.pl, /usr/local/bin/postgresql-user-stats.pl
......@@ -71,3 +71,5 @@ UserParameter=arch_archive.db_count,echo 'select count(*) from files;' | sqlite3
UserParameter=memcached.stats[*],sudo /usr/local/bin/memcached-stats.py --socket '$1'
UserParameter=memcached.stats_discover,/usr/local/bin/memcached-stats.py --discover
#UserParameter=postgresql.dbsize_discover,sudo -u postgres /usr/local/bin/postgresql-dbsize-stats.pl discover
UserParameter=btrfs.subvolume_count,sudo /usr/local/bin/zabbix-btrfs-subvolume.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment