From 9d83f3d996de794d809fac78de91cb8e50884ec9 Mon Sep 17 00:00:00 2001 From: vegall Date: Mon, 8 Jul 2024 14:23:07 +0000 Subject: [PATCH] Adds documentation about How to Monitor the NS deployed using Prometheus Signed-off-by: vegall --- 04-vim-setup.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/04-vim-setup.md b/04-vim-setup.md index 33d30dd..2889ccf 100644 --- a/04-vim-setup.md +++ b/04-vim-setup.md @@ -113,6 +113,48 @@ With respect to a regular Openstack, these additional configuration parameteres For common options, you may refer to the general OpenStack Setup Guide. +#### How to Monitor the NS deployed using Prometheus + +If you want to monitor the VMs deployed in an OpenStack using Prometheus, you first need to deploy the VIM with the specific option: + +```bash +osm vim-create --name --user --password --auth_url --tenant --account_type openstack --prometheus_config_file +``` + +Where the `` has the following format: + +```json +{ + "prometheus-url": "http://:9090", + "prometheus_cred": {}, + "prometheus_map": { + "cpu_utilization": "cpu", + "average_memory_utilization": "memory_usage", + "disk_read_ops": "disk_device_read_requests", + "disk_write_ops": "disk_device_write_requests", + "disk_read_bytes": "disk_device_read_bytes", + "disk_write_bytes": "disk_device_write_bytes", + "packets_in_dropped": "network_incoming_packets_drop", + "packets_out_dropped": "network_outgoing_packets_drop", + "packets_received": "network_incoming_packets", + "packets_sent":"network_outgoing_packets" + } +} +``` + +Then, check `mon` to see the logs: + +```bash +02/29/2024 05:08:34 PM - osm_mon.collector.vnf_collectors.juju - INFO - N2VC juju connector initialized +02/29/2024 05:08:34 PM - osm_mon.collector.vnf_collectors.openstack - INFO - Collecting metric type: MetricType.INSTANCE and metric_name: cpu_utilization and resource_id 8778d4ad-f8ce-4d51-8216-726ea5a36dbe and +02/29/2024 05:08:34 PM - db - INFO - Connected to database osm version 1.2 +02/29/2024 05:08:34 PM - db - INFO - Connected to database osm version 1.2 +02/29/2024 05:08:34 PM - db - INFO - Connected to database osm version 1.2 +02/29/2024 05:08:34 PM - osm_mon.collector.vnf_collectors.openstack - INFO - value: 18530000000 +02/29/2024 05:08:34 PM - osm_mon.collector.vnf_collectors.openstack - INFO - Using an as backend +02/29/2024 05:08:34 PM - osm_mon.collector.vnf_collectors.openstack - INFO - Collecting metric type: MetricType.INSTANCE and metric_name: average_memory_utilization and resource_id 8778d4ad-f8ce-4d51-8216-726ea5a36dbe and +``` + ## OpenVIM (Deprecated) ### How to set up an OpenVIM environment -- GitLab