Watching AWX: Status Views, Notifications, Logs, and Prometheus Metrics
Logs: AWX Pods, Receptor Nodes, and Where to Look First
AWX logs all events that happen on the system, including job starts, completions, and failures, as well as changes to inventory, hosts, settings, notifications, execution environments, and every other resource. You can view these in the activity streams view, but you can also configure AWX to send logs to an external logging aggregator like Splunk or Logstash. This is covered in a later section.
On another note, when you run a job, you can enable verbose logging to get more details about the execution. This can be helpful when troubleshooting issues with a playbook or a job template.
AWX works using different pods. When you run kubectl -n awx get pods, you will see different pods running, for example:
awx-operator-controller-manager-: The operator that manages the AWX deployment. It is responsible for creating and managing the different resources needed to run AWX on Kubernetes.awx-postgres-15-0: The PostgreSQL database used by AWX to store all the data. It runs as a StatefulSet pod, so the name uses the PostgreSQL major version (15 on current operators, 13 on older ones) and an ordinal index instead of a random suffix.awx-web-: The web interface of AWX.awx-task-: Handles the processing of tasks in AWX. It executes automation jobs, processes user commands, and performs other background work necessary for AWX operations.automation-job-: The pod that runs the job. It is created when you run a job and deleted when the job is finished.
You can check the logs of each pod by running the following command:
kubectl -n awx logs -f
Alternatively, you can check the logs of postgres, web, and task pods at once by running:
kubectl -n awx logs -l app.kubernetes.io/part-of=awx -f
AWX in Action
Ansible Orchestration at ScaleEnroll now to unlock all content and receive all future updates for free.
