-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4346fe
commit c1be859
Showing
11 changed files
with
105 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
munin_node__plugins: | ||
# SpamAssassin | ||
- src: spamstats | ||
# Nginx | ||
- src: nginx_request | ||
- src: nginx_status | ||
# Postfix | ||
- src: postfix_mailstats | ||
- src: postfix_mailqueue | ||
- src: postfix_mailvolume | ||
# PostgreSQL | ||
- src: postgres_size_ | ||
dest: postgres_size_metricity | ||
- src: postgres_size_ | ||
dest: postgres_size_site | ||
- src: postgres_size_ | ||
dest: postgres_size_ALL | ||
- src: postgres_xlog | ||
- src: postgres_autovacuum | ||
- src: postgres_bgwriter | ||
- src: postgres_checkpoints | ||
- src: postgres_connections_db | ||
- src: postgres_users | ||
- src: postgres_xlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
- common | ||
- pydis-mtls | ||
- wireguard | ||
- munin-node | ||
|
||
- name: Deploy services to Netcup nodes | ||
hosts: netcup | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
munin_node__plugin_packages: "{{ ('databases' in group_names) | ternary(['libdbd-pg-perl'], []) }}" | ||
munin_node__plugins: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
service: | ||
name: munin-node | ||
state: restarted | ||
tags: | ||
- role::munin-node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
- name: Install munin-node & plugin packages | ||
package: | ||
name: "{{ ['munin-node'] + munin_node__plugin_packages }}" | ||
state: present | ||
tags: | ||
- role::munin-node | ||
|
||
- name: Template munin-node configuration file | ||
template: | ||
src: munin-node.conf.j2 | ||
dest: /etc/munin/munin-node.conf | ||
owner: root | ||
group: root | ||
mode: "0444" | ||
tags: | ||
- role::munin-node | ||
notify: | ||
- Restart munin-node service | ||
|
||
- name: Template munin plugin configuration file | ||
template: | ||
src: plugin.conf.j2 | ||
dest: /etc/munin/plugin-conf.d/custom | ||
owner: root | ||
group: root | ||
mode: "0444" | ||
tags: | ||
- role::munin-node | ||
notify: | ||
- Restart munin-node service | ||
|
||
- name: Enable non-default munin plugins | ||
file: | ||
src: "/usr/share/munin/plugins/{{ item.src }}" | ||
dest: "/etc/munin/plugins/{{ item.dest | default(item.src) }}" | ||
state: link | ||
loop: "{{ munin_node__plugins }}" | ||
tags: | ||
- role::munin-node | ||
notify: | ||
- Restart munin-node service | ||
|
||
- name: Copy custom munin plugins | ||
template: | ||
src: "{{ item }}" | ||
# Split two levels of file extensions | ||
dest: "/etc/munin/plugins/{{ item | basename | splitext | first | splitext | first }}" | ||
owner: root | ||
group: root | ||
mode: "0555" | ||
loop_control: | ||
# I love representing data modification logic in YAML! | ||
label: "{{ item | basename | splitext | first | splitext | first }}" | ||
with_fileglob: "../templates/plugins/{{ ansible_hostname }}/*" | ||
tags: | ||
- role::munin-node | ||
|
||
- name: Disable some unneeded plugins | ||
file: | ||
path: "/etc/munin/plugins/{{ item }}" | ||
state: absent | ||
loop: | ||
- squeezebox_albums | ||
- squeezebox_artists | ||
- squeezebox_genres | ||
- squeezebox_signalstrength | ||
- squeezebox_songs | ||
- squeezebox_volume | ||
- squeezebox_years | ||
tags: | ||
- role::munin-node | ||
notify: | ||
- Restart munin-node service |
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters