You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Marc Roos <M....@f1-outsourcing.eu> on 2019/09/26 19:58:45 UTC
Task list node
What would be the easiest way to list running tasks on a
node/agent/slave?
RE: Task list node
Posted by Marc Roos <M....@f1-outsourcing.eu>.
Yes thanks managed to get them with this
curl -s --user test:xxx
--cacert /etc/pki/ca-trust/source/ca-test.crt
-X GET https://m01.local:5050/state | jq '.frameworks[].tasks[] |
select(.state=="TASK_RUNNING") | del(.statuses, .discovery, .container,
.health_check) | "\(.name) \(.state) \(.slave_id)" '
-----Original Message-----
To: user
Subject: Re: Task list node
You can just mimic UI behaviour and use /state endpoint and filter it
with jq.
wt., 1 paź 2019 o 13:56 Marc Roos <M....@f1-outsourcing.eu> napisał(a):
Hmmm, if do something like this[0] I get only 3 tasks, and the
mesos gui
on 5050 is showing all (I guess, at least more than three) Also if
I
grep the unfiltered json output for a task string, it does not find
it.
[0]
curl -s --user test:xxx --cacert
/etc/pki/ca-trust/source/ca-test.crt -X
GET https://m01.local:5050/tasks | jq '.tasks[] |
select(.state=="TASK_RUNNING")'
curl -s --user test:xxx --cacert
/etc/pki/ca-trust/source/ca-test.crt -X
GET https://m01.local:5050/master/tasks | jq '.tasks[] |
select(.state=="TASK_RUNNING") | del(.statuses, .discovery,
.health_check, .container) | "\(.name) \(.state) \(.slave_id)" '
-----Original Message-----
To: user
Subject: Re: Task list node
You can list them with agent containers endpoint
http://mesos.apache.org/documentation/latest/endpoints/slave/contai
ners/
Or with master tasks endpoint and filter them localy with jq
http://mesos.apache.org/documentation/latest/endpoints/master/tasks
/
czw., 26 wrz 2019 o 22:09 Marc Roos <M....@f1-outsourcing.eu>
napisał(a):
What would be the easiest way to list running tasks on a
node/agent/slave?
Re: Task list node
Posted by Tomek Janiszewski <ja...@gmail.com>.
You can just mimic UI behaviour and use /state endpoint and filter it with
jq.
wt., 1 paź 2019 o 13:56 Marc Roos <M....@f1-outsourcing.eu> napisał(a):
>
>
> Hmmm, if do something like this[0] I get only 3 tasks, and the mesos gui
> on 5050 is showing all (I guess, at least more than three) Also if I
> grep the unfiltered json output for a task string, it does not find it.
>
> [0]
> curl -s --user test:xxx --cacert /etc/pki/ca-trust/source/ca-test.crt -X
> GET https://m01.local:5050/tasks | jq '.tasks[] |
> select(.state=="TASK_RUNNING")'
>
> curl -s --user test:xxx --cacert /etc/pki/ca-trust/source/ca-test.crt -X
> GET https://m01.local:5050/master/tasks | jq '.tasks[] |
> select(.state=="TASK_RUNNING") | del(.statuses, .discovery,
> .health_check, .container) | "\(.name) \(.state) \(.slave_id)" '
>
>
> -----Original Message-----
> To: user
> Subject: Re: Task list node
>
> You can list them with agent containers endpoint
> http://mesos.apache.org/documentation/latest/endpoints/slave/containers/
> Or with master tasks endpoint and filter them localy with jq
> http://mesos.apache.org/documentation/latest/endpoints/master/tasks/
>
> czw., 26 wrz 2019 o 22:09 Marc Roos <M....@f1-outsourcing.eu>
> napisał(a):
>
>
>
> What would be the easiest way to list running tasks on a
> node/agent/slave?
>
>
>
>
>
>
>
>
>
>
>
RE: Task list node
Posted by Marc Roos <M....@f1-outsourcing.eu>.
Hmmm, if do something like this[0] I get only 3 tasks, and the mesos gui
on 5050 is showing all (I guess, at least more than three) Also if I
grep the unfiltered json output for a task string, it does not find it.
[0]
curl -s --user test:xxx --cacert /etc/pki/ca-trust/source/ca-test.crt -X
GET https://m01.local:5050/tasks | jq '.tasks[] |
select(.state=="TASK_RUNNING")'
curl -s --user test:xxx --cacert /etc/pki/ca-trust/source/ca-test.crt -X
GET https://m01.local:5050/master/tasks | jq '.tasks[] |
select(.state=="TASK_RUNNING") | del(.statuses, .discovery,
.health_check, .container) | "\(.name) \(.state) \(.slave_id)" '
-----Original Message-----
To: user
Subject: Re: Task list node
You can list them with agent containers endpoint
http://mesos.apache.org/documentation/latest/endpoints/slave/containers/
Or with master tasks endpoint and filter them localy with jq
http://mesos.apache.org/documentation/latest/endpoints/master/tasks/
czw., 26 wrz 2019 o 22:09 Marc Roos <M....@f1-outsourcing.eu>
napisał(a):
What would be the easiest way to list running tasks on a
node/agent/slave?
Re: Task list node
Posted by Tomek Janiszewski <ja...@gmail.com>.
You can list them with agent containers endpoint
http://mesos.apache.org/documentation/latest/endpoints/slave/containers/
Or with master tasks endpoint and filter them localy with jq
http://mesos.apache.org/documentation/latest/endpoints/master/tasks/
czw., 26 wrz 2019 o 22:09 Marc Roos <M....@f1-outsourcing.eu> napisał(a):
>
> What would be the easiest way to list running tasks on a
> node/agent/slave?
>
>
>
>
>
>
>
>