Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Sébastien Luttringer
infrastructure
Commits
ae06c6d8
Commit
ae06c6d8
authored
Dec 26, 2019
by
Jelle van der Waa
🚧
Browse files
zabbix-agent: monitor btrfs subvolumes for dragon
parent
ece4a52f
Changes
5
Hide whitespace changes
Inline
Side-by-side
host_vars/dragon.archlinux.org
View file @
ae06c6d8
...
...
@@ -17,3 +17,4 @@ archbuild_fs: 'btrfs'
zabbix_agent_templates:
- Template OS Linux
- Template Btrfs
roles/zabbix-agent/files/zabbix-btrfs-subvolume.sh
0 → 100755
View file @
ae06c6d8
#!/bin/bash
btrfs subvol list
-d
/ |
wc
-l
roles/zabbix-agent/tasks/main.yml
View file @
ae06c6d8
...
...
@@ -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
...
...
roles/zabbix-agent/templates/zabbix-agent-sudoers.conf.j2
View file @
ae06c6d8
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
roles/zabbix-agent/templates/zabbix_agentd.conf
View file @
ae06c6d8
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment