This check monitors MapR 6.1+ through the Datadog Agent.
Follow the instructions below to install and configure this check for an Agent running on a host.
The MapR check is included in the Datadog Agent package but requires additional setup operations.
- MapR monitoring is running correctly.
- You have an available MapR user (with name, password, UID, and GID) with the 'consume' permission on the
/var/mapr/mapr.monitoring/metricstreamsstream. This may be an already existing user or a newly created user. If you want the user to be calleddd-agent, create it before installing the Agent. - You have generated a service long-lived ticket for this user that is readable by the
dd-agentuser.
Installation steps for each node:
-
Install the library mapr-streams-library with the following command:
sudo -u dd-agent /opt/datadog-agent/embedded/bin/pip install --global-option=build_ext --global-option="--library-dirs=/opt/mapr/lib" --global-option="--include-dirs=/opt/mapr/include/" mapr-streams-python.If you use Python 3 with Agent v7, replace
pipwithpip3. -
Add
/opt/mapr/lib/to your/etc/ld.so.conf(or a file in/etc/ld.so.conf.d/). This is required for the mapr-streams-library used by the Agent to find the MapR shared libraries. -
Reload the libraries by running
sudo ldconfig. -
Configure the integration by specifying the ticket location.
- If you don't have "security" enabled in the cluster, you can continue without a ticket.
- If your production environment does not allow compilation tools like gcc (required to build the mapr-streams-library), it is possible to generate a compiled wheel of the library on a development instance and distribute the compiled wheel to the production hosts. The development and production hosts have to be similar enough for the compiled wheel to be compatible. You can run
sudo -u dd-agent /opt/datadog-agent/embedded/bin/pip wheel --global-option=build_ext --global-option="--library-dirs=/opt/mapr/lib" --global-option="--include-dirs=/opt/mapr/include/" mapr-streams-pythonto create the wheel file on the development machine. Then,sudo -u dd-agent /opt/datadog-agent/embedded/bin/pip install <THE_WHEEL_FILE>on the production machine. - If you use Python 3 with Agent v7, make sure to replace
pipwithpip3when installing the mapr-streams-library
- Edit the
mapr.d/conf.yamlfile, in theconf.d/folder at the root of your Agent's configuration directory to collect your MapR performance data. See the sample mapr.d/conf.yaml for all available configuration options. - Set the
ticket_locationparameter in the config to the path of the long-lived ticket you created. - Restart the Agent.
MapR uses fluentD for logs. Use the fluentD datadog plugin to collect MapR logs. The following command downloads and installs the plugin into the right directory.
curl https://raw.githubusercontent.com/DataDog/fluent-plugin-datadog/master/lib/fluent/plugin/out_datadog.rb -o /opt/mapr/fluentd/fluentd-<VERSION>/lib/fluentd-<VERSION>-linux-x86_64/lib/app/lib/fluent/plugin/out_datadog.rb
Then update the /opt/mapr/fluentd/fluentd-<VERSION>/etc/fluentd/fluentd.conf with the following section.
<match *>
@type copy
<store> # This section is here by default and sends the logs to ElasticCache for Kibana.
@include /opt/mapr/fluentd/fluentd-<VERSION>/etc/fluentd/es_config.conf
include_tag_key true
tag_key service_name
</store>
<store> # This section also forwards all the logs to Datadog:
@type datadog
@id dd_agent
include_tag_key true
dd_source mapr
dd_tags "<KEY>:<VALUE>"
service <YOUR_SERVICE_NAME>
api_key <YOUR_API_KEY>
</store>
Refer to fluent_datadog_plugin documentation for more details about the options you can use.
Run the Agent's status subcommand and look for mapr under the Checks section.
See metadata.csv for a list of default metrics provided by this integration.
mapr.can_connect: ReturnsCRITICALif the Agent fails to connect and subscribe to the stream topic,OKotherwise.
The MapR check does not include any events.
-
The Agent is on a crash loop after configuring the MapR integration
There have been a few cases where the C library within mapr-streams-python segfaults because of permissions issues. Make sure the
dd-agentuser has read permission on the ticket file, that thedd-agentuser is able to run maprcli commands when the MAPR_TICKETFILE_LOCATION environment variable points to the ticket. -
The integration seems to work correctly but doesn't send any metric.
Make sure to let the Agent run for at least a couple of minutes, as the integration pulls data from a topic and MapR needs to push data into that topic. If that doesn't help, but running the Agent manually with
sudoshows data, this is a problem with permissions. Double check everything. Thedd-agentLinux user should be able to use a locally stored ticket, allowing it to run queries against MapR as user X (which may or may not bedd-agentitself). Additionally, user X needs to have theconsumepermission on the/var/mapr/mapr.monitoring/metricstreamsstream. -
You see the message
confluent_kafka was not imported correctly ...The Agent embedded environment was not able to run the command
import confluent_kafka. This means that either the mapr-streams-library was not installed inside the embedded environment, or that it can't find the mapr-core libraries. The error message should give more details.
Need more help? Contact Datadog support.