Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions qa/1131
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ signal=$PCP_BINADM_DIR/pmsignal
trap "_cleanup; exit \$status" 0 1 2 3 15

A="$here/archives/rep"
A1="$here/archives/20180606"
A1="$here/archives/20201109"
hostname=`hostname`
machineid=`_machine_id`
domainid=`_domain_name`
Expand Down Expand Up @@ -62,6 +62,10 @@ _filter_pcp2openmetrics()
-e '/version=/s/version="*[^"]*"*/version="VERSION"/' \
-e '/agent=/s/agent="*[^"]*"*/agent="AGENT"/' \
-e 's/\(.*}\).*/\1 NCPU/' \
-e '/PCP5 kernel.all.load/{
s/ 60.2.0 / PMID /
s/ 60.2 / PMID /
}' \
-e '/PCP5 hinv_ncpu/{
s/ 60.0.32 / PMID /
s/ 85.0.0 / PMID /
Expand All @@ -74,11 +78,11 @@ _filter_pcp2opentelemetry()
tee -a $here/$seq.full \
| col -b \
| sed \
-e '/\"asInt\":/ s/[0-9][0-9]*/INTEGER/' \
-e '/\"asDouble\":/ s/[0-9][0-9]*/DOUBLE/' \
-e 's/\"version\": .*/\"version\": VERSION/' \
-e 's/\"stringValue\": \".*\"/\"stringValue\": \"STRING\"/' \
-e 's/\"timeUnixNano\": [0-9][0-9]*\.[0-9][0-9]*.*/\"timeUnixNano\": TIME/' \
-e 's/\"stringValue\": \"[^\"]*\"/\"stringValue\": \"VALUE\"/g'\
-e 's/\"timeUnixNano\": \"[^\"]*\"/\"timeUnixNano\": \"TIME\"/g'\
-e 's/\"version\": \"[^\"]*\"/\"version\": \"VERSION\"/g'\
-e 's/\"asInt\": [0-9]*/\"asInt\": \"INTEGER\"/g'\
-e 's/\"asDouble\": [0-9]*/\"asDouble\": \"DOUBLE\"/g'\
# end
}

Expand All @@ -99,9 +103,13 @@ pcp2openmetrics -s1 -z hinv.ncpu | _filter_pcp2openmetrics
echo "---"
pcp2openmetrics -s2 -x hinv.ncpu | _filter_pcp2openmetrics
echo "---"
pcp2openmetrics -s2 -a $A1 hinv.ncpu disk.partitions.write | _archive_filter
pcp2openmetrics -s2 -a $A1 hinv.ncpu kernel.all.load | _filter_pcp2openmetrics | _archive_filter
echo "---"
pcp2opentelemetry -s1 -z hinv.ncpu | _filter_pcp2opentelemetry
echo "---"
pcp2opentelemetry -s2 -z hinv.ncpu | _filter_pcp2opentelemetry
echo "---"
pcp2opentelemetry -s1 -H -z hinv.ncpu | _filter_pcp2opentelemetry
pcp2opentelemetry -s1 -a $A1 hinv.ncpu | _filter_pcp2opentelemetry
echo "---"

