How to view all the running jobs in Rundeck triggered by me from different projects

61 views
Skip to first unread message

Girish BL

unread,
May 10, 2024, 9:16:37 AM5/10/24
to rundeck-discuss
I am working in the Release management project where am deploying 20 -30 jobs in an hour from different projects.

Its hard to check all the job status manually by checking each job.


So I want to check is there any option in rundeck to view all the jobs (in progress/completed/failed) triggered by me.

rac...@rundeck.com

unread,
May 10, 2024, 10:07:44 AM5/10/24
to rundeck-discuss
Hi!

Go to the Activity page (left bar), click on the "search" button, and then put your username in the "username" field and press the "search" button. Also, you can save this as a filter ("Save as a filter" button).

Regards.

Girish BL

unread,
May 13, 2024, 9:09:11 AM5/13/24
to rundeck-discuss
Hi

Thanks for your suggestion.

It gives only job status/ details for that particular job . But I need to check all the job details which are triggered by myself irrespective of projects(As am working on multiple projects)

Thanks

Girish BL

unread,
May 13, 2024, 9:09:11 AM5/13/24
to rundeck-discuss
Thanks for your suggestion but it will fetch the job details only for the particular app/project, but am looking for the jobs status for all the apps/projects in the rundeck which are triggered by me.

On Friday, May 10, 2024 at 7:37:44 PM UTC+5:30 rac...@rundeck.com wrote:

rac...@rundeck.com

unread,
May 13, 2024, 1:38:21 PM5/13/24
to rundeck-discuss

Hi!

You’re right. The other way is via Rundeck API: get the projects, then the jobs ID by the user, and then the exec info. I made a script example that does this in JSON format (requires jq tool), feel free to use and improve it:

#!/bin/sh cat <<EOF Usage: $0 username Example: $0 bob EOF if [ $# -eq 0 ] then echo "The user wasn't supplied" else # protocol protocol="http" # basic rundeck info rdeck_host="localhost" rdeck_port="4440" rdeck_api="46" rdeck_token="As4F70JTdEYZOyXP9SDv3d3KGFTrIdC9" for i in $(curl -s --location "http://$rdeck_host:$rdeck_port/api/$rdeck_api/projects" --header "Accept: application/json" --header "X-Rundeck-Auth-Token: $rdeck_token" | jq -r .[].name); do for k in $(curl -s --location "http://$rdeck_host:$rdeck_port/api/$rdeck_api/project/$i/jobs" --header "Accept: application/json" --header "X-Rundeck-Auth-Token: $rdeck_token" --header "Content-Type: application/json" | jq -r .[].id); do for q in $(curl -s --location "http://$rdeck_host:$rdeck_port/api/$rdeck_api/job/$k/executions" --header "Accept: application/json" --header "X-Rundeck-Auth-Token: $rdeck_token" --header "Content-Type: application/json" | jq -r '.executions[] | "\(.id) \(.user)"' | grep $1 | cut -d ' ' -f1); do curl -s --location -g "http://$rdeck_host:$rdeck_port/api/$rdeck_api/execution/$q" --header "Accept: application/json" --header "X-Rundeck-Auth-Token: $rdeck_token" --header "Content-Type: application/json" | jq done done done fi

Regards.

Girish BL

unread,
May 14, 2024, 8:53:55 AM5/14/24
to rundeck-discuss
Thank you,

Let me work on this.
Reply all
Reply to author
Forward
0 new messages