OSM Performance Management: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 51: Line 51:
3. Visit Grafana at http://1.2.3.4:3000, replacing 1.2.3.4 with the IP address of your host.  Login with admin/admin credentials and visit the OSM Sample Dashboard.  It should already show graphs for CPU and Memory.  You can clone them and customize as desired.
3. Visit Grafana at http://1.2.3.4:3000, replacing 1.2.3.4 with the IP address of your host.  Login with admin/admin credentials and visit the OSM Sample Dashboard.  It should already show graphs for CPU and Memory.  You can clone them and customize as desired.


[[File:OSM_Grafana_Example_4.png|600px|Diagram of OSM Grafana Example]]
[[File:OSM_Grafana_Example_4.png|800px|Diagram of OSM Grafana Example]]

Revision as of 19:07, 16 May 2018

This is an experimental feature which allows to continuously monitor VNF metrics and visualize them.

As of Release 4.0.0, it is available for OpenStack VIM metrics only. VNF metrics and other VIM types will soon be added.

Basic functionality

By default, OSM MON allows to grab any metric, from any VDU and put it on the Kafka Bus, specifically in the 'metrics_response' topic.

To grab a metric and put it on the bus, simply run this command (in the example: NS name: "vnf01", VNF index: 1, VDU name: "ubuntuvnf_vnfd-VM", metric type: "cpu_utilization")

osm ns-metric-export --ns vnf01 --vnf 1 --vdu ubuntuvnf_vnfd-VM --metric cpu_utilization

Possible metric names are: cpu_utilization, average_memory_utilization

The specific result can be read directly from the Kafka Topic using a external tool, or can be seen in the MON logs by running a docker logs <MON Container ID>

You can also add the '--interval' option to leave it running continuously, for example, every 10 seconds:

osm ns-metric-export --ns vnf01 --vnf 1 --vdu ubuntuvnf_vnfd-VM --metric cpu_utilization --interval 10

Finally, you can leave it running in the background using Linux default tools:

osm ns-metric-export --ns vnf01 --vnf 1 --vdu ubuntuvnf_vnfd-VM --metric cpu_utilization --interval 10 > /dev/null 2>&1 &

Experimental functionality

Some extensions have been added to the OSM installer to include an optional 'OSM Performance Management' stack, consisting a 'Kafka Exporter' component that reads the metrics from the bus, exposes them in Prometheus so it can store them in its TSDB, and presents them in Grafana.

Basic architecture is as follows:

Diagram of OSM Metrics Experimental add-ons

Enabling the OSM Performance Management Stack

If you want to install OSM along with the PM stack, run the installer as follows:

./install_osm_release.sh --pm_stack

If you just want to add the PM stack to an existing OSM R4 Lightweight build, run the installer as follows:

 ./install_osm_release.sh -o pm_stack

Testing the OSM PM Stack

1. Create a continuous metric, that runs in the background as indicated in the first section. 2. Check if the Kafka Exporter is serving the metric to Prometheus, by visiting http://1.2.3.4:12340/metrics, replacing 1.2.3.4 with the IP address of your host. Metrics should appear in the following text format:

# HELP kafka_exporter_topic_average_memory_utilization 
# TYPE kafka_exporter_topic_average_memory_utilization gauge
kafka_exporter_topic_average_memory_utilization{resource_uuid="5599ce48-a830-4c51-995e-a663e590952f",} 200.0
# HELP kafka_exporter_topic_cpu_utilization 
# TYPE kafka_exporter_topic_cpu_utilization gauge
kafka_exporter_topic_cpu_utilization{resource_uuid="5599ce48-a830-4c51-995e-a663e590952f",} 0.7950777152296741

3. Visit Grafana at http://1.2.3.4:3000, replacing 1.2.3.4 with the IP address of your host. Login with admin/admin credentials and visit the OSM Sample Dashboard. It should already show graphs for CPU and Memory. You can clone them and customize as desired.

Diagram of OSM Grafana Example