I created the following LLD:
- Name: Prometheus LLD
- Type: Dependent Item
- Key: lld_prom
- Master: Selected the HTTP Item which I created
Preprocessing:
- Prometheus to JSON: kube_deployment_status_replicas_available{namespac e="default",deployment=~".*"}
LLD Macros:
{#METRIC} -> $['name']
{#POD} -> $.labels['deployment']
Within this LLD I created an Item Prototype:
- Name: Metric: {#METRIC} - Pod: {#POD}
- Key: replicas_avail[{#POD}]
Preprocessing:
- Prometheus pattern: {#METRIC}{namespace="default",deployment="{#POD}"}
This works great and items are being created.
Now my question / problem:
As you can see, I am using the metric "kube_deployment_status_replicas_available", which returns the available replica's of a deployment.
The same Prometheus has another metric too, which is "kube_deployment_spec_replicas". This metric returns the amount of replica's that should be available.
I want have an Item Prototype too for this metric, so at the end I can create a Trigger Prototype, so I can do something: replicas_available>spec_replicas.
Is this possible, and how?
Thanks!
- Name: Prometheus LLD
- Type: Dependent Item
- Key: lld_prom
- Master: Selected the HTTP Item which I created
Preprocessing:
- Prometheus to JSON: kube_deployment_status_replicas_available{namespac e="default",deployment=~".*"}
LLD Macros:
{#METRIC} -> $['name']
{#POD} -> $.labels['deployment']
Within this LLD I created an Item Prototype:
- Name: Metric: {#METRIC} - Pod: {#POD}
- Key: replicas_avail[{#POD}]
Preprocessing:
- Prometheus pattern: {#METRIC}{namespace="default",deployment="{#POD}"}
This works great and items are being created.
Now my question / problem:
As you can see, I am using the metric "kube_deployment_status_replicas_available", which returns the available replica's of a deployment.
The same Prometheus has another metric too, which is "kube_deployment_spec_replicas". This metric returns the amount of replica's that should be available.
I want have an Item Prototype too for this metric, so at the end I can create a Trigger Prototype, so I can do something: replicas_available>spec_replicas.
Is this possible, and how?
Thanks!
Comment