Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8gbEndpointStatus #620

Merged
merged 1 commit into from
Sep 15, 2021
Merged

K8gbEndpointStatus #620

merged 1 commit into from
Sep 15, 2021

Conversation

kuritka
Copy link
Collaborator

@kuritka kuritka commented Sep 15, 2021

related to #587
k8gb_endpoint_status, the metric provides information about the number of targets in DNSEndpoint.

k8gb_endpoint_status{dns_name="failover.cloud.example.com", exported_name="test-gslb-failover", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 2
k8gb_endpoint_status{dns_name="localtargets-failover.cloud.example.com", exported_name="test-gslb-failover", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 2
k8gb_endpoint_status{dns_name="localtargets-roundrobin.cloud.example.com", exported_name="test-gslb", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 2
k8gb_endpoint_status{dns_name="roundrobin.cloud.example.com", exported_name="test-gslb", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 4

In addition:

  • I moved the linter test from gslb_controller_test to prometheus_test.
  • according to Make K8gbGslbStatusPerIngressHosts metric readable #587 the request was to rename one of the metrics to k8gb_gslb_service_status_count,. Unfortunately, this metric is GaugeVec and the linter does not allow to use the _count or _total suffix (they are reserved for counters). Therefore I renamed the metric to k8gb_gslb_service_status,

Signed-off-by: kuritka [email protected]

Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

ytsarev
ytsarev previously approved these changes Sep 15, 2021
k0da
k0da previously approved these changes Sep 15, 2021
@somaritane
Copy link
Contributor

  • according to Make K8gbGslbStatusPerIngressHosts metric readable #587 the request was to rename one of the metrics to k8gb_gslb_service_status_count,. Unfortunately, this metric is GaugeVec and the linter does not allow to use the _count or _total suffix (they are reserved for counters). Therefore I renamed the metric to k8gb_gslb_service_status,
    @kuritka what about using _num postfix?

@kuritka kuritka dismissed stale reviews from k0da and ytsarev via 411f9f6 September 15, 2021 14:22
@kuritka
Copy link
Collaborator Author

kuritka commented Sep 15, 2021

@somaritane , thx, k8gb_gslb_service_status_num amended.

@kuritka kuritka requested review from ytsarev and k0da September 15, 2021 14:32
@somaritane
Copy link
Contributor

@somaritane , thx, k8gb_gslb_service_status_num amended.

@kuritka sorry for missing this earlier, I guess k8gb_endpoint_status should be also amended to be k8gb_endpoint_status_num following the same analogy.

related to #587
`k8gb_endpoint_status_num`, the metric provides information about the number of targets in DNSEndpoint.

```shell
k8gb_endpoint_status{dns_name="failover.cloud.example.com", exported_name="test-gslb-failover", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 2
k8gb_endpoint_status{dns_name="localtargets-failover.cloud.example.com", exported_name="test-gslb-failover", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 2
k8gb_endpoint_status{dns_name="localtargets-roundrobin.cloud.example.com", exported_name="test-gslb", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 2
k8gb_endpoint_status{dns_name="roundrobin.cloud.example.com", exported_name="test-gslb", instance="10.42.0.6:8080", job="kubernetes-pods", kubernetes_namespace="k8gb", kubernetes_pod_name="k8gb-7f5564d48b-xtt4w", name="k8gb", namespace="test-gslb", pod_template_hash="7f5564d48b"} | 4
```

---
In addition:
 - I moved the linter test from `gslb_controller_test` to `prometheus_test`.
 - according to #587 the request was to rename one of the metrics to `k8gb_gslb_service_status_count,`. Unfortunately, this metric is GaugeVec and the linter does not allow to use the `_count` or `_total` suffix (they are reserved for counters). Therefore I renamed the metric to `k8gb_gslb_service_status_num,`

Signed-off-by: kuritka <[email protected]>
@kuritka
Copy link
Collaborator Author

kuritka commented Sep 15, 2021

@somaritane amended, thx

Copy link
Contributor

@somaritane somaritane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuritka lgtm!

@kuritka kuritka merged commit 74bf71b into master Sep 15, 2021
@kuritka kuritka deleted the metrics-extensions branch September 15, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants