Skip to content

Commit

Permalink
Update metrics documentation in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
gustawlippa committed Aug 12, 2024
1 parent b9c5bcb commit 30190ee
Show file tree
Hide file tree
Showing 17 changed files with 689 additions and 206 deletions.
20 changes: 16 additions & 4 deletions doc/modules/mod_csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@ Buffer size for messages queued when session was `inactive`.

If you'd like to learn more about metrics in MongooseIM, please visit [MongooseIM metrics](../operation-and-maintenance/MongooseIM-metrics.md) page.

| Name | Type | Description (when it gets incremented) |
|--------------------|--------|----------------------------------------|
| `mod_csi_active` | spiral | A client becomes active. |
| `mod_csi_inactive` | spiral | A client becomes inactive. |
Prometheus metrics have a `host_type` label associated with these metrics.
Since Exometer doesn't support labels, the host types, or word `global`, are part of the metric names, depending on the [`instrumentation.exometer.all_metrics_are_global`](../configuration/instrumentation.md#instrumentationexometerall_metrics_are_global) option.

=== "Prometheus"

| Name | Type | Description (when it gets incremented) |
|------|------|----------------------------------------|
| `mod_csi_active_count` | counter | A client becomes active. |
| `mod_csi_inactive_count` | counter | A client becomes inactive. |

=== "Exometer"

| Name | Type | Description (when it gets incremented) |
|------|------|----------------------------------------|
| `[HostType, mod_csi_active, count]` | spiral | A client becomes active. |
| `[HostType, mod_csi_inactive, count]` | spiral | A client becomes inactive. |
23 changes: 18 additions & 5 deletions doc/modules/mod_event_pusher_http.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,23 @@ Below is an example of what the body of an HTTP POST request can look like:

If you'd like to learn more about metrics in MongooseIM, please visit [MongooseIM metrics](../operation-and-maintenance/MongooseIM-metrics.md) page.

| Name | Type | Description (when it gets incremented) |
| ---- | ---- | -------------------------------------- |
| `[Host, mod_event_pusher_http, sent]` | spiral | An HTTP notification is sent successfully. |
| `[Host, mod_event_pusher_http, failed]` | spiral | An HTTP notification failed. |
| `[Host, mod_event_pusher_http, response_time]` | histogram | Does not include timings of failed requests. |
Prometheus metrics have a `host_type` label associated with these metrics.
Since Exometer doesn't support labels, the host types, or word `global`, are part of the metric names, depending on the [`instrumentation.exometer.all_metrics_are_global`](../configuration/instrumentation.md#instrumentationexometerall_metrics_are_global) option.

=== "Prometheus"

| Name | Type | Description (when it gets incremented) |
| ---- | ---- | -------------------------------------- |
| `mod_event_pusher_http_sent_count` | counter | An HTTP notification is sent successfully. |
| `mod_event_pusher_http_sent_failure_count` | counter | An HTTP notification failed. |
| `mod_event_pusher_http_sent_response_time` | histogram | Does not include timings of failed requests. |

=== "Exometer"

| Name | Type | Description (when it gets incremented) |
| ---- | ---- | -------------------------------------- |
| `[Host, mod_event_pusher_http_sent, count]` | spiral | An HTTP notification is sent successfully. |
| `[Host, mod_event_pusher_http_sent, failure_count]` | spiral | An HTTP notification failed. |
| `[Host, mod_event_pusher_http_sent, response_time]` | histogram | Does not include timings of failed requests. |

[mod_event_pusher]: ./mod_event_pusher.md
45 changes: 32 additions & 13 deletions doc/modules/mod_event_pusher_rabbit.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,38 @@ and for "received" events:
## Metrics

The module provides some metrics related to RabbitMQ connections and messages
as well. Provided metrics:

