Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Hadoop Cloudera reports always "UNKNOWN: Metrics not found" #1

Closed
killerwhile opened this issue Jul 19, 2013 · 1 comment
Closed
Assignees
Labels

Comments

@killerwhile
Copy link

Hi Hari,

Giving a try to your tool, check_hadoop_cloudera_manager_metrics.pl is always reporting "UNKNOWN: Metrics not found" even when all the metrics exist.

I'm using Perl 5.8.8 (RHEL 5.7).

Test with all metrics existing:

$ ./check_hadoop_cloudera_manager_metrics.pl -H <CMHOST> -u <USER> -p <PASS> --cluster <CLUSTER> --service "hdfs1" -m dfs_capacity,dfs_capacity_used,dfs_capacity_used_non_hdfs -vvvv -c 100000000000000 -w 100000000000000
verbose mode on

[snip]
metrics:                  [ dfs_capacity dfs_capacity_used dfs_capacity_used_non_hdfs ]
service:                  hdfs1
warning  upper:           100000000000000
critical upper:           100000000000000

setting timeout to 10 secs

querying http://<CMHOST>:7180/api/v1/clusters/<CUSTER>/services/hdfs1/metrics?metrics=dfs_capacity&metrics=dfs_capacity_used&metrics=dfs_capacity_used_non_hdfs
returned HTML:

{
  "items" : [ {
    "name" : "dfs_capacity_used_non_hdfs",
    "context" : "hdfs1",
    "unit" : "bytes",
    "data" : [ {
      "timestamp" : "2013-07-19T07:10:14.000Z",
      "value" : 3.034582032384E12
    }, {
      "timestamp" : "2013-07-19T07:11:14.000Z",
      "value" : 3.034582032384E12
    }, {
      "timestamp" : "2013-07-19T07:12:14.000Z",
      "value" : 3.034582032384E12
    }, {
      "timestamp" : "2013-07-19T07:13:14.000Z",
      "value" : 3.034582032384E12
    }, {
      "timestamp" : "2013-07-19T07:14:14.000Z",
      "value" : 3.03458203648E12
    } ]
  }, {
    "name" : "dfs_capacity_used",
    "context" : "hdfs1",
    "unit" : "bytes",
    "data" : [ {
      "timestamp" : "2013-07-19T07:10:14.000Z",
      "value" : 7.274594586624E12
    }, {
      "timestamp" : "2013-07-19T07:11:14.000Z",
      "value" : 7.274594586624E12
    }, {
      "timestamp" : "2013-07-19T07:12:14.000Z",
      "value" : 7.274594586624E12
    }, {
      "timestamp" : "2013-07-19T07:13:14.000Z",
      "value" : 7.274594586624E12
    }, {
      "timestamp" : "2013-07-19T07:14:14.000Z",
      "value" : 7.274594586624E12
    } ]
  }, {
    "name" : "dfs_capacity",
    "context" : "hdfs1",
    "unit" : "bytes",
    "data" : [ {
      "timestamp" : "2013-07-19T07:10:14.000Z",
      "value" : 6.6417105498112E13
    }, {
      "timestamp" : "2013-07-19T07:11:14.000Z",
      "value" : 6.6417105498112E13
    }, {
      "timestamp" : "2013-07-19T07:12:14.000Z",
      "value" : 6.6417105498112E13
    }, {
      "timestamp" : "2013-07-19T07:13:14.000Z",
      "value" : 6.6417105498112E13
    }, {
      "timestamp" : "2013-07-19T07:14:14.000Z",
      "value" : 6.6417105498112E13
    } ]
  } ]
}

http code: 200
message: OK
parsing output from Cloudera Manager

dfs_capacity_used_non_hdfs  dfs_capacity_used_non_hdfs  value: 3034582036480    unit: bytes         unit castable to Nagios PerfData: no
dfs_capacity_used       dfs_capacity_used       value: 7274594586624    unit: bytes         unit castable to Nagios PerfData: no
dfs_capacity            dfs_capacity            value: 66417105498112   unit: bytes         unit castable to Nagios PerfData: no

UNKNOWN: Metrics not found: dfs_capacity,dfs_capacity_used,dfs_capacity_used_non_hdfs. dfs_capacity=66417105498112 dfs_capacity_used=7274594586624 dfs_capacity_used_non_hdfs=3034582036480 | dfs_capacity=66417105498112 dfs_capacity_used=7274594586624 dfs_capacity_used_non_hdfs=3034582036480 

Test with one non-existing metric

Here all the metrics are reported as non existing. This sounds to me like a logic check issue.

$ ./check_hadoop_cloudera_manager_metrics.pl-H <CMHOST> -u <USER> -p <PASS> --cluster <CLUSTER>  --service "hdfs1" -m dfs_capacity,dfs_capacity_used,dfs_capacity_used_non_hdfs,non_existing_metric -vvvv -c 100000000000000 -w 100000000000000

[snip]

UNKNOWN: Metrics not found: dfs_capacity,dfs_capacity_used,dfs_capacity_used_non_hdfs,non_existing_metric. dfs_capacity=66417105498112 dfs_capacity_used=7274594590720 dfs_capacity_used_non_hdfs=3034582032384 | dfs_capacity=66417105498112 dfs_capacity_used=7274594590720 dfs_capacity_used_non_hdfs=3034582032384 

Thanks

Benoit

@HariSekhon
Copy link
Owner

Hi Benoit,

Sorry for late reply I didn't see this until just now, it should be fixed now, please git pull, re-execute and let me know.

Regards,

Hari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants