forked from ISTI-ansible-roles/ansible-roles
pick only metrics from QUERY./select.requestTimes
This commit is contained in:
parent
dcfa1d08c6
commit
584cbc0cd3
|
@ -1636,6 +1636,7 @@
|
|||
}
|
||||
end
|
||||
</str>
|
||||
<!-- Custom metrics -->
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
|
@ -1645,14 +1646,48 @@
|
|||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith(".requestTimes")) | select (.value | type == "object") as $object |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
$object.value.meanRate as $value |
|
||||
($object.count) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_requests_meanrate_seconds",
|
||||
name: "solr_metrics_core_query_count",
|
||||
type: "COUNTER",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_count",
|
||||
type: "COUNTER",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.meanRate) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_meanrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
|
@ -1661,7 +1696,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_requests_meanrate",
|
||||
name: "solr_metrics_core_query_meanrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
|
@ -1679,14 +1714,14 @@
|
|||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith(".requestTimes")) | select (.value | type == "object") as $object |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
$object.value."1minRate" as $value |
|
||||
($object.1minRate) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_requests_1minrate_seconds",
|
||||
name: "solr_metrics_core_query_1minrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
|
@ -1695,7 +1730,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_requests_1minrate_seconds",
|
||||
name: "solr_metrics_core_query_1minrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
|
@ -1713,14 +1748,14 @@
|
|||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith(".requestTimes")) | select (.value | type == "object") as $object |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
$object.value."5minRate" as $value |
|
||||
($object.5minRate) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_requests_5minrate_seconds",
|
||||
name: "solr_metrics_core_query_5minrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
|
@ -1729,7 +1764,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_requests_5minrate_seconds",
|
||||
name: "solr_metrics_core_query_5minrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
|
@ -1747,28 +1782,28 @@
|
|||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith(".requestTimes")) | select (.value | type == "object") as $object |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
$object.value."15minRate" as $value |
|
||||
($object.15minRate) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_requests_15minrate_seconds",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
name: "solr_metrics_core_query_15minrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_requests_15minrate_seconds",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
name: "solr_metrics_core_query_15minrate",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
|
@ -1781,31 +1816,339 @@
|
|||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith(".requestTimes")) | select (.value | type == "object") as $object |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
$object.value.mean_ms / 1000 as $value |
|
||||
($object.min_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_requests_mean_time_seconds",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
name: "solr_metrics_core_query_min_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_requests_mean_time_seconds",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
name: "solr_metrics_core_query_min_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.max_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_max_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_max_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.max_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_max_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_max_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.mean_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_mean_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_mean_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.median_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_median_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_median_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.stddev_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_stddev_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_stddev_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.p75_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_p75_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_p75_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.p95_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_p95_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_p95_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.p99_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_p99_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_p99_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<str>
|
||||
.metrics | to_entries | .[] | select(.key | startswith("solr.core.")) as $parent |
|
||||
$parent.key | split(".") as $parent_key_items |
|
||||
$parent_key_items | length as $parent_key_item_len |
|
||||
(if $parent_key_item_len == 3 then $parent_key_items[2] else "" end) as $core |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[2] else "" end) as $collection |
|
||||
(if $parent_key_item_len == 5 then $parent_key_items[3] else "" end) as $shard |
|
||||
(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 |
|
||||
$parent.value | to_entries | .[] | select(.key | endswith("select.requestTimes")) as $object |
|
||||
$object.key | split(".")[0] as $category |
|
||||
$object.key | split(".")[1] as $handler |
|
||||
select($handler | startswith("/")) |
|
||||
($object.p999_ms) as $value |
|
||||
if $parent_key_item_len == 3 then
|
||||
{
|
||||
name: "solr_metrics_core_query_p999_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core"],
|
||||
label_values: [$category, $handler, $core],
|
||||
value: $value
|
||||
}
|
||||
else
|
||||
{
|
||||
name: "solr_metrics_core_query_p999_ms",
|
||||
type: "GAUGE",
|
||||
help: "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
|
||||
label_names: ["category", "handler", "core", "collection", "shard", "replica"],
|
||||
label_values: [$category, $handler, $core, $collection, $shard, $replica],
|
||||
value: $value
|
||||
}
|
||||
end
|
||||
</str>
|
||||
<!-- end of custom metrics -->
|
||||
|
||||
</arr>
|
||||
</lst>
|
||||
</metrics>
|
||||
|
|
Loading…
Reference in New Issue