| name | type | description (when it gets incremented/decremented) |
|------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [`HostType`, `wpool_rabbit_connections_active`] | counter | A connection to a RabbitMQ server is opened(+1)/closed(-1). |
| [`HostType`, `wpool_rabbit_connections_opened`] | spiral | A connection to a RabbitMQ server is opened. |
| [`HostType`, `wpool_rabbit_connections_closed`] | spiral | A connection to a RabbitMQ server is closed. |
| [`HostType`, `wpool_rabbit_connections_failed` ] | spiral | A try to open a connection to a RabbitMQ server failed. |
| [`HostType`, `wpool_rabbit_messages_published_count`] | spiral | A message to a RabbitMQ server is published. |
| [`HostType`, `wpool_rabbit_messages_published_failed`] | spiral | A message to a RabbitMQ server is rejected. |
| [`HostType`, `wpool_rabbit_messages_published_timeout`] | spiral | A message to a RabbitMQ server timed out (weren't confirmed by the server). |
| [`HostType`, `wpool_rabbit_messages_published_time`] | histogram | Amount of time it takes to publish a message to a RabbitMQ server and receive a confirmation. It's measured only for successful messages. |
| [`HostType`, `wpool_rabbit_messages_published_size`] | histogram | Size of a message (in bytes) that was published to a RabbitMQ server (including message properties). It's measured only for successful messages. |
as well.

Prometheus metrics have `host_type` and `pool_tag` labels associated with these metrics.
Since Exometer doesn't support labels, the pool tag, as well as the host types, or word `global`, are part of the metric names, depending on the [`instrumentation.exometer.all_metrics_are_global`](../configuration/instrumentation.md#instrumentationexometerall_metrics_are_global) option.

=== "Prometheus"

| Name | Type | Description (when it gets incremented/decremented) |
|------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `wpool_rabbit_connections_active` | gauge | A connection to a RabbitMQ server is opened(+1)/closed(-1). |
| `wpool_rabbit_connections_opened` | counter | A connection to a RabbitMQ server is opened. |
| `wpool_rabbit_connections_closed` | counter | A connection to a RabbitMQ server is closed. |
| `wpool_rabbit_connections_failed` | counter | A try to open a connection to a RabbitMQ server failed. |
| `wpool_rabbit_messages_published_count` | counter | A message to a RabbitMQ server is published. |
| `wpool_rabbit_messages_published_failed` | counter | A message to a RabbitMQ server is rejected. |
| `wpool_rabbit_messages_published_timeout` | counter | A message to a RabbitMQ server timed out (weren't confirmed by the server). |
| `wpool_rabbit_messages_published_time` | histogram | Amount of time it takes to publish a message to a RabbitMQ server and receive a confirmation. It's measured only for successful messages. |
| `wpool_rabbit_messages_published_size` | histogram | Size of a message (in bytes) that was published to a RabbitMQ server (including message properties). It's measured only for successful messages. |

=== "Exometer"

| Name | Type | Description (when it gets incremented/decremented) |
|------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `[HostType, PoolTag, wpool_rabbit_connections_active]` | counter | A connection to a RabbitMQ server is opened(+1)/closed(-1). |
| `[HostType, PoolTag, wpool_rabbit_connections_opened]` | spiral | A connection to a RabbitMQ server is opened. |
| `[HostType, PoolTag, wpool_rabbit_connections_closed]` | spiral | A connection to a RabbitMQ server is closed. |
| `[HostType, PoolTag, wpool_rabbit_connections_failed]` | spiral | A try to open a connection to a RabbitMQ server failed. |
| `[HostType, PoolTag, wpool_rabbit_messages_published_count]` | spiral | A message to a RabbitMQ server is published. |
| `[HostType, PoolTag, wpool_rabbit_messages_published_failed]` | spiral | A message to a RabbitMQ server is rejected. |
| `[HostType, PoolTag, wpool_rabbit_messages_published_timeout]` | spiral | A message to a RabbitMQ server timed out (weren't confirmed by the server). |
| `[HostType, PoolTag, wpool_rabbit_messages_published_time]` | histogram | Amount of time it takes to publish a message to a RabbitMQ server and receive a confirmation. It's measured only for successful messages. |
| `[HostType, PoolTag, wpool_rabbit_messages_published_size]` | histogram | Size of a message (in bytes) that was published to a RabbitMQ server (including message properties). It's measured only for successful messages. |


## Guarantees
Expand Down
Loading

0 comments on commit 30190ee

Please sign in to comment.