Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Latest commit

 

History

History
91 lines (64 loc) · 5.93 KB

metrics.md

File metadata and controls

91 lines (64 loc) · 5.93 KB

Collecting and Viewing Event Gateway Metrics

This guide details how to collect and analyze metrics from the Event Gateway.

Introduction

The Event Gateway exposes a number of Prometheus-based metrics + counters via the configuration API to help monitor the health of the gateway.

Contents

  1. Collecting Metrics
  2. Visualizing Data
    1. Prometheus
    2. InfluxDB
  3. List of Metrics
    1. Events API
    2. Configuration API

Collecting Metrics

Event Gateway metrics are exposed via a Prometheus text-based metric exporter and as such are queryable by a variety of modern toolsets. While you can scrape data directly from your prometheus database, the following (non-exhaustive) list of sources can also be configured to scrape Event Gateway metrics:

Visualizing Data

Included in the contrib folder are identical dashboards to visualize Event Gateway metrics with different data sources. Depending on your setup you'll find a Prometheus and InfluxDB version of the dashboard.

Importing a Grafana dashboard is relatively straightforward provided your datasources are configured properly within your Grafana instance. Each of our dashboards lists respective datasources as a template variable, assuming the default datasource is set to the type for your datasource; in other words, if you import the Prometheus dashboard the template will expect your default data source to be set to Prometheus.

If your default datasource is not either of the Prometheus or InfluxDB sources, fear not! The template variable is set as the datasource for each panel within the dashboard, so updating the datasource is as easy as choosing another option from the template dropdown.

NOTE: There are two dashboards included for each datasource: an aggregated dashboard for all spaces in a given Event Gateway deployment, and a second dashboard that can drill down to individual spaces.

Prometheus

You can find the source for the Prometheus dashboard here.

InfluxDB

You can find the source for the InfluxDB dashboard here.

List of Metrics

Both Events and Configuration API exposes Prometheus metrics. The metrics are accesible via /v1/metrics endpoint of Configuration API. The table below outlines the specific metrics available to query from the endpoint:

Events API

Metric Type Labels Description
eventgateway_events_received_total counter space, type total of events received
eventgateway_events_processed_total counter space, type total of processed events
eventgateway_events_dropped_total counter space, type total of events dropped due to insufficient processing power
eventgateway_events_backlog gauge gauge of asynchronous events count waiting to be processed
eventgateway_events_custom_processing_seconds histogram bucketed histogram of processing duration of an event
(from receiving the async custom event to calling a function)

Labels

  • space - space name
  • type - event type name

Configuration API

Metric Type Labels Description
eventgateway_eventtypes_total gauge space gauge of registered event types count
eventgateway_functions_total gauge space gauge of registered functions count
eventgateway_subscriptions_total gauge space gauge of created subscriptions count
eventgateway_config_requests_total counter space, resource, operation total of Config API requests
eventgateway_config_request_duration_seconds histogram bucketed histogram of request duration of Config API requests

Labels

  • space - space name
  • resource - Configuration API resource, possible values: eventtype, function or subscription
  • operation - Configuration API operation, possible values: create, get, delete, list, update