Enabling system metrics

In IBM Cloud Logs, you can enable data usage metrics to collect predefined metrics that you can use to monitor your data usage. Then, you can use these metrics in custom dashboards, insights, and alerts.

Prereqs

To configure this feature, you must attach a metrics bucket to your IBM Cloud Logs instance. For more information, see Configuring the metrics bucket.

System metrics in an IBM Cloud Logs instance

The following metrics are generated when you enable Data Usage metrics:

  • cx_data_usage_bytes_total: Tracks your total data usage in bytes.
  • cx_alerts: Tracks when an alert is triggered or resolved into a gauge-type metric.

The information that is gathered on the system metrics include the following labels:

Data Usage metric labels
Label Description
pillar Type of traffic
Valid values are: logs, metrics
subsystem_name Subsystem that generates logs.
Only valid for pillar set to logs.
application_name Application that generates logs
Only valid for pillar set to logs.
priority TCO priority
Valid values are: high for Priority insights, medium for Analyze and alert, low for Store and search, blocked
severity Log severity
Valid values are: critical, error, warn, info, debug, trace
Only valid for pillar set to logs.
blocking_reason_type The reason why traffic is blocked.
Valid values are: tco_policy or parsing_rule.
blocking_reason_name The name of the TCO policy or parsing rule which is blocking traffic.

Enabling Data Usage metrics in an IBM Cloud Logs instance

Complete the following steps to enable collection of the Data Usage metric cx_data_usage_bytes_total:

  1. Navigate to your IBM Cloud Logs instance: Observability > Logging > Cloud Logs > Your Service Instance > Open Dashboard.

  2. Select the Usage icon Data pipeline icon > Data Usage.

    The Data Usage page opens.

    Data Usage
    Data Usage

  3. Select Settings. The Data usage settings page opens.

  4. In the Data Usage visibility > Enable metrics section, switch on the toggle Enable metrics.

    Enable Data Usage
    Enable Data Usage

After you enable data usage metrics, it can take up to two hours to see metrics.

Enabling the cx_metrics metric in an IBM Cloud Logs instance

Complete the following steps to enable the alerts metric cx_metrics in an IBM Cloud Logs instance:

  1. Navigate to your IBM Cloud Logs instance: Observability > Logging > Cloud Logs > Your Service Instance > Open Dashboard.

  2. Select the Person icon Person icon.

    Preferences
    Preferences

  3. Select Preferences.

  4. In the Alerts section, enable the toggle to create a gauge-type metric called cx_alerts.

    cx_alerts metrics
    cx_alerts metrics

If enabled, the metric is generated whenever an alert is triggered or resolved.

You can add this metric to custom dashboards.