This check monitors MarkLogic through the Datadog Agent. MarkLogic Server is a multi-model database designed to be a data hub for operational and analytical data.
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.
The MarkLogic check is included in the Datadog Agent package. No additional installation is needed on your server.
Using the API or the Admin interface, create a user for the Datadog Agent with the manage-user
role permissions at minimum.
If you plan to use the enable_health_service_checks
configuration, give the Datadog MarkLogic user at least the manage-admin
role.
-
Create the Datadog user by modifying this request with your specific values:
curl -X POST --anyauth --user <ADMIN_USER>:<ADMIN_PASSWORD> -i -H "Content-Type: application/json" -d '{"user-name": "<USER>", "password": "<PASSWORD>", "roles": {"role": "manage-user"}}' http://<HOSTNAME>:8002/manage/v2/users
Use the correct
<ADMIN_USER>
and<ADMIN_PASSWORD>
, and replace<USER>
and<PASSWORD>
with the username and password that the Datadog Agent uses. For more details, see the MarkLogic documentation: POST /manage/v2/users. -
To verify the user was created with enough permissions:
curl -X GET --anyauth --user <USER>:<PASSWORD> -i http://<HOSTNAME>:8002/manage/v2
-
Log into the QConsole with an admin account. By default, the QConsole is available at
http://<HOSTNAME>:8000/qconsole
. -
Select
Security
as Database andXQuery
as query type. -
Run this query, replacing
<USER>
and<PASSWORD>
with the ones that the Datadog Agent uses:xquery version "1.0-ml"; import module namespace sec="http://marklogic.com/xdmp/security" at "/MarkLogic/security.xqy"; sec:create-user( "<USER>", "Datadog Agent user", "<PASSWORD>", "manage-user", (xdmp:permission("security", "read")), ("http://marklogic.com/dev_modules"))
For more details, see the MarkLogic documentation: sec:create-user.
-
To verify that the user was created with enough permissions, use
<USER>
and<PASSWORD>
to authenticate athttp://<HOSTNAME>:8002
(default port).
-
Edit the
marklogic.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory to start collecting your MarkLogic performance data. See the samplemarklogic.d/conf.yaml
file for all available configuration options. For user-related settings in the config file, use the Datadog Agent user you created.
Available for Agent versions >6.0
-
Collecting logs is disabled by default in the Datadog Agent, you need to enable it in
datadog.yaml
:logs_enabled: true
-
Add this configuration block to your
marklogic.d/conf.yaml
file to start collecting your MarkLogic logs:logs: - type: file path: /var/opt/MarkLogic/Logs/ErrorLog.txt source: marklogic - type: file path: /var/opt/MarkLogic/Logs/80002_AccessLog.txt source: marklogic
Change the
path
value and configure it for your environment. See the samplemarklogic.d/conf.yaml
file for all available configuration options.
Run the Agent's status subcommand and look for marklogic
under the Checks section.
See metadata.csv for a list of metrics provided by this check.
MarkLogic does not include any events.
See service_checks.json for a list of service checks provided by this integration.
Need help? Contact Datadog support.