Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Pothulapati/c6891b5351693318efeff4adf6f04d85 to your computer and use it in GitHub Desktop.
Save Pothulapati/c6891b5351693318efeff4adf6f04d85 to your computer and use it in GitHub Desktop.
mesh: Linkerd
config:
prometheus-url: http://linkerd-prometheus.linkerd.svc.cluster.local:9090
resourceQueries:
p99_response_latency : |-
histogram_quantile(
0.99,
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{default ".+" .namespace }}",
{{lower .kind}}=~"{{default ".+" .name }}"
}[{{.window}}]
)
) by (
{{lower .kind}},
namespace,
le
)
)
p90_response_latency : |-
histogram_quantile(
0.90,
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{default ".+" .namespace }}",
{{lower .kind}}=~"{{default ".+" .name }}"
}[{{.window}}]
)
) by (
{{lower .kind}},
namespace,
le
)
)
p50_response_latency : |-
histogram_quantile(
0.50,
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{default ".+" .namespace }}",
{{lower .kind}}=~"{{default ".+" .name }}"
}[{{.window}}]
)
) by (
{{lower .kind}},
namespace,
le
)
)
success_count : |-
sum(
increase(
response_total{
classification="success",
namespace=~"{{default ".+" .namespace }}",
{{lower .kind}}=~"{{default ".+" .name }}"
}[{{.window}}]
)
) by (
{{lower .kind}},
namespace
)
failure_count : |-
sum(
increase(
response_total{
classification="failure",
namespace=~"{{default ".+" .namespace }}",
{{lower .kind}}=~"{{default ".+" .name }}"
}[{{.window}}]
)
) by (
{{lower .kind}},
namespace
)
edgeQueries:
p99_response_latency : |-
histogram_quantile(
0.99,
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{.namespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
)
) by (
{{lower .kind}},
dst_{{lower .kind}},
namespace,
dst_namespace,
le
)
)
p90_response_latency : |-
histogram_quantile(
0.90,
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{.namespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
)
) by (
{{lower .kind}},
dst_{{lower .kind}},
namespace,
dst_namespace,
le
)
)
p50_response_latency : |-
histogram_quantile(
0.50,
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{.namespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
)
) by (
{{lower .kind}},
dst_{{lower .kind}},
namespace,
dst_namespace,
le
)
)
success_count : |-
sum(
increase(
response_total{
classification="success",
namespace=~"{{.namespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
)
) by (
{{lower .kind}},
dst_{{lower .kind}},
namespace,
dst_namespace
)
failure_count : |-
sum(
increase(
response_total{
classification="failure",
namespace=~"{{.namespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
)
) by (
{{lower .kind}},
dst_{{lower .kind}},
namespace,
dst_namespace
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment