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.

Cloudera 6.3 Host Filesystem Metrics: How to retrieve these from a host via API or SQL calls?

Highlighted

Cloudera 6.3 Host Filesystem Metrics: How to retrieve these from a host via API or SQL calls?

Explorer

Hello All,

 

I would like to be able to get the following metrics via Cloudera API or DB SQL query?  Is this possible?  If so, how could I do this via:

 

1) API Calls

2) SQL Query (if stored in a DB)

3) Or retrieve it from the Host Monitor Timeseries files?  Ex.  [root@cm-r01en02 stream_2020-05-27T16:30:29.974Z]# pwd
/var/lib/cloudera-host-monitor/ts/stream/partitions/stream_2020-05-27T16:30:29.974Z

 

I'm looking for data such as this or even just the tmpfs usage for all hosts:

File Systems

Disk Mount Point Usage
nas-c01.unix.dom.com:/n/mnt/n/mnt
10.2 GiB/127.9 GiB
/dev/mapper/centos-home/home
32.2 MiB/19.5 GiB
/dev/sda1/boot
255.0 MiB/496.7 MiB
cm_processes/run/cloudera-scm-agent/process
52.3 MiB/5.8 GiB
/dev/mapper/centos-root/
31.7 GiB/60.0 GiB
tmpfs/run
231.1 MiB/5.8 GiB
tmpfs/dev/shm
0 B/5.8 GiB

 

Thx,
TK

2 REPLIES 2
Highlighted

Re: Cloudera 6.3 Host Filesystem Metrics: How to retrieve these from a host via API or SQL calls?

Expert Contributor

@TCloud 

 

You can use the time series API to get the details.

http://cloudera.github.io/cm_api/apidocs/v19/path__timeseries.html

 

Below tsquery should work:

SELECT capacity WHERE hostId=<host_id> AND category = FILESYSTEM

 

Hope this helps,

Paras

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Re: Cloudera 6.3 Host Filesystem Metrics: How to retrieve these from a host via API or SQL calls?

Explorer

@TCloud :

 

API calls would be recommended, if you are doing sql calls it might be some burden to the underlying layer. If you try to API it will go via system and predefined things you can fetch.

 

~ Govind

Don't have an account?
Coming from Hortonworks? Activate your account here