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

Commit

Permalink
Updated content clarity and consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
harshini-rangaswamy committed Dec 20, 2023
1 parent e032f47 commit 3133a24
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions docs/products/kafka/howto/datadog-customised-metrics.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Configure Apache Kafka® metrics sent to Datadog
===============================================

When creating a :doc:`Datadog service integration </docs/integrations/datadog/datadog-metrics>`, you can customise which metrics are sent to the Datadog endpoint using the :doc:`Aiven CLI </docs/tools/cli>`.
When creating a `Datadog service integration <https://docs.datadoghq.com/integrations/kafka/?tab=host#kafka-consumer-integration>`_, customize which metrics are sent to the Datadog endpoint using the `Aiven CLI <https://aiven.io/docs/products/kafka>`_.

For each Apache Kafka® topic and partition, the following metrics are currently supported:
The following metrics are currently supported for each topic and partition in Apache Kafka®:

* ``kafka.log.log_size``
* ``kafka.log.log_start_offset``
* ``kafka.log.log_end_offset``

.. Tip::
.. note::

All the above metrics are tagged with ``topic`` and ``partition`` allowing you to monitor each topic and partition independently.
All metrics are tagged with ``topic`` and ``partition``, enabling independent monitoring of each ``topic`` and ``partition``.

Variables
---------
Expand All @@ -23,57 +23,56 @@ Variable Description
================== ============================================================================
``SERVICE_NAME`` Aiven for Apache Kafka® service name
------------------ ----------------------------------------------------------------------------
``INTEGRATION_ID`` ID of the integration between the Aiven for Apache Kafka service and Datadog
``INTEGRATION_ID`` ID of the integration between Aiven for Apache Kafka service and Datadog
================== ============================================================================

.. Tip::

The ``INTEGRATION_ID`` parameter can be found by issuing:
.. code::
You can find the ``INTEGRATION_ID`` parameter by executing this command:

.. code::
avn service integration-list SERVICE_NAME
avn service integration-list SERVICE_NAME
Customize Apache Kafka® metrics for Datadog
----------------------------------------------------

Customise Apache Kafka® metrics sent to Datadog
-----------------------------------------------
Before customizing metrics, ensure a Datadog endpoint is configured and enabled in your Aiven for Apache Kafka service. For setup instructions, see `Send metrics to Datadog <https://aiven.io/docs/integrations/datadog/datadog-metrics>`_. Format any listed parameters as a comma-separated list: ``['value0', 'value1', 'value2', ...]``.

Before customising the metrics, make sure that you have a Datadog endpoint configured and enabled in your Aiven for Apache Kafka service. For details on how to set up the Datadog integration, check the :doc:`dedicated article </docs/integrations/datadog/datadog-metrics>`. Please note that in all the below parameters a 'comma separated list' has the following format: ``['value0','value1','value2','...']``.

To customise the metrics sent to Datadog, you can use the ``service integration-update`` passing the following customised parameters:
To customize the metrics sent to Datadog, you can use the ``service integration-update`` passing the following customized parameters:

* ``kafka_custom_metrics``: defining the comma separated list of custom metrics to include (within ``kafka.log.log_size``, ``kafka.log.log_start_offset`` and ``kafka.log.log_end_offset``)
* ``kafka_custom_metrics``: defining the comma-separated list of custom metrics to include (within ``kafka.log.log_size``, ``kafka.log.log_start_offset`` and ``kafka.log.log_end_offset``)

As example to sent the ``kafka.log.log_size`` and ``kafka.log.log_end_offset`` metrics execute the following code:
For example, to send the ``kafka.log.log_size`` and ``kafka.log.log_end_offset`` metrics, execute the following code:

.. code::
avn service integration-update \
-c kafka_custom_metrics=['kafka.log.log_size','kafka.log.log_end_offset'] \
INTEGRATION_ID
Once the update is successful and metrics have been collected and pushed, you should see them in your Datadog explorer.
.. seealso:: Learn more about :doc:`/docs/integrations/datadog`.
After you successfully update and the metrics are collected and sent to Datadog, you can view them in your Datadog explorer.

.. seealso:: Learn more about :doc:`Datadog and Aiven </docs/integrations/datadog>`.

Customise Apache Kafka® Consumer Integration metrics sent to Datadog
====================================================================

`Kafka Consumer Integration <https://docs.datadoghq.com/integrations/kafka/?tab=host#kafka-consumer-integration>`_ collects metrics for message offsets.
Customize Apache Kafka® consumer metrics for Datadog
-----------------------------------------------------

To customise the metrics sent from this Datadog integration to Datadog, you can use the ``service integration-update`` passing the following customised parameters:
`Kafka Consumer Integration <https://docs.datadoghq.com/integrations/kafka/?tab=host#kafka-consumer-integration>`_ collects metrics for message offsets. To customize the metrics sent from this Datadog integration to Datadog, you can use the ``service integration-update`` passing the following customized parameters:

* ``include_topics``: defining the comma separated list of topics to include
* ``include_topics``: Specify a comma-separated list of topics to include.

.. Tip::
.. Note::

By default, all topics are included.

* ``exclude_topics``: defining the comma separated list of topics to exclude
* ``include_consumer_groups``: defining the comma separated list of consumer groups to include
* ``exclude_consumer_groups``: defining the comma separated list of consumer groups to include
* ``exclude_topics``: Specify a comma-separated list of topics to exclude.
* ``include_consumer_groups``: Specify a comma-separated list of consumer groups to include.
* ``exclude_consumer_groups``: Specify a comma-separated list of consumer groups to exclude.

As example to include topics ``topic1`` and ``topic2`` and exclude topic ``topic3`` execute the following code:
For example, to include topics ``topic1`` and ``topic2``, and exclude ``topic3``, execute the following code:

.. code::
Expand All @@ -82,4 +81,4 @@ As example to include topics ``topic1`` and ``topic2`` and exclude topic ``topic
-c exclude_topics=['topic3'] \
INTEGRATION_ID
Once the update is successful and metrics have been collected and pushed, you should see them in your Datadog explorer.
After you successfully update and the metrics are collected and sent to Datadog, you can view them in your Datadog explorer.

0 comments on commit 3133a24

Please sign in to comment.