A DataNode stores data in HadoopFileSystem. A functional filesystem has more than one DataNode, with data replicated across them.

Prerequisite

For Virtual Machines, install the Linux Agent.

Configuring the credentials

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

hdfs-datanode:
- name: hdfs-datanode
  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: hdfs-datanode
  instance-checks:
    process-check:
      - datanode
    port-check:
      - 50075
      - 9864
    uri-check:
      - "jmx?qry=Hadoop:service=DataNode,name=FSDatasetState*"
      - "jmx?qry=java.lang:type=OperatingSystem"

Docker environment

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

- name: hdfs-datanode
  container-checks:
    image-check:
      - datanode
    port-check:
      - 50075
      - 9864

Kubernetes environment

Configure the application in config.yaml

- name: hdfs-datanode
  container-checks:
    image-check:
      - datanode
    port-check:
      - 50075
      - 9864

Validate

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

Metrics

OpsRamp MetricMetric Display NameUnitDescription
hdfs_datanode_dfs_remainingDfs RemainingbytesThe remaining disk space left
hdfs_datanode_dfs_remaining_percentDfs Remaining PercentpercentThe remaining disk space left
hdfs_datanode_dfs_capacityDfs CapacitybytesCapacity of the disk
hdfs_datanode_dfs_usedDfs UsedbytesDisk usage
hdfs_datanode_dfs_used_percentDfs Used PercentpercentDisk usage
hdfs_datanode_cache_capacityCache CapacitybytesCapacity of the cache
hdfs_datanode_cache_usedCache UsedbytesCache used
hdfs_datanode_num_failed_volumesNum Failed VolumesNumber of failed volumes
hdfs_datanode_last_volume_failure_dateLast Volume Failure DatemillisecondsDate/time of the last volume failure since epoch
hdfs_datanode_estimated_capacity_lost_totalEstimated Capacity Lost TotalbytesEstimated capacity lost
hdfs_datanode_num_blocks_cachedNum Blocks CachedBlocksNumber of blocks cached
hdfs_datanode_num_blocks_failed_to_cacheNum Blocks Failed To CacheBlocksNumber of blocks that failed to cache
hdfs_datanode_num_blocks_failed_to_uncacheNum Blocks Failed To UncacheBlocksNumber of failed blocks to remove from cache
hdfs_datanode_process_cpu_loadProcess Cpu LoadLoadCPU Load of the process