cat $tmp.outfile | _archive_filter
Expand Down
112 changes: 19 additions & 93 deletions qa/1131.out
Original file line number Diff line number Diff line change
Expand Up @@ -2279,101 +2279,27 @@ hinv_ncpu{domainname="DOMAINID",groupid="GROUPID",hostname="HOST",machineid="MAC
hinv_ncpu{domainname="DOMAINID",groupid="GROUPID",hostname="HOST",machineid="MACHINEID",userid="USERID",agent="AGENT"} NCPU
hinv_ncpu{domainname="DOMAINID",groupid="GROUPID",hostname="HOST",machineid="MACHINEID",userid="USERID",agent="AGENT"} NCPU
---
# PCP5 hinv_ncpu 60.0.32 u32 PM_INDOM_NULL discrete
# TYPE hinv_ncpu gauge
# HELP hinv_ncpu number of CPUs in the system
hinv_ncpu{domainname="localdomain",groupid="999",hostname="vm01",machineid="3a6b3d7f3b7559c538a5934a24866658",userid="999",agent="linux"} 1 1528207821.599573
# PCP5 disk_partitions_write 60.10.1 u32 60.10 counter count
# TYPE disk_partitions_write counter
# HELP disk_partitions_write write operations metric for storage partitions
disk_partitions_write_total{domainname="localdomain",groupid="999",hostname="vm01",machineid="3a6b3d7f3b7559c538a5934a24866658",userid="999",instname="sda1",instid="1",agent="linux",device_type="block",indom_name="per partition"} 88156 1528207821.599573
disk_partitions_write_total{domainname="localdomain",groupid="999",hostname="vm01",machineid="3a6b3d7f3b7559c538a5934a24866658",userid="999",instname="sda2",instid="2",agent="linux",device_type="block",indom_name="per partition"} 0 1528207821.599573
disk_partitions_write_total{domainname="localdomain",groupid="999",hostname="vm01",machineid="3a6b3d7f3b7559c538a5934a24866658",userid="999",instname="sda5",instid="3",agent="linux",device_type="block",indom_name="per partition"} 2293 1528207821.599573
# EOF
# HELP hinv_ncpu number of CPUs in the system
# HELP kernel_all_load 1, 5 and 15 minute load average
# PCP5 hinv_ncpu PMID u32 PM_INDOM_NULL discrete
# PCP5 kernel_all_load PMID float PMID instant
# TYPE hinv_ncpu gauge
# TYPE kernel_all_load gauge
hinv_ncpu{,hostname="shard"} NCPU
hinv_ncpu{,hostname="shard"} NCPU
kernel_all_load{,hostname="shard",instname="1 minute",instid="1"} NCPU
kernel_all_load{,hostname="shard",instname="15 minute",instid="15"} NCPU
kernel_all_load{,hostname="shard",instname="5 minute",instid="5"} NCPU
---
{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "domainname",
"value": {
"stringValue": "STRING"
}
},
{
"key": "groupid",
"value": {
"stringValue": "STRING"
}
},
{
"key": "hostname",
"value": {
"stringValue": "STRING"
}
},
{
"key": "machineid",
"value": {
"stringValue": "STRING"
}
},
{
"key": "userid",
"value": {
"stringValue": "STRING"
}
}
]
},
"scopeMetrics": [
{
"metrics": [
{
"name": "hinv.ncpu",
"unit": "1",
"description": "number of CPUs in the system",
"gauge": {
"dataPoints": [
{
"asInt": INTEGER,
"timeUnixNano": TIME
"attributes": [
{
"key": "semantics",
"value": {
"stringValue": "STRING"
}
},
{
"key": "type",
"value": {
"stringValue": "STRING"
}
},
{
"key": "agent",
"value": {
"stringValue": "STRING"
}
}
]
}
]
}
}
],
"scope": {
"name": "performance-co-pilot",
"version": VERSION
}
}
]
}
]
}
{"resourceMetrics": [{"resource": {"attributes": [{"key": "domainname","value": {"stringValue": "VALUE"}},{"key": "groupid","value": {"stringValue": "VALUE"}},{"key": "hostname","value": {"stringValue": "VALUE"}},{"key": "machineid","value": {"stringValue": "VALUE"}},{"key": "userid","value": {"stringValue": "VALUE"}}]},"scopeMetrics": [{"metrics": [{"name": "hinv.ncpu","unit": "1","description": "number of CPUs in the system","gauge": {"dataPoints": [{"asInt": "INTEGER","timeUnixNano": "TIME","attributes": [{"key": "semantics","value": {"stringValue": "VALUE"}},{"key": "type","value": {"stringValue": "VALUE"}},{"key": "agent","value": {"stringValue": "VALUE"}}]}]}}],"scope": {"name": "performance-co-pilot","version": "VERSION"}}]}]}

---
{"resourceMetrics": [{"resource": {"attributes": [{"key": "domainname","value": {"stringValue": "VALUE"}},{"key": "groupid","value": {"stringValue": "VALUE"}},{"key": "hostname","value": {"stringValue": "VALUE"}},{"key": "machineid","value": {"stringValue": "VALUE"}},{"key": "userid","value": {"stringValue": "VALUE"}}]},"scopeMetrics": [{"metrics": [{"name": "hinv.ncpu","unit": "1","description": "number of CPUs in the system","gauge": {"dataPoints": [{"asInt": "INTEGER","timeUnixNano": "TIME","attributes": [{"key": "semantics","value": {"stringValue": "VALUE"}},{"key": "type","value": {"stringValue": "VALUE"}},{"key": "agent","value": {"stringValue": "VALUE"}}]}]}}],"scope": {"name": "performance-co-pilot","version": "VERSION"}}]}]}
{"resourceMetrics": [{"resource": {"attributes": [{"key": "domainname","value": {"stringValue": "VALUE"}},{"key": "groupid","value": {"stringValue": "VALUE"}},{"key": "hostname","value": {"stringValue": "VALUE"}},{"key": "machineid","value": {"stringValue": "VALUE"}},{"key": "userid","value": {"stringValue": "VALUE"}}]},"scopeMetrics": [{"metrics": [{"name": "hinv.ncpu","unit": "1","description": "number of CPUs in the system","gauge": {"dataPoints": [{"asInt": "INTEGER","timeUnixNano": "TIME","attributes": [{"key": "semantics","value": {"stringValue": "VALUE"}},{"key": "type","value": {"stringValue": "VALUE"}},{"key": "agent","value": {"stringValue": "VALUE"}}]}]}}],"scope": {"name": "performance-co-pilot","version": "VERSION"}}]}]}

