Enable monitoring of the Open vSwitch processes

Enable monitoring of the Open vSwitch processes

Warning

This feature is available starting from the MCP 2019.2.3 maintenance update. Before enabling the feature, follow the steps described in Apply maintenance updates.

If you have deployed Neutron Open vSwitch (OVS) as a networking solution for your OpenStack environment, you can enable StackLight LMA to monitor the OVS processes and to issue an alert if the memory consumption of an OVS process exceeds 20% and 30% set by default. The procedure below implies updating of the monitoring configuration for the nodes that run OVS, typically cmp and gtw.

To enable monitoring of the OVS processes:

  1. Log in to the Salt Master node.

  2. Verify that OVS is enabled:

    salt -C "I@linux:network:bridge:openvswitch" test.ping
    

    The command output displays the nodes that run openvswitch, for example, cmp and gtw.

  3. Open your Git project repository with the Reclass model on the cluster level.

  4. In openstack/compute/init.yml and openstack/gateway.yml, specify the following parameters:

    parameters:
      telegraf:
        agent:
          input:
            procstat:
              process:
                ovs-vswitchd:
                  exe: ovs-vswitchd
      prometheus:
        server:
          alert:
            ProcessOVSmemoryWarning:
              if: procstat_memory_vms{process_name="ovs-vswitchd"} / on(host) mem_total > 0.2
              for: 5m
              labels:
                severity: warning
                service: ovs
              annotations:
                summary: "ovs-vswitchd takes more than 20% of system memory"
                description: "ovs-vswitchd takes more than 20% of system memory"
            ProcessOVSmemoryCritical:
                if: procstat_memory_vms{process_name="ovs-vswitchd"} / on(host) mem_total > 0.3
                for: 5m
                labels:
                  severity: critical
                  service: ovs
                annotations:
                  summary: "ovs-vswitchd takes more than 30% of system memory"
                  description: "ovs-vswitchd takes more than 30% of system memory"
    
  5. Apply the changes:

    1. Refresh Salt pillars:

      salt '*' saltutil.refresh_pillar
      
    2. Add the Telegraf configuration:

      salt -C "I@linux:network:bridge:openvswitch" state.sls telegraf.agent
      
    3. Add the Prometheus alerts:

      salt 'mon*' state.sls prometheus.server