Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

automate sending cluster usage reports to recipients

automate sending cluster usage reports to recipients

New Contributor

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 

3 REPLIES 3

Re: automate sending cluster usage reports to recipients

Super Guru

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

Re: automate sending cluster usage reports to recipients

New Contributor

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

 

Highlighted

Re: automate sending cluster usage reports to recipients

Explorer

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