browbeat/ansible/install/roles/collectd-openstack/files/ovs_flows.sh
Sai Sindhur Malleni e2686f9a5f Add ovs flows monitoring
This commit

1. Adds a custom plugin to get number of ovs flows on br-int
2. Adds a row/panel to the OpenStack General System Performance
   dashboard to visualize this
3. Adds support for containerized/non-containerized collectd
4. In case of containerized, ovs is installed on container and
   /etc/openvswitch and /var/run/openvswitch from host are mounted
   into container
5. The custom collectd exec plugin cannot be run as root, hence stack
   user is created within container and the plugin is run as stack user.
   In the case of non-containerized collectd, heat-admin user existing on
   overcloud nodes is used
6. Controllers and Computes are monitored

Change-Id: I4687bd6aa0168c0b4bab72cf8eaca5f92c42b635
2020-04-06 18:56:21 +00:00

10 lines
264 B
Bash
Executable File

#!/bin/sh
HOSTNAME="${COLLECTD_HOSTNAME:-`hostname -f`}"
INTERVAL="${COLLECTD_INTERVAL:-15}"
while sleep "$INTERVAL"; do
VALUE=$(sudo ovs-ofctl dump-flows br-int | wc -l)
echo "PUTVAL \"$HOSTNAME/ovs-flows/gauge-ovs_flows\" interval=$INTERVAL N:$VALUE"
done