The Apache Hive data warehouse software facilitates reading, writing, and managing large datasets residing in distributed storage using SQL. Structure can be projected onto data already in storage. A command line tool and JDBC driver are provided to connect users to Hive.

Prerequisites

  1. Set environment variable HADOOP_CLIENT_OPTS as follows:

    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"
    

    If you want to any other port then define in the detection YAML file.

  2. For Virtual machines, install the Linux agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

hive:
- name: hive
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2
  

Configuring the application

Virtual machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: hive
  instance-checks:
    service-check:
      - hive
    process-check:
      - hive
    port-check:
      - 10002
  mon-type: "jmx"
  misc:
    jmx-port: "8808"

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: hive
  container-checks:
    image-check:
      - hive
    port-check:
      - 10002
  mon-type: "jmx"
  misc:
    jmx-port: "8808"
  

Kubernetes environment

Configure the application in config.yaml

- name: hive
  container-checks:
    image-check:
      - hive
    port-check:
      - 10002
  mon-type: "jmx"
  misc:
    jmx-port: "8808"
  

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Supported metrics

OpsRamp MetricMetric Display NameUnitDescription
hive_open_operations_CountOpen Operations CountNumber of open operations count
hive_memory_heap_usage_ValueMemory Heap Usage ValuebytesMemory heap usage value
hive_memory_heap_used_ValueMemory Heap Used ValuebytesMemory heap used value
hive_memory_heap_max_ValueMemory Heap Max ValuebytesMemory heap max value
hive_memory_heap_committed_ValueMemory Heap Committed ValuebytesMemory heap committed value
hive_memory_non_heap_init_ValueMemory Non Heap Init ValuebytesMemory non heap init value
hive_memory_non_heap_used_ValueMemory Non Heap Used ValuebytesMemory non heap used value
hive_memory_non_heap_max_ValueMemory Non Heap Max ValuebytesMemory non heap max value
hive_memory_non_heap_committed_ValueMemory Non Heap Committed ValuebytesMemory non heap committed value
hive_memory_total_init_ValueMemory Total Init ValuebytesMemory total init value
hive_memory_total_usage_ValueMemory Total Usage ValuebytesMemory total usage value
hive_memory_total_used_ValueMemory Total Used ValuebytesMemory total used value
hive_memory_total_max_ValueMemory Total Max ValuebytesMemory total max value
hive_memory_total_committed_ValueMemory Total Committed ValuebytesMemory total committed value
hive_open_connections_CountOpen Connections CountNumber of open connections count
hive_create_total_count_dbs_CountCreate Total Count Dbs CountNumber of create total count dbs count
hive_delete_total_count_dbs_CountDelete Total Count Dbs CountNumber of delete total count dbs count
hive_init_total_count_dbs_ValueInit Total Count Dbs ValueNumber of init total count dbs value
hive_create_total_count_tables_CountCreate Total Count Tables CountNumber of create total count tables count
hive_delete_total_count_tables_CountDelete Total Count Tables CountNumber of delete total count tables count
hive_init_total_count_tables_ValueInit Total Count Tables Valueinit total count tables value
hive_create_total_count_partitions_CountCreate Total Count Partitions CountNumber of number of create total count partitions count
hive_delete_total_count_partitions_CountDelete Total Count Partitions CountNumber of number of delete total count partitions count
hive_init_total_count_partitions_ValueInit Total Count Partitions Valueinit total count partitions value
hive_directsql_errors_CountDirectsql Errors CountNumber of directsql errors count
hive_memory_heap_init_ValueMemory Heap Init ValueMemory heap init value
hive_api_create_table_CountApi Create Table CountNumber of api create table count
hive_active_calls_api_create_table_CountActive Calls Api Create Table CountNumber of active calls api create table count
hive_api_get_table_CountApi Get Table CountNumber of api get table count
hive_active_calls_api_get_table_CountActive Calls Api Get Table CountActive calls api get table count
hive_api_drop_table_CountApi Drop Table CountApi drop table count
hive_active_calls_api_drop_table_CountActive Calls Api Drop Table CountNumber of active calls api drop table count
hive_api_init_CountApi Init CountNumber of total api init count
hive_active_calls_api_init_CountActive Calls Api Init CountNumber of active calls api init count
hive_api_get_all_databases_CountApi Get All Databases CountNumber of api get all databases count
hive_active_calls_api_get_all_databases_CountActive Calls Api Get All Databases CountNumber of active calls api get all databases count
hive_api_get_database_CountApi Get Database CountNumber of api get database count
hive_active_calls_api_get_database_CountActive Calls Api Get Database CountNumber of active calls api get database count
hive_api_get_all_tables_CountApi Get All Tables CountNumber of api get all tables count
hive_active_calls_api_get_all_tables_CountActive Calls Api Get All Tables CountNumber of active calls api get all tables count
hive_api_shutdown_CountApi Shutdown CountApi shutdown count
hive_active_calls_api_shutdown_CountActive Calls Api Shutdown CountNumber of active calls api shutdown count
hive_api_flushCache_CountApi Flushcache CountNumber of api flushCache count
hive_active_calls_api_flushCache_CountActive Calls Api Flushcache CountNumber of active calls api flushCache count
hive_api_alter_table_CountApi Alter Table CountNumber of api alter table count
hive_active_calls_api_alter_table_CountActive Calls Api Alter Table CountNumber of active calls api alter table count
hive_api_get_all_functions_CountApi Get All Functions CountNumber of api get all functions count
hive_active_calls_api_get_all_functions_CountActive Calls Api Get All Functions CountNumber of active calls api get all functions count
hive_api_get_table_req_CountApi Get Table Req CountNumber of api get table req count
hive_active_calls_api_get_table_req_CountActive Calls Api Get Table Req CountNumber of active calls api get table req count