Pretty print json files in vnfs/
[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": [
14             "lo",
15             "enp0s3",
16             "docker0"
17         ]
18     },
19     "tmp_indirectParameters": {
20         "tmp_init": {
21             "tmp_t0BytesIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f2",
22             "tmp_t0BytesOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f10",
23             "tmp_t0PacketsIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f3",
24             "tmp_t0PacketsOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f11"
25         },
26         "vNicPerformance": {
27             "tmp_vnic_command": {
28                 "tmp_t1BytesIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f2",
29                 "tmp_t1BytesOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f10",
30                 "tmp_t1PacketsIn": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f3",
31                 "tmp_t1PacketsOut": "sudo cat /proc/net/dev | grep $tmp_device | tr -s ' ' | cut -d ':' -f2 | cut -d ' ' -f11"
32             },
33             "receivedOctetsDelta": "$(tmp_t1BytesIn - tmp_t0BytesIn)",
34             "receivedTotalPacketsDelta": "$(tmp_t1PacketsIn - tmp_t0PacketsIn)",
35             "transmittedOctetsDelta": "$(tmp_t1BytesOut - tmp_t0BytesOut)",
36             "transmittedTotalPacketsDelta": "$(tmp_t1PacketsOut - tmp_t0PacketsOut)",
37             "valuesAreSuspect": "true",
38             "vNicIdentifier": "$tmp_device"
39         },
40         "cpuUsage": {
41             "tmp_cpuuse_command": {
42                 "tmp_cpuUseCmd": "/usr/bin/top -bn 2 -d 0.01 | grep '^%Cpu' | tail -n 1 | cut -d ':' -f2",
43                 "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",
44                 "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",
45                 "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"
46             },
47             "cpuIdentifier": "Cpu1",
48             "cpuIdle": "$tmp_cpuIdle",
49             "cpuUsageSystem": "$tmp_cpuUsageSystem",
50             "cpuUsageUser": "$tmp_cpuUsageUser"
51         }
52     }
53 }