This check monitors two parts of Hive: Hive Metastore and HiveServer2.
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 Hive check is included in the Datadog Agent package. No additional installation is needed on your server.
-
Edit the Hive configuration file in
HIVE_HOME/conf/hive-site.xmlto enable the Hive Metastore and HiveServer2 metrics by adding these properties:<property> <name>hive.metastore.metrics.enabled</name> <value>true</value> </property> <property> <name>hive.server2.metrics.enabled</name> <value>true</value> </property> -
Enable a JMX remote connection for the HiveServer2 and/or for the Hive Metastore. For example, set the
HADOOP_CLIENT_OPTSenvironment variable:export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.port=8808"Then restart the HiveServer2 or the Hive Metastore. Hive Metastore and HiveServer2 cannot share the same JMX connection.
-
Edit the
hive.d/conf.yamlfile, in theconf.d/folder at the root of your Agent's configuration directory to start collecting your hive performance data. See the sample hive.d/conf.yaml for all available configuration options.This check has a limit of 350 metrics per instance. The number of returned metrics is indicated in the info page. You can specify the metrics you are interested in by editing the configuration below. To learn how to customize the metrics to collect, visit the JMX Checks documentation for more detailed instructions. If you need to monitor more metrics, contact Datadog support.
Available for Agent >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
hive.d/conf.yamlfile to start collecting your Hive logs:logs: - type: file path: /tmp/<USER>/hive.log source: hive service: <SERVICE_NAME> log_processing_rules: - type: multi_line name: new_log_start_with_date pattern: \d{4}\-\d{2}\-\d{2}Change the
pathandserviceparameter values and configure them for your environment. See the sample hive.d/conf.yaml for all available configuration options.
Run the Agent's status subcommand and look for Hive under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
hive.can_connect:
Returns CRITICAL if the Agent is unable to connect to and collect metrics from the monitored HiveServer2/Hive Metastore instance, otherwise returns OK.
The Hive check does not include any events.
Need help? Contact Datadog support.