how to put Job into pending state

22 views
Skip to first unread message

Wajid Baig

unread,
Jun 28, 2022, 9:29:30 AM6/28/22
to AWX Project
Hi, 

I'm tasked to monitor AWX and alert if jobs stay in pending state for long time. Fr this I pursued different AWX APIs without luck. So, posting following questions. 

 Q1) How can make a job go into pending status?
 Q2) Is there any API to get all jobs in pending state?

Please help!

Thanks in advance,
AB

rakesh boinapally

unread,
Jun 28, 2022, 9:35:30 AM6/28/22
to awx-p...@googlegroups.com
Api/v2/metrics should provide you pending jobs.
Second if you want to make jobs going into pending Postgres database if it gets filled up jobs  will go into pending that means you can make Postgres file system to fill up.
Other option is deploy awx operator version newer one and awx older version if your deployment is Kubernetes.

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/8b8a216d-6e46-4840-8d7f-048674b9d817n%40googlegroups.com.

AWX Project

unread,
Jun 29, 2022, 3:27:57 PM6/29/22
to AWX Project
Hi!

you can get the current # pending jobs by counting the output from /api/v2/jobs?status=pending, or by using the /api/v2/metrics endpoint

You can "keep" the jobs in pending state by disabling all of your instances -- this will prevent any pending jobs from turning into running state

AWX Team

Reply all
Reply to author
Forward
0 new messages