Fix unparsable json files
[demo.git] / vnfs / VES5.0 / evel / evel-library / code / VESreporting_vFW / meas_config.json
1 {
2    "tmp_directParameters": {
3        "eventName": "Measurement_vFirewall-AT&T_nicPerformance",
4        "eventType": "applicationVnf",
5        "nfcNamingCode": "AFX",
6        "nfNamingCode": "AFX",
7        "priority": "Low",
8        "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
9        "reportingEntityName": "ibcx0001vm002oam001",
10        "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
11        "sourceName": "scfx0001vm002cap001",
12        "measurementInterval": 20,
13        "tmp_device": ["lo", "enp0s3", "docker0"]
14
15     },
16     "tmp_indirectParameters":   {
17        "tmp_init":{
18               "tmp_t0BytesIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f2",
19                "tmp_t0BytesOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f10", 
20                "tmp_t0PacketsIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f3", 
21                "tmp_t0PacketsOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f11" 
22        },
23        "vNicPerformance": {
24            "tmp_vnic_command": {
25                "tmp_t1BytesIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f2", 
26                "tmp_t1BytesOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f10", 
27                "tmp_t1PacketsIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f3", 
28                "tmp_t1PacketsOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f11" 
29            },
30            "receivedOctetsDelta": "$(tmp_t1BytesIn - tmp_t0BytesIn)",
31            "receivedTotalPacketsDelta": "$(tmp_t1PacketsIn - tmp_t0PacketsIn)",
32            "transmittedOctetsDelta": "$(tmp_t1BytesOut - tmp_t0BytesOut)",
33            "transmittedTotalPacketsDelta": "$(tmp_t1PacketsOut - tmp_t0PacketsOut)",
34            "valuesAreSuspect": "true",
35            "vNicIdentifier": "$tmp_device"
36        },
37        "cpuUsage": {
38            "tmp_cpuuse_command": {
39                 "tmp_cpuUseCmd": "/usr/bin/top -bn 2 -d 0.01 | grep '^%Cpu' | tail -n 1 | cut -d ':' -f2",
40                 "tmp_cpuIdle": "/usr/bin/top -bn 2 -d 0.01 | grep '^%Cpu' | tail -n 1 |cut -d ':' -f2 | cut -d ',' -f4 | cut -b 1-5",
41                 "tmp_cpuUsageSystem": "/usr/bin/top -bn 2 -d 0.01 | grep '^%Cpu' | tail -n 1 |cut -d ':' -f2 | cut -d ',' -f2 | cut -b 1-5",
42                 "tmp_cpuUsageUser": "/usr/bin/top -bn 2 -d 0.01 | grep '^%Cpu' | tail -n 1 |cut -d ':' -f2 | cut -d ',' -f1 | cut -b 1-5"
43            },
44            "cpuIdentifier": "Cpu1",
45            "cpuIdle": "$tmp_cpuIdle",
46            "cpuUsageSystem": "$tmp_cpuUsageSystem",
47            "cpuUsageUser": "$tmp_cpuUsageUser"
48        }
49    }
50 }