#!/bin/sh

case $1 in
   config)
        cat <<'EOM'
multigraph tower_jobs
graph_title Running Jobs breakdown
graph_vlabel job count
graph_category tower
running.label Running jobs
waiting.label Waiting jobs
pending.label Pending jobs
EOM
        exit 0;;
esac

printf "running.value "
awx-manage stats --stat jobs_running
printf "\n"

printf "waiting.value "
awx-manage stats --stat jobs_waiting
printf "\n"

printf "pending.value "
awx-manage stats --stat jobs_pending
printf "\n"
