Created on 12-05-2017 07:37 AM - edited 09-16-2022 05:35 AM
Hi Guys,
I trying to get all the finished applications ( which is not running, it may killed, success etc ...), and using the cloudera manager API, but with no success, can anyone help what i'm missing in the below command, i'm collecting the metrics each 5 minutes
STARTDATE=`date -d " -5 minute" "+%FT%T"`
result=`curl -u 'admin' : 'admin' 'http://cloudera_manager_host:7180/api/v11/clusters/cluster/services/yarn/yarnApplications?from='$STA...)'`
Created 06-20-2018 11:43 PM
You've probably figured it out, but for other readers: just remove the single quotes ' ' around $STARTDATE in the url.
(...)yarnApplications?from=${STARTDATE}&filters(...)
Created 09-23-2018 05:59 PM
Hello Sir,
I used the following command in the UI
https://<HOSTNAME:PORT> /api/v16/clusters/cluster/services/yarn/yarnApplications?from=2018-09-22T00:00:01Z&to=2018-09-22T23:59:59Z&filter(user=xxxx)
The result does not get filtered by user. I always the result for all users
I appreciate your suggestions on this.
Thanks,
Created on 09-23-2018 09:00 PM - edited 09-24-2018 03:59 AM
@anrama try using filter=user=xxxx
STARTDATE=`date -d " -5 minute" "+%FT%T"`
result=`curl -u 'admin' : 'admin' 'cloudera_manager_host:port/api/v11/clusters/cluster/services/yarn/yarnApplications?from='$STARTDATE'&limit=1000&filter=user=xxx'`
echo $result
Created 09-24-2018 07:02 AM
Great .your suggestion worked. It worked.
Thanks,
Created 11-12-2018 01:36 PM
Created 11-22-2018 08:20 AM
@anrama You can user the filter=status!=Running