commit ea84b9627b518149552a7ef2d6b3d556822aa7d2
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Mon Sep 6 20:13:52 2021 +0200
Update roles collectd
roles/collectd/base/tasks/main.yml | 34 +++++++++++++---
roles/collectd/base/templates/collectd.conf.j2 | 11 +++--
roles/collectd/memcached/tasks/main.yml | 8 ----
roles/collectd/rabbitmq/tasks/main.yml | 12 +++++-
.../rabbitmq/templates/rabbitmq.collectd.conf.j2 | 2 +
roles/collectd/server/files/collection.conf | 41 ++++++++++++++++++++
roles/collectd/server/tasks/main.yml | 22 +++++------
7 files changed, 97 insertions(+), 33 deletions(-)
---
diff --git a/roles/collectd/base/tasks/main.yml b/roles/collectd/base/tasks/main.yml
index caeb5c6..35ec469 100644
--- a/roles/collectd/base/tasks/main.yml
+++ b/roles/collectd/base/tasks/main.yml
@@ -6,21 +6,35 @@
package: name=collectd state=present
tags:
- collectd
- when: ansible_distribution_major_version|int < 22
+ when: ansible_distribution_major_version|int <= 7 and ansible_distribution ==
'RedHat'
# install pkg
- name: install collectd
dnf: name=collectd state=present
tags:
- collectd
- when: ansible_distribution_major_version|int > 21
+ when: ansible_distribution_major_version|int > 7 and ansible_distribution ==
'RedHat'
+
+# install pkg
+- name: install collectd
+ dnf: name=collectd state=present
+ tags:
+ - collectd
+ when: ansible_distribution_major_version|int >= 29 and ansible_distribution ==
'Fedora'
+
+# install collectd-disk (it was split out)
+- name: install collectd-disk
+ dnf: name=collectd-disk state=present
+ tags:
+ - collectd
+ when: ansible_distribution_major_version|int > 7 and ansible_distribution ==
'RedHat'
# install collectd-disk on F25+ (it was split out)
- name: install collectd-disk
dnf: name=collectd-disk state=present
tags:
- collectd
- when: ansible_distribution_major_version|int > 24
+ when: ansible_distribution_major_version|int > 24 and ansible_distribution ==
'Fedora'
# install collected.conf
- name: /etc/collectd.conf
@@ -55,7 +69,15 @@
- collectd
notify:
- restart collectd
- when: collectd_apache and ansible_distribution_major_version|int < 22
+ when: collectd_apache and ansible_distribution_major_version|int <= 7 and
ansible_distribution == 'RedHat'
+
+- name: install collectd-apache (dnf)
+ dnf: state=present name=collectd-apache
+ tags:
+ - collectd
+ notify:
+ - restart collectd
+ when: collectd_apache and ansible_distribution_major_version|int > 7 and
ansible_distribution == 'RedHat'
- name: install collectd-apache (dnf)
dnf: state=present name=collectd-apache
@@ -63,7 +85,7 @@
- collectd
notify:
- restart collectd
- when: collectd_apache and ansible_distribution_major_version|int > 21
+ when: collectd_apache and ansible_distribution_major_version|int >= 29 and
ansible_distribution == 'Fedora'
- name: /etc/collectd/apache.conf
copy: src=apache.conf dest=/etc/collectd.d/apache.conf
@@ -77,7 +99,7 @@
package: name=libsemanage-python state=present
tags:
- collectd
- when: collectd_apache is defined and ansible_distribution_major_version|int < 22
+ when: collectd_apache is defined and ansible_distribution_major_version|int <= 7 and
ansible_distribution == 'RedHat'
- name: Let collectd talk to things over tcp
seboolean: name=collectd_tcp_network_connect state=yes persistent=yes
diff --git a/roles/collectd/base/templates/collectd.conf.j2
b/roles/collectd/base/templates/collectd.conf.j2
index 0505c16..c1a5af0 100644
--- a/roles/collectd/base/templates/collectd.conf.j2
+++ b/roles/collectd/base/templates/collectd.conf.j2
@@ -43,17 +43,18 @@ LoadPlugin vmem
</Plugin>
<Plugin "interface">
- Interface "/^veth/"
+ Interface "/^veth.*"
+ Interface "/^vnet.*"
IgnoreSelected true
</Plugin>
<Plugin "df">
MountPoint "^/.*/.snapshot/"
- MountPoint "^/var/lib/containers/storage/overlay/.*/merged/"
- MountPoint "^/var/lib/containers/docker/devicemapper/.*/.*/"
- MountPoint "^/var/lib/origin/openshift.local.volumes.*"
MountPoint "^/run/containers/storage/overlay-containers/.*"
- MountPoint "^/tmp/iso/mount/"
+ MountPoint "^/tmp/iso/mount/.*"
+ MountPoint "^/var/lib/containers/.*"
+ MountPoint "^/var/lib/docker/.*"
+ MountPoint "^/var/lib/origin.*"
FSType "shm"
FSType "tmpfs"
FSType "overlay"
diff --git a/roles/collectd/memcached/tasks/main.yml
b/roles/collectd/memcached/tasks/main.yml
index f363df8..4d6700c 100644
--- a/roles/collectd/memcached/tasks/main.yml
+++ b/roles/collectd/memcached/tasks/main.yml
@@ -8,14 +8,6 @@
- memcached
notify: restart collectd
-- name: Ensure that semanage is present
- package: name=policycoreutils-python state=present
- tags:
- - collectd/memcached
- - collectd
- - memcached
- - selinux
-
- name: lastly, set some selinux booleans
seboolean: name=collectd_tcp_network_connect persistent=yes state=yes
tags:
diff --git a/roles/collectd/rabbitmq/tasks/main.yml
b/roles/collectd/rabbitmq/tasks/main.yml
index 431f797..44277b2 100644
--- a/roles/collectd/rabbitmq/tasks/main.yml
+++ b/roles/collectd/rabbitmq/tasks/main.yml
@@ -1,7 +1,15 @@
- name: install collectd-rabbitmq
package:
state: present
- name: python2-collectd-rabbitmq
+ name: python3-collectd-rabbitmq-monitoring
+ tags:
+ - packages
+ - collectd
+
+- name: install collectd-python
+ package:
+ state: present
+ name: collectd-python
tags:
- packages
- collectd
@@ -21,4 +29,4 @@
- name: Let collectd talk to the RabbitMQ management interface
seboolean: name=collectd_tcp_network_connect state=yes persistent=yes
tags:
- - collectd
\ No newline at end of file
+ - collectd
diff --git a/roles/collectd/rabbitmq/templates/rabbitmq.collectd.conf.j2
b/roles/collectd/rabbitmq/templates/rabbitmq.collectd.conf.j2
index 6539c77..4241b28 100644
--- a/roles/collectd/rabbitmq/templates/rabbitmq.collectd.conf.j2
+++ b/roles/collectd/rabbitmq/templates/rabbitmq.collectd.conf.j2
@@ -13,6 +13,8 @@ LoadPlugin python
VHostPrefix "stg"
{% endif %}
<Ignore "queue">
+ Regex "celery%40"
+ Regex
"celeryev.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
Regex "^federation%3A%20"
Regex "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
</Ignore>
diff --git a/roles/collectd/server/files/collection.conf
b/roles/collectd/server/files/collection.conf
index 99aa65e..7646b1a 100644
--- a/roles/collectd/server/files/collection.conf
+++ b/roles/collectd/server/files/collection.conf
@@ -901,4 +901,45 @@ GraphWidth 400
</Type>
+#
+# IPA
+#
+<Type ipa_groups>
+ RRDTitle "Groups"
+ DSName "value Total "
+</Type>
+
+<Type ipa_users_rate>
+ RRDTitle "Users registration rate"
+ DSName "value Rate "
+ RRDFormat "%4.1lf%s/s"
+</Type>
+
+<Type ipa_users>
+ Module GenericStacked
+ RRDTitle "Users"
+ RRDFormat "%5.1lf%s"
+ DSName "active Active "
+ DSName "locked Locked "
+ Order locked active
+ Color locked ff0000
+ Color active 0000ff
+</Type>
+
+<Type ipa_staged_users>
+ Module GenericStacked
+ RRDTitle "Registering Users"
+ RRDFormat "%4.0lf"
+ DSName "active Not Spam "
+ DSName "spamcheck_awaiting Awaiting "
+ DSName "spamcheck_denied SPAM "
+ DSName "spamcheck_manual Manual "
+ Order spamcheck_awaiting spamcheck_denied spamcheck_manual active
+ Color spamcheck_awaiting 0000ff
+ Color spamcheck_denied ff0000
+ Color spamcheck_manual ffb000
+ Color active 00ff00
+</Type>
+
+
# vim: set sw=2 sts=2 et syntax=apache fileencoding=utf-8 :
diff --git a/roles/collectd/server/tasks/main.yml b/roles/collectd/server/tasks/main.yml
index 4edb4f0..4b33ed2 100644
--- a/roles/collectd/server/tasks/main.yml
+++ b/roles/collectd/server/tasks/main.yml
@@ -2,11 +2,10 @@
# collectd server setup
# install pkg
-- name: install collectd server packages
+- name: install collectd server packages (rhel 7)
package: name={{ item }} state=present
with_items:
- collectd-rrdtool
- - collectd-ping
- collectd-web
- collectd-rabbitmq-data
notify:
@@ -14,15 +13,21 @@
tags:
- config
- collectd/server
+ when: ansible_distribution_major_version|int == 7
-# install collectd ping config
-- name: install collectd ping config
- copy: src=ping.conf dest=/etc/collectd.d/ping.conf
+- name: install collectd server packages (rhel 8)
+ package: name={{ item }} state=present
+ with_items:
+ - collectd-rrdtool
+ - collectd-web
+ - collectd-rabbitmq-data
+ - collectd-ipa-data
notify:
- restart collectd
tags:
- config
- collectd/server
+ when: ansible_distribution_major_version|int == 8
# install collectd rrd config
- name: install collectd rrd config
@@ -54,13 +59,6 @@
- config
- collectd/server
-# create a link from /var/lib/collectd to /var/log/collectd
-- name: create link from /var/lib/collectd to /var/log/collectd
- file: state=link src=/var/log/collectd dest=/var/lib/collectd
- tags:
- - config
- - collectd/server
-
# push our custom config file for the graph CGIs
- name: push the collection.conf file
copy:
Show replies by date