# Liberator Prometheus metrics

This page lists the Prometheus metrics published by Liberator.

Prometheus metrics are not published by default. To enable this feature, see [Publishing DataSource metrics in Prometheus format](../datasource/datasource-configure-prometheus-monitoring.md#datasource).

This feature requires Liberator 8.0.0 or higher. All the metrics below are available from version 8.0.0 except where indicated.

## Process metrics

Liberator publishes the following metrics on the operating-system process that runs Liberator.

These metrics are only available on RHEL builds of Liberator.

* **process_cpu_seconds_total**

  Total user and system CPU time spent in seconds.

  **Type:** Gauge
* **process_max_fds**

  The maximum number of file descriptors the process may have open (set by `ulimit` on  Linux).

  **Type:** Gauge
* **process_open_fds**

  Number of file descriptors the process has open.

  **Type:** Gauge
* **process_resident_memory_bytes**

  Resident memory size in bytes.

  ***Type:*** Gauge
* **process_start_time_seconds**

  Start time of the process (number of seconds since the start of the Unix epoch).

  **Type:** Gauge
* **process_virtual_memory_bytes**

  Virtual memory size in bytes.

  **Type:** Gauge
* **process_virtual_memory_max_bytes**

  Maximum amount of virtual memory available in bytes.

  **Type:** Gauge
* **rttpd_process_fds**

  Number of file descriptors the process has open.

  **Type:** Gauge

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | type | File descriptor type. Possible values: `non_socket_fds`, `socket_fds` |
* **rttpd_process_uptime_seconds_total**

  Process uptime in seconds.

  **Type:** Counter
* **rttpd_process_cputime_seconds_total**

  Process total CPU time in seconds.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | type | CPU time type. Possible values: `user`, `system` |
* **rttpd_process_delayed_threads**

  Count of delayed threads that have been delayed for 5 seconds or more. Delayed threads are an indication that the DataSource is under high load or that threads have locked up.

  **Type:** Gauge
* **rttpd_process_cpu_usage_percentage**

  Average CPU percentage used by the DataSource process in the period configured by the configuration option [`process-usage-period`](../datasource/datasource-datasource-monitoring-configuration-part-1.md#process-usage-period) (default 10 seconds).

  **Type:** Gauge
* **rttpd_process_total_cpu_usage_percentage**

  Total CPU percentage used by the DataSource process in the period configured by the configuration option [`process-usage-period`](../datasource/datasource-datasource-monitoring-configuration-part-1.md#process-usage-period) (default 10 seconds).

  **📌 NOTE**\
  This percentage can be greater than 100% if the DataSource is running with a system that has more than one core.

  **Type:** Gauge

  **Since:** DSDK 8.0.12
* **rttpd_process_num_cpus_total**

  The number of cores on the server.

  **Type:** Counter

  **Since:** DSDK 8.0.12
* **rttpd_process_thread_cpu_usage_percentage**

  Average CPU percentage used by the Caplin DataSource thread in the previous 500 milliseconds.

  **📌 NOTE**\
  This metric is only provided for Caplin DataSource threads. It is not provided for threads started by third-party libraries - for instance any threads started by a JVM if the DataSource loads one.

  **Type:** Gauge

  **Since:** DSDK 8.0.5

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | thread_name | the name of the DataSource thread |

## DataSource peer metrics

Liberator publishes the following metrics on connected DataSource peers.

* **rttpd_peer_bytes_read_total**

  Total number of bytes read across all peer connections.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |
* **rttpd_peer_bytes_written_total**

  Total number of bytes written across all peer connections.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |
* **rttpd_peer_messages_read_total**

  Total number of messages read across all peer connections.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |
  | icon:tag[] | message_type | the type of DataSource message. Possible values: `status`, `update` |
* **rttpd_peer_messages_written_total**

  Total number of messages written across all peer connections.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |
  | icon:tag[] | message_type | the type of DataSource message. Possible values: `request`, `discard` |
* **rttpd_peer_pingpong_time_milliseconds**

  Average of the last ten heartbeat round-trip times.

  **Type:** Gauge

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |
* **rttpd_peer_status**

  Status of the peer connection.

  **Type:** Gauge

  **Since:** DSDK 8.0.8

  **Values:**

  |     |     |     |
  | --- | --- | --- |
  | 0 | Peer connection is down |  |
  | 1 | Peer connection is up |  |

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |
* **rttpd_peer_active_subscriptions**

  Number of active subscriptions for the peer.

  **Type:** Gauge

  **Since:** DSDK 8.0.8

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | remote_label | the label of the DataSource peer |

## Data service metrics

Liberator publishes the following metrics for each [data service](../datasource/datasource-data-services.md).

* **rttpd_data_service_messages_read_total**

  The total number of messages read from a data service.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | service_name | the data-service [name](../datasource/datasource-data-services-configuration.md#service-name) |
  | icon:tag[] | message_type | the type of message received. Possible values: `update`, `map`, `nodata` |
* **rttpd_data_service_bytes_read_total**

  The total number of bytes read from a data service.

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | service_name | the data-service [name](../datasource/datasource-data-services-configuration.md#service-name) |
* **rttpd_data_service_bytes_written_total**

  The total number of bytes written to a data service (contributions).

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | service_name | the data-service [name](../datasource/datasource-data-services-configuration.md#service-name) |
* **rttpd_data_service_state**

  The state of a labelled data service. It has two possible values: `1` for up, `0` for down.

  **Type:** Gauge

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | service_name | the data-service [name](../datasource/datasource-data-services-configuration.md#service-name) |
* **rttpd_data_service_subscriptions**

  The number of open subscriptions associated with a data service.

  **Type:** Gauge

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | service_name | the data-service [name](../datasource/datasource-data-services-configuration.md#service-name) |
* **rttpd_data_service_response_time_milliseconds**

  The time taken for data services to respond to the first subscription request.

  **Type:** Histogram

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | le | the upper-bound of a histogram bucket. |
* **rttpd_data_service_elapsed_time_milliseconds**

  Messages processed since Liberator was started. Grouped by processing time in milliseconds.

  **Type:** Histogram

  **Since:** Liberator 8.0.4

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | message_type | The type of message processed - update, nodata, status |
  | icon:tag[] | subject_type | A numerical representation of the subject type, 222 Record, 228 Container, etc. |
  | icon:tag[] | service_name | The data-service [name](../datasource/datasource-data-services-configuration.md#service-name) that provided the message |
  | icon:tag[] | le | the upper-bound of a histogram bucket. |

## User metrics

Liberator publishes the following metrics for users

* **rttpd_user_login_fail_total**

  The total number of failed logins.

  **Type:** Counter
* **rttpd_user_read_fail_total**

  The total number of failed reads.

  **Type:** Counter
* **rttpd_user_write_fail_total**

  The total number of failed writes.

  **Type:** Counter
* **rttpd_user_users**

  The total number of live RTTP sessions. Equal to or greater than **rttpd_user_unique_users**, depending on the number of live RTTP sessions per user account.

  **Type:** Gauge
* **rttpd_user_unique_users**

  The total number of user accounts with one or more live RTTP sessions. Equal to or less than **rttpd_user_users**, depending on the number of live RTTP sessions per user account.

  **Type:** Gauge

## User session metrics

The following user metrics are available since Liberator 8.0.3.

**📌 NOTE**\
The bytes read and written metrics and the updates metric will only appear if  [`session-monitoring-interval`](../datasource/datasource-datasource-monitoring-configuration-part-1.md#session-monitoring-interval) is configured to a value > 0.

* **rttpd_user_bytes_written_total**

  The total number of bytes written to this user’s sessions.

  **Type:** Counter

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |
* **rttpd_user_bytes_read_total**

  The total number of bytes read by this user’s sessions.

  **Type:** Counter

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |
* **rttpd_user_updates_total**

  The total number updates sent by the session to the user.

  **Type:** Counter

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |
* **rttpd_user_reconnections_total**

  The total number session reconnections for the user.

  **Type:** Counter

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |
* **rttpd_user_update_latency_milliseconds**

  The update latency for the user’s session.

  The value of this metric is set to 0 when the user session closes.

  **Type:** Gauge

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |
* **rttpd_user_noop_latency_milliseconds**

  The NOOP latency for the user’s session.

  The value of this metric is set to 0 when the user session closes.

  **Type:** Gauge

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |
* **rttpd_user_queue_length_bytes**

  The output queue length for the user’s session.

  The value of this metric is set to 0 when the user session closes.

  **Type:** Gauge

  **Since:** Liberator 8.0.5

  **Labels**

  |     |     |     |     |
  | --- | --- | --- | --- |
  | icon:tag[] | username | the user’s name |  |
  | icon:tag[] | user_session_name | the unique user name for the session |  |
  | icon:tag[] | application_id | the client application identifier | Since Liberator 8.0.8 |

## RTTP session metrics

Liberator publishes the following metrics for RTTP sessions:

* **rttpd_session_threads_events_total**

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | thread | thread number |
  | icon:tag[] | event_type | Possible values: "request", "discard", "contrib", "update" |
* **rttpd_session_threads_bytes_read_total**

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | thread | thread number |
* **rttpd_session_threads_bytes_written_uncompressed_total**

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | thread | thread number |
* **rttpd_session_threads_bytes_written_total**

  **Type:** Counter

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | thread | thread number |
* **rttpd_session_count**

  **Type:** Gauge

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | thread | thread number |
* **rttpd_session_logged_in_seconds**

  The number of seconds a session is logged in.

  **Type:** Histogram

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | le | the upper-bound of a histogram bucket. |
* **rttpd_session_connections_permitted**

  Indicates if clients are allowed to connect or not.

  **Type:** Gauge
* **rttpd_session_total_subscriptions**

  The total number of subscriptions on the Liberator across all sessions.

  This metric is updated at a rate controlled by the configuration item [`global-monitoring-interval`](liberator-tuning-configuration.md#global-monitoring-interval).

  **Type:** Gauge

## RTTP object metrics

* **rttpd_object_total_objects**

  The total number of objects in the Liberator cache.

  This metric is updated at a rate controlled by the configuration item [`global-monitoring-interval`](liberator-tuning-configuration.md#global-monitoring-interval).

  **Type:** Gauge

  **Since:** Liberator 8.0.4

## RTTP authorisation metrics

Liberator publishes the following metrics for calls to the authorisation module.

* **rttpd_auth_time_milliseconds**

  The number of milliseconds it takes the authorisation module to complete a given operation.

  **Type:** Histogram

  **Since:** Liberator 8.0.4

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | call | The authorisation operation name. |
  | icon:tag[] | le | the upper-bound of a histogram bucket. |

## RTTP version metrics

Liberator also publishes the following metrics:

* **rttpd_binary_info**

  Liberator version and host name information.

  **📌 NOTE**\
  This metric is provided to allow version information to be monitored. The version information is in the label values and the metric value itself is irrelevant.

  **Type:** Gauge

  **Since:** Liberator 8.0.5

  **Labels**

  |     |     |     |
  | --- | --- | --- |
  | icon:tag[] | version | Liberator version |
  | icon:tag[] | date | The date on which the Liberator was built |
  | icon:tag[] | dsdk_version | Version of the Liberator’s |
  | icon:tag[] | dsdk_date | The date on which the DSDK was built |
  | icon:tag[] | hostname | Host name of the server that the Liberator is running |

## Liberator license metrics

* **rttpd_license_global_status**

  Liberator license status indicator. The value 0 indicates the license is okay.

  **Type:** gauge

  **Since:** Liberator 8.0.5

  **Values:**

  | Value | Status |
  | --- | --- |
  | 0 | Okay |
  | >0 | There is a problem with the license. Review the Liberator’s event logs, and contact Caplin Support. |

---

**See also:**

* [Transformer Prometheus metrics](../transformer/transformer-prometheus-metrics.md)
* [DataSource Prometheus metrics](../datasource/datasource-prometheus-metrics.md)
