fixed jq expresion

This commit is contained in:
Claudio Atzori 2018-07-13 17:12:25 +02:00
parent a56fc7b16b
commit d2d855ab06
1 changed files with 84 additions and 84 deletions

View File

@ -1636,6 +1636,7 @@
} }
end end
</str> </str>
<!-- Custom metrics --> <!-- Custom metrics -->
<str> <str>
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent | .metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
@ -1687,7 +1688,7 @@
(if $parent_key_item_len == 5 then $parent_key_items[4] else "" end) as $replica | (if $parent_key_item_len == 5 then $parent_key_items[4] else "" end) as $replica |
(if $parent_key_item_len == 5 then ($collection + "_" + $shard + "_" + $replica) else $core end) as $core | (if $parent_key_item_len == 5 then ($collection + "_" + $shard + "_" + $replica) else $core end) as $core |
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object | $parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
($object.value.1minRate) as $value | ($object.value."1minRate") as $value |
{ {
name: "solr_metrics_core_query_1minrate", name: "solr_metrics_core_query_1minrate",
type: "GAUGE", type: "GAUGE",
@ -1707,7 +1708,7 @@
(if $parent_key_item_len == 5 then $parent_key_items[4] else "" end) as $replica | (if $parent_key_item_len == 5 then $parent_key_items[4] else "" end) as $replica |
(if $parent_key_item_len == 5 then ($collection + "_" + $shard + "_" + $replica) else $core end) as $core | (if $parent_key_item_len == 5 then ($collection + "_" + $shard + "_" + $replica) else $core end) as $core |
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object | $parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
($object.value.5minRate) as $value | ($object.value."5minRate") as $value |
{ {
name: "solr_metrics_core_query_5minrate", name: "solr_metrics_core_query_5minrate",
type: "GAUGE", type: "GAUGE",
@ -1727,7 +1728,7 @@
(if $parent_key_item_len == 5 then $parent_key_items[4] else "" end) as $replica | (if $parent_key_item_len == 5 then $parent_key_items[4] else "" end) as $replica |
(if $parent_key_item_len == 5 then ($collection + "_" + $shard + "_" + $replica) else $core end) as $core | (if $parent_key_item_len == 5 then ($collection + "_" + $shard + "_" + $replica) else $core end) as $core |
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object | $parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
($object.value.15minRate) as $value | ($object.value."15minRate") as $value |
{ {
name: "solr_metrics_core_query_15minrate", name: "solr_metrics_core_query_15minrate",
type: "GAUGE", type: "GAUGE",
@ -1918,7 +1919,6 @@
} }
</str> </str>
<!-- end of custom metrics --> <!-- end of custom metrics -->
</arr> </arr>
</lst> </lst>
</metrics> </metrics>