Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ ifdef::context[:parent-context: {context}]

= View key usage metrics with {AutomationDashboardName}

The {AutomationDashboardName} utility is a web-based container application that provides key metrics related to job execution, efficiency, and the value derived from automation. {AutomationDashboardName} uses automation metrics to provide automation usage data from {PlatformNameShort}. You can use this data to determine the cost of performing tasks manually versus the cost of performing tasks through automation. This comparison is used to demonstrate the savings achievable through automation.
[role="_abstract"]
The {AutomationDashboardName} utility is a web-based container application that provides key metrics related to job execution, efficiency, and the value derived from automation.

{AutomationDashboardName} uses automation metrics to provide automation usage data from {PlatformNameShort}.
You can use this data to determine the cost of performing tasks manually compared to the cost of performing tasks through automation.
This comparison is used to demonstrate the savings achievable through automation.

{AutomationDashboardName} is designed to help you:

* Get a clear overview of the automation occurring in your environment.

* Track metrics, like time saved and errors reduced, to quantify the benefits of automation.
* Track metrics, such as time saved and errors reduced, to quantify the benefits of automation.

* Analyze job execution times and failure rates to pinpoint areas where automation can be improved.

Expand All @@ -26,6 +31,8 @@ include::automation-dashboard/proc-installing-automation-dashboard.adoc[leveloff

include::automation-dashboard/proc-integrating-automation-dashboard.adoc[leveloffset=+1]

include::automation-dashboard/proc-verifying-cluster-access-tokens.adoc[leveloffset=+2]

include::automation-dashboard/proc-uninstalling-automation-dashboard.adoc[leveloffset=+1]

ifdef::parent-context[:context: {parent-context}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Do not attempt to install {AutomationDashboardName} on the same host(s) as {Plat

.Procedure

. Download the latest installer tarball from access.redhat.com. Navigate to Downloads > Red Hat Ansible Automation Platform Product Software.
. Download the latest installer tarball from access.redhat.com. Navigate to Downloads > Red Hat Ansible Automation Platform Product Software.
. Copy the installation source file to your RHEL 9 host.
. Untar the installation source. This will require ~500Mb. of disk space. Throughout this example we will use the ec2-user home directory: `/home/<username>`.
+
Expand Down Expand Up @@ -82,7 +82,7 @@ The values for *Name*, *Organization*, and HTTPS port number for {PlatformNameSh
* Scope: read
... Store this access token value. The access token is used in `clusters.yaml`.
+
. Copy the example inventory and modify it before running the installer.
. Copy the example inventory and modify it before running the installation program.
+
[source,bash]
----
Expand Down Expand Up @@ -174,7 +174,7 @@ bundle_install=true
bundle_dir='{{ lookup("ansible.builtin.env", "PWD") }}/bundle'
----

. Run the installer.
. Run the installation program.
+
[source,bash]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

= Integrating {AutomationDashboardName} with your {PlatformNameShort}

[role="_abstract"]
Integrate your {PlatformNameShort} instances into the {AutomationDashboardName} configuration in order to collect and visualise data and gain insights into your automation.

.Procedure
Expand All @@ -18,7 +19,8 @@ Port 8447 is enabled by default, but this is configurable.
====
. Your {PlatformNameShort} instances are added into `clusters.yml` using the following information:
* Your {PlatformNameShort} URLs/ports for front-end access
* A preconfigured {PlatformNameShort} OAuth token for _read_ access
* A preconfigured {PlatformNameShort} OAuth access token and refresh for _read_ access
* OAuth2 client credentials
+
[NOTE]
====
Expand Down Expand Up @@ -48,6 +50,10 @@ clusters:
address: my-aap.example.com <--- Can use IP or FQDN without http(s)://
port: 443 <--- Normally 443
access_token: sampleToken <--- Your preconfigured Ansible Automation Platform read access token
Platform read access token
refresh_token: myRefreshToken
client_id: myClientID
client_secret: myClientSecret
verify_ssl: false <--- Can be used when using self signed certs
sync_schedules:
- name: Every 5 minutes sync
Expand All @@ -65,6 +71,12 @@ clusters:
enabled: true

----
+
[NOTE]
====
The `access_token`, `refresh_token`, and `client_secret` are stored in the {AutomationDashboardName} database.
All three values are encrypted for security.
====

. Run the following commands to load and activate your {AutomationDashboardName} configuration:

Expand All @@ -74,7 +86,14 @@ clusters:
podman cp clusters.yaml automation-dashboard-web:/
podman exec automation-dashboard-web /venv/bin/python ./manage.py setclusters /clusters.yaml
----
For reference, see the following example output:
+

[NOTE]
====
{AutomationDashboardName} uses `refresh_token`, `client_id`, and `client_secret` to automatically obtain a new `access_token` and `refresh_token` when the current token expires.
The utility uses the ping endpoint to detect the {PlatformNameShort} version and determine the correct token refresh endpoint.
====
*Example*
+
[source,bash]
----
Expand All @@ -100,132 +119,20 @@ Successfully set up AAP clusters
+
[source,bash]
----
podman exec automation-dashboard-web /venv/bin/python ./manage.py syncdata --since=2025-04-01 --until=2025-06-01
podman exec -it automation-dashboard-web /venv/bin/python ./manage.py syncdata --since=2025-04-01 --until=2025-06-01
Successfully created Sync task for Cluster https://my-aap.example.com:443.
----
+

[NOTE]
====
Consider using a short date interval to reduce test time. The format is YYYY-MM-DD.
====
You can then use `journalctl` to monitor progress:

+
[source,bash]
----
sudo journalctl -fn10
----

. Refresh your browser to view retrieved data within your {AutomationDashboardName}.

.Verification
If you encounter error messages during installation, consult the following table:
[cols="1,2,2a"]
|===
|Issue |Possible Cause |Solution
|401 errors
|This is an unauthorized access message indicating authentication errors such as incorrect credentials or tokens
|Verify that your access token is correct in `clusters.yml`
|404 errors
|This is a “not found” message indicating that something isn’t configured correctly or pointing to the correct endpoint
|Verify that your {PlatformNameShort} instance URLs used in `clusters.yml` are correct
|===

A successful installation should be running the following three container services:

[source,bash]
----
podman ps --all --format "{{.Names}}"

postgresql
automation-dashboard-task
automation-dashboard-web
----

You can check your container logs by running the following:

[source,bash]
----
journalctl CONTAINER_NAME=container (where container equals one of postgresql automation-dashboard-task or automation-dashboard-web)

For example:
journalctl CONTAINER_NAME=automation-dashboard-task
May 22 13:02:07 automation-dashboard automation-dashboard-task[1607]: [wait-for-migrations-dashboard.sh] Waiting for database migrations...
May 22 13:02:07 automation-dashboard automation-dashboard-task[1607]: [wait-for-migrations-dashboard.sh] Attempt 1
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,636 periodic 2 140568371550016 Starting sync task.
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,636 periodic 2 140568371550016 Retrieving clusters inform>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,747 periodic 2 140568371550016 Retrieved 1 clusters.
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 periodic 2 140568371550016 Retrieving data from clust>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Checking Ansible Automation Platform version at h>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Checking if is Ansible Automation Platform 2.5 at>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Pinging api https://ec2-3>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Executing GET request to >
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: ERROR 2025-05-22 13:02:13,820 connector 2 140568371550016 GET request failed with >
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:13,821 connector 2 140568371550016 Checking if is Ansible Automation Platform 2.4 at>
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:13,821 connector 2 140568371550016 Pinging api https://ec2-3>
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:13,821 connector 2 140568371550016 Executing GET request to >
May 22 13:02:16 automation-dashboard automation-dashboard-task[1607]: ERROR 2025-05-22 13:02:16,892 connector 2 140568371550016 GET request failed with ...
----

You can check how the services are running by using `systemd`:

[source,bash]
----
systemctl status --user

● automation-dashboard
State: running
Units: 76 loaded (incl. loaded aliases)
Jobs: 0 queued
Failed: 0 units
Since: Thu 2025-05-22 13:02:07 UTC; 22min ago
systemd: 252-51.el9
CGroup: /user.slice/user-1000.slice/[email protected]
├─app.slice
│ ├─automation-dashboard-task.service
│ │ └─1607 /usr/bin/conmon --api-version 1 -c 84e46532e8ca31b0cadb037479289d030103aa01b7a1591e62b83b17f031e47d -u 84e46532e8ca31b0cadb037479>
│ ├─automation-dashboard-web.service
│ │ └─1608 /usr/bin/conmon --api-version 1 -c d060f3e3fb2b4c4c5c588149253beed83c78ccc9c9a8c1bf4c96157142a210dc -u d060f3e3fb2b4c4c5c58814925>
│ ├─dbus-broker.service
│ │ ├─1621 /usr/bin/dbus-broker-launch --scope user
│ │ └─1624 dbus-broker --log 4 --controller 9 --machine-id 612db98503014199bfd8c788c8d3da58 --max-bytes 100000000000000 --max-fds 2500000000>
│ └─postgresql.service
│ └─1614 /usr/bin/conmon --api-version 1 -c eec61745cb6fc3a89a4f7475d7ef63b5899699157d943c2f16a3243311927bef -u eec61745cb6fc3a89a4f7475d7>
├─init.scope
│ ├─1093 /usr/lib/systemd/systemd --user
│ └─1128 "(sd-pam)"
└─user.slice
├─libpod-84e46532e8ca31b0cadb037479289d030103aa01b7a1591e62b83b17f031e47d.scope
│ └─container
│ ├─1619 /usr/bin/dumb-init -- /usr/bin/launch_dashboard_task.sh
│ └─1681 /venv/bin/python periodic.py
├─libpod-d060f3e3fb2b4c4c5c588149253beed83c78ccc9c9a8c1bf4c96157142a210dc.scope
│ └─container
│ ├─1617 /usr/bin/dumb-init -- /usr/bin/launch_dashboard_web.sh
│ ├─1646 /usr/bin/python3.9 /usr/local/bin/supervisord -c /etc/supervisord_dashboard_web.conf
│ ├─1877 /bin/bash /usr/local/bin/stop-supervisor
│ ├─1878 "nginx: master process nginx -g daemon off;"
│ ├─1879 /venv/bin/uwsgi /etc/tower/uwsgi.ini
│ ├─1880 "nginx: worker process"
│ ├─1881 "nginx: worker process"
│ ├─1882 "nginx: worker process"
│ ├─1883 "nginx: worker process"
│ ├─1884 /venv/bin/uwsgi /etc/tower/uwsgi.ini
│ ├─1885 /venv/bin/uwsgi /etc/tower/uwsgi.ini
│ ├─1886 /venv/bin/uwsgi /etc/tower/uwsgi.ini
│ ├─1887 /venv/bin/uwsgi /etc/tower/uwsgi.ini
│ └─1888 /venv/bin/uwsgi /etc/tower/uwsgi.ini
├─libpod-eec61745cb6fc3a89a4f7475d7ef63b5899699157d943c2f16a3243311927bef.scope
│ └─container
│ ├─1623 postgres
│ ├─1869 "postgres: logger "
│ ├─1871 "postgres: checkpointer "
│ ├─1872 "postgres: background writer "
│ ├─1873 "postgres: walwriter "
│ ├─1874 "postgres: autovacuum launcher "
│ ├─1875 "postgres: stats collector "
│ ├─1876 "postgres: logical replication launcher "
│ └─1889 "postgres: aapdashboard aapdashboard 172.31.28.99(39338) idle"
└─podman-pause-b6c4e853.scope
└─1359 catatonit -P
----
+
. Refresh your browser to view retrieved data within your {AutomationDashboardName}.
Loading