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
I'm looking for data such as this or even just the tmpfs usage for all hosts:
10.2 GiB/127.9 GiB
32.2 MiB/19.5 GiB
255.0 MiB/496.7 MiB
52.3 MiB/5.8 GiB
31.7 GiB/60.0 GiB
231.1 MiB/5.8 GiB
0 B/5.8 GiB
You can use the time series API to get the details.
Below tsquery should work:
SELECT capacity WHERE hostId=<host_id> AND category = FILESYSTEM
Hope this helps,
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.
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.