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

Provide configurable Prometheus metrics exporters, counting defined search queries #1806

Closed
thjaeckle opened this issue Nov 13, 2023 · 0 comments · Fixed by #1807
Closed
Assignees
Milestone

Comments

@thjaeckle
Copy link
Member

thjaeckle commented Nov 13, 2023

Idea:
It is often useful to provide certain statistics about the amount of "Things" managed within Ditto, for example:

  • displaying the total amount of currently Things being in a "ERROR" state
  • displaying the total amount of provisioned Things
  • displaying the total of Things which were not yet "connected"
  • ...

In order to provide this kind of information e.g. to display on a Grafana dashboard, an idea would be to provide those as DittoMetrics.
This would provide metrics complementing Ditto's exported metrics for operating Ditto - on the same Prometheus endpoint to be scraped by Prometheus - directly from the "things-search" service in Ditto.

The idea is that a Ditto operator/admin can then configure "searches" in e.g. the search configuration search.conf, e.g. providing a label.
Rough idea:

operator-metrics {

  scrape-interval = 15m

  produced_cars = {
    namespaces = [
      "io.acme.corp.cars"
    ]
    rql = "exists(attributes/manufactured)"
  }
  errors_in_lamps = {
    scrape-interval = 1m
    namespaces = [
      "io.acme.corp.bulbs",
      "io.acme.corp.leds"
    ]
    rql = "and(eq(attributes/type,'LIGHT_BULB'),in(features/health/properties/state,'CRITICAL','ERROR'))"
  }
}
thjaeckle added a commit that referenced this issue Nov 15, 2023
… custom metrics

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
@thjaeckle thjaeckle self-assigned this Nov 15, 2023
@thjaeckle thjaeckle added this to the 3.5.0 milestone Nov 15, 2023
thjaeckle added a commit that referenced this issue Nov 15, 2023
* add new as singleton started Actor OperatorMetricsProviderActor responsible for gathering the metrics and reporting via DittoMetrics gauges
* provide configuration options for scrape-interval, namespaces to count and and RQL filter to apply, including optional tags to add to gauges
* provide example in configuration

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 16, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 16, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 16, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 16, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 20, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 30, 2023
thjaeckle added a commit that referenced this issue Nov 30, 2023
… custom metrics

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 30, 2023
* add new as singleton started Actor OperatorMetricsProviderActor responsible for gathering the metrics and reporting via DittoMetrics gauges
* provide configuration options for scrape-interval, namespaces to count and and RQL filter to apply, including optional tags to add to gauges
* provide example in configuration

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 30, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 30, 2023
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
thjaeckle added a commit that referenced this issue Nov 30, 2023
thjaeckle added a commit that referenced this issue Nov 30, 2023
…xporters-for-search-counts

#1806 Provide configurable search count metrics to be exposed via Prometheus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant