Chapter 2. Installing Datadog for Ceph integration

After installing the Datadog agent, configure the Datadog agent to report Ceph metrics to Datadog.

Prerequisites

  • Root-level access to the Ceph monitor node.
  • Appropriate Ceph key providing access to the Red Hat Ceph Storage cluster.
  • Internet access.

Procedure

  1. Install the Ceph integration.

    1. Log in to the Datadog App. The user interface will present navigation on the left side of the screen.
    2. Click Integrations.
    3. Either enter ceph into the search field or scroll to find the Ceph integration. The user interface will present whether the Ceph integration is available or already installed.
    4. If it is available, click the button to install it.

      datadog integrations
  2. Configuring the Datadog agent for Ceph

    1. Navigate to the Datadog Agent configuration directory:

      [root@mon ~]# cd /etc/dd-agent/conf.d
    2. Create a ceph.yaml file from the ceph.yml.sample file:

      [root@mon ~]# cp ceph.yaml.example ceph.yaml
    3. Modify the ceph.yaml file:

      [root@mon ~]# vim ceph.yaml

      Example

      The following is a sample of what the modified ceph.yaml file looks like.

      init_config:
      
      instances:
      #  - tags:
      #    - name:mars_cluster
      #
      #    ceph_cmd: /usr/bin/ceph
      #    ceph_cluster: ceph
      #
      # If your environment requires sudo, please add a line like:
      #          dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph
      # to your sudoers file, and uncomment the below option.
      #
      #    use_sudo: True

      Uncomment the -tags, -name, ceph_command, ceph_cluster, and use_sudo: True lines. The default values for ceph_command and ceph_cluster are /usr/bin/ceph and ceph respectively.

      When complete, it will look like this:

      init_config:
      
      instances:
        - tags:
          - name:ceph-RHEL
      #
          ceph_cmd: /usr/bin/ceph
          ceph_cluster: ceph
      #
      # If your environment requires sudo, please add a line like:
      #          dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph
      # to your sudoers file, and uncomment the below option.
      #
          use_sudo: True
    4. Modify the sudoers file:

      [root@mon ~]# visudo
    5. Add the following line:

      dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph
    6. Enable the Datadog agent so that it will restart if the Ceph host reboots:

      [root@mon ~]# systemctl enable datadog-agent
    7. Restart the Datadog agent:

      [root@mon ~]# systemctl status datadog-agent