This guide details how to collect and analyze metrics from the Event Gateway.
The Event Gateway exposes a number of Prometheus-based metrics + counters via the configuration API to help monitor the health of the gateway.
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:
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.
You can find the source for the Prometheus dashboard here.
You can find the source for the InfluxDB dashboard here.
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:
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 nametype
- event type name
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 nameresource
- Configuration API resource, possible values:eventtype
,function
orsubscription
operation
- Configuration API operation, possible values:create
,get
,delete
,list
,update