This commit does several things at once: - Use ansible_distribution_major_version to detect which version of the EPEL repository. So we dont have to hard code the URL for either epel7 or epel 8. - Remove "stein" workaround for colelctd-openstack role. The "stein" workaround has been removed in favor of running the collectd daemon in a podman container. - Drop opendaylight support for collectd since it is no longer suupported. - Add the collectd playbook so we can run collectd in a centos 7 container going forward for "train". This commit still needs to be tested on "stein" but it will probably work anyways. - Add browbeat-containers to tox.ini for flake8 - Simplify detection of docker or podman for older versions of OSP. (sai) - Fixed typo from compute_compute to collectd_compute that caused failures on computes - clear graphite_host in install/group_vars/all.yml - Move container DockerFiles into brwobeat tree - Conditionally copy required Dockerfiles to node instead of git clone - Fix up some log file paths - Use Docker/Podman depending on release - Provide single interface(collectd.yml) which has container and baremetal playbooks - Introduce variable collectd_container in install/group_vars/all - remove unneeded selinux rebaelling (already running as priveleged) when running container - remove unneed hostfs mount - collectd container logs to file instead of STDOUT for easier debug - add collectd-ping package to collectd-openstack Dockerfile - Improve docs to reflect changes - dynamically set rabbitmq and swift paths as well for tail plugin Co-Authored-By: Sai Sindhur Malleni <smalleni@redhat.com> Change-Id: I627a696f6f1240d96a0e1d85c26d59bbbfae2b1b Signed-off-by: Charles Short <chucks@redhat.com> Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
196 lines
4.1 KiB
Django/Jinja
196 lines
4.1 KiB
Django/Jinja
# Installed by Browbeat Ansible Installer
|
|
# Config type: {{config_type}}
|
|
|
|
# Interval default is 10s
|
|
Interval {{collectd_interval}}
|
|
|
|
# Hostname for this machine, if not defined, use gethostname(2) system call
|
|
Hostname "{{inventory_hostname}}"
|
|
|
|
# Loaded Plugins:
|
|
LoadPlugin "logfile"
|
|
<Plugin "logfile">
|
|
File "/var/log/collectd.log"
|
|
LogLevel "info"
|
|
PrintSeverity true
|
|
Timestamp true
|
|
</Plugin>
|
|
|
|
LoadPlugin write_graphite
|
|
LoadPlugin cpu
|
|
LoadPlugin conntrack
|
|
LoadPlugin df
|
|
LoadPlugin disk
|
|
LoadPlugin exec
|
|
LoadPlugin interface
|
|
LoadPlugin irq
|
|
LoadPlugin load
|
|
LoadPlugin match_regex
|
|
LoadPlugin memory
|
|
LoadPlugin numa
|
|
LoadPlugin processes
|
|
{%if iostat_blockstorage_collectd_plugin %}
|
|
<LoadPlugin python>
|
|
Globals true
|
|
</LoadPlugin>
|
|
{% endif %}
|
|
LoadPlugin swap
|
|
LoadPlugin tail
|
|
LoadPlugin turbostat
|
|
LoadPlugin unixsock
|
|
LoadPlugin uptime
|
|
|
|
# Open unix domain socket for collectdctl
|
|
<Plugin unixsock>
|
|
SocketFile "/var/run/collectd-unixsock"
|
|
SocketGroup "collectd"
|
|
SocketPerms "0770"
|
|
DeleteSocket true
|
|
</Plugin>
|
|
|
|
PreCacheChain "PreCache"
|
|
<Chain "PreCache">
|
|
<Rule "ignore_tap">
|
|
<Match "regex">
|
|
Plugin "^interface$"
|
|
PluginInstance "^tap*"
|
|
</Match>
|
|
Target "stop"
|
|
</Rule>
|
|
<Rule "ignore_interfaces_q">
|
|
<Match "regex">
|
|
Plugin "^interface$"
|
|
PluginInstance "^q.*"
|
|
</Match>
|
|
Target "stop"
|
|
</Rule>
|
|
Target "return"
|
|
</Chain>
|
|
|
|
# Graphite Host Configuration
|
|
<Plugin write_graphite>
|
|
<Carbon>
|
|
Host "{{graphite_host}}"
|
|
Port "{{collectd_write_graphite_port}}"
|
|
Prefix "{{graphite_prefix}}."
|
|
Protocol "tcp"
|
|
LogSendErrors true
|
|
StoreRates true
|
|
AlwaysAppendDS false
|
|
EscapeCharacter "_"
|
|
</Carbon>
|
|
</Plugin>
|
|
|
|
<Plugin df>
|
|
FSType anon_inodefs
|
|
FSType bdev
|
|
FSType cgroup
|
|
FSType cpuset
|
|
FSType debugfs
|
|
FSType devpts
|
|
FSType devtmpfs
|
|
FSType ecryptfs
|
|
FSType fuse
|
|
FSType fusectl
|
|
FSType hugetlbfs
|
|
FSType mqueue
|
|
FSType nfs
|
|
FSType nfs4
|
|
FSType nfsd
|
|
FSType overlay
|
|
FSType pipefs
|
|
FSType proc
|
|
FSType pstore
|
|
FSType ramfs
|
|
#FSType rootfs
|
|
FSType rpc_pipefs
|
|
FSType securityfs
|
|
FSType sockfs
|
|
FSType sysfs
|
|
FSType tmpfs
|
|
FSType vboxsf
|
|
MountPoint "/^/var/lib/docker/.*/"
|
|
IgnoreSelected true
|
|
ValuesPercentage true
|
|
ReportInodes true
|
|
</Plugin>
|
|
|
|
{%if disk_blockstorage_collectd_plugin %}
|
|
<Plugin disk>
|
|
Disk "/^[hsv]d[a-z]+[0-9]?$/"
|
|
Disk "/^nvm/"
|
|
IgnoreSelected false
|
|
</Plugin>
|
|
|
|
{% endif %}
|
|
{%if iostat_blockstorage_collectd_plugin %}
|
|
<Plugin python>
|
|
ModulePath "/usr/local/bin/"
|
|
Import "collectd_iostat_python"
|
|
|
|
<Module collectd_iostat_python>
|
|
Path "/usr/bin/iostat"
|
|
Interval {{iostat_blockstorage_collectd_interval}}
|
|
IostatInterval 2
|
|
Count 2
|
|
Verbose false
|
|
NiceNames false
|
|
PluginName collectd_iostat_python
|
|
</Module>
|
|
</Plugin>
|
|
|
|
{% endif %}
|
|
# (akrzos) Including the version of OpenStack that the process was verified as running after
|
|
# OpenStack Installation with a comment at the end of each Process/ProcessMatch statement.
|
|
# A Minus before the version means the process was not found in that version. (Ex -9)
|
|
<Plugin processes>
|
|
# Cinder (OpenStack Installed)
|
|
ProcessMatch "cinder-volume" "python.+cinder-volume" # 10,11
|
|
|
|
# Collectd (Browbeat Installed)
|
|
ProcessMatch "collectd" "/usr/sbin/collectd"
|
|
|
|
# OVS (OpenStack Installed)
|
|
ProcessMatch "ovs-vswitchd" "ovs-vswitchd.+openvswitch" # 10,11
|
|
ProcessMatch "ovsdb-server" "ovsdb-server.+openvswitch" # 10,11
|
|
</Plugin>
|
|
|
|
<Plugin swap>
|
|
ReportBytes true
|
|
ValuesPercentage true
|
|
</Plugin>
|
|
|
|
# Tail plugin configuration
|
|
<Plugin "tail">
|
|
|
|
<File "/var/log/cinder/volume.log">
|
|
Instance "cinder-volume"
|
|
<Match>
|
|
Regex " ERROR "
|
|
DSType "CounterInc"
|
|
Type "counter"
|
|
Instance "error"
|
|
</Match>
|
|
{%if regex_warn %}
|
|
<Match>
|
|
Regex " WARNING "
|
|
DSType "CounterInc"
|
|
Type "counter"
|
|
Instance "warn"
|
|
</Match>
|
|
{% endif %}
|
|
{%if regex_info %}
|
|
<Match>
|
|
Regex " INFO "
|
|
DSType "CounterInc"
|
|
Type "counter"
|
|
Instance "info"
|
|
</Match>
|
|
{% endif %}
|
|
</File>
|
|
|
|
</Plugin>
|
|
|
|
# Include other collectd configuration files
|
|
Include "/etc/collectd.d"
|