Skip to content

SONATA Monitor: Monitor Service Descriptor (MSD)

Steven Van Rossem edited this page Sep 6, 2017 · 1 revision

Monitor Service Descriptor

To help a service developer monitor a wide set of metrics, a dedicated descriptor is devised. This Monitor Service Descriptor (MSD) file instructs the SDK monitoring framework to gather and display a custom set of metrics. The standard SONATA descriptor files in the service package (NSD and VNFD) define the metrics that should be gathered when the service is in production. The MSD on the other hand, defines a broader or different set of metrics that are only needed during development. It is a dedicated, customizable file since the monitor requirements of a service in development might be different compared to a service running in production. The MSD file can be used to dynamically change the monitored parameters of a deployed service in son-emu without having to interrupt or re-deploy the service. It is given as input to son-monitor who will parse it, initialize the export of the required metrics, translate it to a Grafana dashboard and configure the correct Prometheus queries to get the values out of the Database.

The structure of the file is given in the figure at the bottom of the page. Two major classes of metrics can be specified:

  • VNF metrics: This type of metrics is related to a VNF, interface or service as a whole, grouped per metric type. This can be used to compare the same metric type for different VNFs or interfaces.
Valid VNF Metrics for the MSD file
Parameter Possible values/Type Description
metric_type ["cpu", "mem"] Compute related metrics
metric_type ["packet_loss", "jitter"] Metrics that are exported from a dedicated Test-VNF
metric_type ["packet_rate", "byte_rate", "packet_count", "byte_count"] Network metrics for a specific interface
vnf "vnf_name:interface" vnf_name+interface as used in the NSD
direction ["tx", "rx"] Monitor the egress or ingress traffic
  • NSD link metrics: This type of metrics is related to the network/flow statistics in the emulated service, grouped per metric type. This can be used to compare in detail different types of network traffic/flows on the same or different links/chains. If the link is not a pre-defined chain in the NSD, it cannot be monitored.
Below table explains the NSD link Metrics which differ from the VNF metrics above.
Valid NSD Link Metrics for the MSD file
Parameter Possible values/Type/Format Description
link_id string link id that is also used in the NSD
metric_type ["packet_rate", "byte_rate", "packet_count", "byte_count"] Network metrics for a specific interface or flow
source "vnf_name:interface" the source of the monitored traffic
destination "vnf_name:interface" the destination of the monitored traffic
match string (OpenFlow based match entry) Specify flow using the same syntax as OpenVSwitch. If match is empty, total interface counter is used.
  • The complete msd file structure is illustrated below:
msd file structure

msd file example

 ---
 service_name: "sonata-ovs-user-service"
 version: "0.1"
 author: "Steven Van Rossem, Ghent University, [email protected]"
 description: "Monitor descriptor for an example service with two chained ubuntu VNFs"
 dashboard: "son-monitor-ovs-user-service"
 ##
 ## Metrics for a single VNF
 ##
 vnf_metrics:
  - metric_type: "cpu"
    description: "cpu load (%)"
    vnf_ids:
      - vnf: "ovs1" 
      - vnf: "ctrl" 
   - metric_type: "packet_rate"
     description: "packet rate (packets/sec)"
     vnf_ids:
       - vnf: "ovs1:port0"
         direction: "rx"
       - vnf: "ctrl:ctrl-port"
         direction: "rx"
 ##
 ## Metrics for an NSD link
 ##
 nsd_links:
   - metric_type: "packet_count"
     description: "packet_count of links"
     link_ids:
       - description: "link0 tx packets"
         link_id: "link-port0"
         source: "ns_port0:port0"
         destination: "ovs1:port0"
         direction: "tx"
       - description: "test traffic" 
         link_id: "link-port1-b"
         source: "ovs1:port1"
         destination: "ns_port1:port1"
         direction: "rx"
         match: "dl_type=0x0800,ip_proto=6,tcp_dst=5002"  
       - description: "icmpv4 ping echo messages" 
         link_id: "link-port1-b"
         source: "ovs1:port1"
         destination: "ns_port1:port1"
         direction: "rx"
         match: "dl_type=0x0800,ip_proto=1,icmpv4_type=0"