---
{"resourceMetrics": [{"resource": {"attributes": [{"key": "hostname","value": {"stringValue": "VALUE"}}]},"scopeMetrics": [{"metrics": [{"name": "hinv.ncpu","unit": "1","description": "number of CPUs in the system","gauge": {"dataPoints": [{"asInt": "INTEGER","timeUnixNano": "TIME","attributes": [{"key": "semantics","value": {"stringValue": "VALUE"}},{"key": "type","value": {"stringValue": "VALUE"}}]}]}}],"scope": {"name": "performance-co-pilot","version": "VERSION"}}]}]}

---
{
Expand Down
13 changes: 6 additions & 7 deletions qa/1977
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ _filter_pcp2opentelemetry_http()
tee -a $here/$seq.full \
| col -b \
| sed \
-e '/\"asInt\":/ s/[0-9][0-9]*/INTEGER/' \
-e '/\"asDouble\":/ s/[0-9][0-9]*/DOUBLE/' \
-e 's/\"version\": .*/\"version\": VERSION/' \
-e 's/\"stringValue\": \".*\"/\"stringValue\": \"STRING\"/' \
-e 's/\"timeUnixNano\": [0-9][0-9]*\.[0-9][0-9]*.*/\"timeUnixNano\": TIME/' \
-e '/HTTP/d'
-e 's/\"stringValue\": \"[^\"]*\"/\"stringValue\": \"VALUE\"/g'\
-e 's/\"timeUnixNano\": \"[^\"]*\"/\"timeUnixNano\": \"TIME\"/g'\
-e 's/\"version\": \"[^\"]*\"/\"version\": \"VERSION\"/g'\
-e 's/\"asInt\": [0-9]*/\"asInt\": \"INTEGER\"/g'\
-e 's/\"asDouble\": [0-9]*/\"asDouble\": \"DOUBLE\"/g'\
-e '/HTTP/d'
} >> $tmp.python2.out


# real QA test starts here
_save_config $PCP_SYSCONF_DIR/labels
$sudo rm -rf $PCP_SYSCONF_DIR/labels/*
Expand Down
84 changes: 1 addition & 83 deletions qa/1977.out
Original file line number Diff line number Diff line change
Expand Up @@ -15,87 +15,5 @@ Content-Length: SIZE


Body:
{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "domainname",
"value": {
"stringValue": "STRING"
}
},
{
"key": "groupid",
"value": {
"stringValue": "STRING"
}
},
{
"key": "hostname",
"value": {
"stringValue": "STRING"
}
},
{
"key": "machineid",
"value": {
"stringValue": "STRING"
}
},
{
"key": "userid",
"value": {
"stringValue": "STRING"
}
}
]
},
"scopeMetrics": [
{
"metrics": [
{
"name": "hinv.ncpu",
"unit": "1",
"description": "number of CPUs in the system",
"gauge": {
"dataPoints": [
{
"asInt": INTEGER,
"timeUnixNano": TIME
"attributes": [
{
"key": "semantics",
"value": {
"stringValue": "STRING"
}
},
{
"key": "type",
"value": {
"stringValue": "STRING"
}
},
{
"key": "agent",
"value": {
"stringValue": "STRING"
}
}
]
}
]
}
}
],
"scope": {
"name": "performance-co-pilot",
"version": VERSION
}
}
]
}
]
}
{"resourceMetrics": [{"resource": {"attributes": [{"key": "domainname","value": {"stringValue": "VALUE"}},{"key": "groupid","value": {"stringValue": "VALUE"}},{"key": "hostname","value": {"stringValue": "VALUE"}},{"key": "machineid","value": {"stringValue": "VALUE"}},{"key": "userid","value": {"stringValue": "VALUE"}}]},"scopeMetrics": [{"metrics": [{"name": "hinv.ncpu","unit": "1","description": "number of CPUs in the system","gauge": {"dataPoints": [{"asInt": "INTEGER","timeUnixNano": "TIME","attributes": [{"key": "semantics","value": {"stringValue": "VALUE"}},{"key": "type","value": {"stringValue": "VALUE"}},{"key": "agent","value": {"stringValue": "VALUE"}}]}]}}],"scope": {"name": "performance-co-pilot","version": "VERSION"}}]}]}

Loading
Loading