Skip to content

Cluster Count is off by one in the dashboards #281

@ColinSullivan1

Description

@ColinSullivan1

What version were you using?

Surveyor 0.9.3.
Server version 2.12.0-dev

What environment was the server running in?

Servers on MacOSx, surveyor, prometheus, and grafana in docker.

Is this defect reproducible?

Yes. Launch a supercluster and observe the cluster counts in the cluster and supercluster dashboards.

Given the capability you are leveraging, describe your expectation?

That the count is accurate.

Given the expectation, what is the defect you are observing?

I have a supercluster of 3 clusters, however in the Cluster and SuperCluster dashboards, the cluster count is reporting 2, which is not accurate.

Results from nats server report health

$ ./nats_sys server report health
╭───────────────────────────────────────────────────────────╮
│                       Health Report                       │
├────────┬─────────┬────────┬────────────────┬──────┬───────┤
│ Server │ Cluster │ Domain │ Status         │ Type │ Error │
├────────┼─────────┼────────┼────────────────┼──────┼───────┤
│ r1_a   │ region1 │        │ ok (200)       │      │       │
│ r1_b   │ region1 │        │ ok (200)       │      │       │
│ r1_c   │ region1 │        │ ok (200)       │      │       │
│ r2_a   │ region2 │        │ ok (200)       │      │       │
│ r2_b   │ region2 │        │ ok (200)       │      │       │
│ r2_c   │ region2 │        │ ok (200)       │      │       │
│ r3_a   │ region3 │        │ ok (200)       │      │       │
│ r3_b   │ region3 │        │ ok (200)       │      │       │
│ r3_c   │ region3 │        │ ok (200)       │      │       │
├────────┼─────────┼────────┼────────────────┼──────┼───────┤
│ 9      │ 3       │        │ ok: 9 / err: 0 │      │     0 │
╰────────┴─────────┴────────┴────────────────┴──────┴───────╯

Three clusters are reported in the NATS cli summary.

On the same cluster, using the dashboard a count of 2 is reported in the supercluster dashboard, when all are reported in the metric details:

Image

The same goes for the cluster dashboard:

Image

Note: With a single cluster (no gateways), the dashboards display 0.

I'm thinking the metrics pertaining to cluster count should be max(nats_core_gateway_count)+1 wdyt?

Happy to submit a PR, let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions