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:
cd /etc/dd-agent/conf.d
[root@mon ~]# cd /etc/dd-agent/conf.d
Copy to Clipboard Copied! Create a
ceph.yaml
file from theceph.yml.sample
file:cp ceph.yaml.example ceph.yaml
[root@mon ~]# cp ceph.yaml.example ceph.yaml
Copy to Clipboard Copied! Modify the
ceph.yaml
file:vim ceph.yaml
[root@mon ~]# vim ceph.yaml
Copy to Clipboard Copied! 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
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
Copy to Clipboard Copied! 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
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
Copy to Clipboard Copied! Modify the sudoers file:
visudo
[root@mon ~]# visudo
Copy to Clipboard Copied! Add the following line:
dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph
dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph
Copy to Clipboard Copied! Enable the Datadog agent so that it will restart if the Ceph host reboots:
systemctl enable datadog-agent
[root@mon ~]# systemctl enable datadog-agent
Copy to Clipboard Copied! Restart the Datadog agent:
systemctl status datadog-agent
[root@mon ~]# systemctl status datadog-agent
Copy to Clipboard Copied!