browbeat/ansible/install/roles/collectd-openstack/templates/ovn_compute.collectd.conf.j2
venkata anil b132b62274 Add OSP resource metrics
This patch adds 'OSP Resources' dashbaord with 'OSP DB resources'
and 'OSP REST API' panels which displays neutron and nova resources
by tracking DB and REST api calls.

A new dashbaord 'OVN Metrics' will collect ovn metrics.

Collectd is enhanced to issue mysql statements and capture OSP
resources count as metrics. Collectd also monitors REST API calls
on logs and adds monitors.

'Unreasonably long 1014ms poll interval' message in OVN processes
indicates how busy OVN is and capturing these values for grafana
plotting will be very helpful in performance analysis.

We usually avoid enabling collectd on computes as this will
saturate graphite. So we need to have a light weight config to
enable OVN analysis on compute nodes. This patch adds
ovn_compute.collectd.conf.j2 to collect only ovn metrics on
compute nodes. We can enhance it later to include other important
metrics if needed.

Change-Id: If6cc162f5017c81ac62a7c7f5bd4f92be717ea6f
2021-09-02 17:45:31 +05:30

83 lines
1.7 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
{% if not collectd_prometheus %}
Hostname "{{inventory_hostname}}"
{% endif %}
{% if collectd_prometheus %}
Hostname "{{prometheus_prefix}}_{{inventory_hostname}}"
{% endif %}
# Loaded Plugins:
LoadPlugin "logfile"
<Plugin "logfile">
File "/var/log/collectd.log"
LogLevel "info"
PrintSeverity true
Timestamp true
</Plugin>
LoadPlugin write_graphite
LoadPlugin tail
LoadPlugin unixsock
# Open unix domain socket for collectdctl
<Plugin unixsock>
SocketFile "/var/run/collectd-unixsock"
SocketGroup "collectd"
SocketPerms "0770"
DeleteSocket true
</Plugin>
# Graphite Host Configuration
{% if collectd_graphite %}
<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>
{% endif %}
# Prometheus Host Configuration
{% if collectd_prometheus %}
<Plugin network>
Server "{{prometheus_host}}" "{{prometheus_port}}"
</Plugin>
{% endif %}
{% if ovs_flows_monitoring %}
<Plugin exec>
Exec "heat-admin:heat-admin" "/usr/local/bin/ovs_flows.sh"
</Plugin>
{% endif %}
# Tail plugin configuration
<Plugin "tail">
<File "/var/log/containers/openvswitch/ovn-controller.log">
Instance "ovncontroller"
<Match>
Regex "Unreasonably long ([0-9]*)ms poll interval"
DSType "GaugeLast"
Type "count"
Instance "poll"
</Match>
</File>
</Plugin>
# Include other collectd configuration files
Include "/etc/collectd.d"