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
Install the Ceph integration.
- Log in to the Datadog App. The user interface will present navigation on the left side of the screen.
- Click Integrations.
- 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.
If it is available, click the button to install it.
Configuring the Datadog agent for Ceph
Navigate to the Datadog Agent configuration directory:
[root@mon ~]# cd /etc/dd-agent/conf.d
Create a
ceph.yaml
file from theceph.yml.sample
file:[root@mon ~]# cp ceph.yaml.example ceph.yaml
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
, anduse_sudo: True
lines. The default values forceph_command
andceph_cluster
are/usr/bin/ceph
andceph
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
Modify the sudoers file:
[root@mon ~]# visudo
Add the following line:
dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph
Enable the Datadog agent so that it will restart if the Ceph host reboots:
[root@mon ~]# systemctl enable datadog-agent
Restart the Datadog agent:
[root@mon ~]# systemctl status datadog-agent