Reply
New Contributor
Posts: 1
Registered: ‎02-08-2016

automate sending cluster usage reports to recipients

Is there a way to configure Cloudera manager to send out aggregated statisitc reports ,like weekly or monthly usage reports to email recipients? Basically looking a way to send out monthly hdfs disk space usage, CPU usage and other stats to hadoop admins. 

 

Thanks,

Mike 

Posts: 1,042
Topics: 1
Kudos: 262
Solutions: 130
Registered: ‎04-22-2014

Re: automate sending cluster usage reports to recipients

Cloudera Manager does not have a reports emailing feature at this time.  A couple options you might consider:

 

(1)

 

Retrieve reports via the API

See:

https://cloudera.github.io/cm_api/apidocs/v11/path__clusters_-clusterName-_services_-serviceName-_re...

and

https://cloudera.github.io/cm_api/apidocs/v11/path__clusters_-clusterName-_services_-serviceName-_re...

 

(2)

 

Use curl or some other tool to dowwnload the report CSV/XLS.  For instance:

 

http://cm_server.example.com:7180/cmf/services/3/reports/historicalDiskUsage?groupBy=USER&timeAggreg...

 

The report info could then be assembled into the desired format and sent by a custom script/app

New Contributor
Posts: 1
Registered: ‎07-10-2017

Re: automate sending cluster usage reports to recipients

Hello Mike, 

I have the very same problem.

At the end, were you able to solve this in any way?

 

I tried both suggestions mentioned by @bgooley but with no success until now.

In the first case (API call) I get a HTTP 403 error code (forbidden).

In the second case (wget) it seems not working unless managing properly the session (i.e. If I logged into the CM console, and later I download the CSV url, then it's working. When trying to do it programmatically, no way...) 

 

Regards

Stefano

 

Explorer
Posts: 10
Registered: ‎11-07-2016

Re: automate sending cluster usage reports to recipients

Did you try this?

 

Fetch the HDFS usage report:

 

https://cloudera.github.io/cm_api/apidocs/v19/path__clusters_-clusterName-_services_-serviceName-_re...

 

It worls for me:

 

https://<cm_host>:7183/api/v19/clusters/<ClusterName>/services/<ServiceName>/reports/hdfsUsageReport

 

https://cmmanager.domain.com:7183/api/v19/clusters/<Production%20US>/services/hdfs/reports/hdfsUsage...

 

 

You notice I use for ClusterName the chars %20 that represents a blank (my ClusterName is "Production US"), so I mahe the URL understand that is a blank

 

Regards,

Nic

Announcements