aboutsummaryrefslogtreecommitdiff
path: root/bigtop-packages/src/charm/hadoop/layer-hadoop-namenode/metrics.yaml
blob: 3bca549a8fbcbc0d60bb80b2643742d6d5ef05f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
metrics:
  namenodes:
    type: gauge
    description: number of namenodes in the cluster
    command: "charms.reactive is_state apache-bigtop-namenode.ready && su hdfs -c 'hdfs getconf -namenodes 2>/dev/null | wc -l' || echo 0"
  offlinedatanodes:
    type: gauge
    description: number of dead datanodes in the cluster (must be run as hdfs)
    command: "charms.reactive is_state apache-bigtop-namenode.ready && su hdfs -c 'hdfs dfsadmin -report -dead 2>/dev/null | grep -i datanodes | grep -o [0-9]' || echo 0"
  onlinedatanodes:
    type: gauge
    description: number of live datanodes in the cluster (must be run as hdfs)
    command: "charms.reactive is_state apache-bigtop-namenode.ready && su hdfs -c 'hdfs dfsadmin -report -live 2>/dev/null | grep -i datanodes | grep -o [0-9]' || echo 0"