1.2. Automation Dashboard を Ansible Automation Platform に統合する


Ansible Automation Platform インスタンスを Automation Dashboard 設定に統合して、データを収集、視覚化し、自動化に関する洞察を得ます。

手順

  1. RHEL ホストの https ポート 8447 で Automation Dashboard が実行されていることを確認します。この検証には、Ansible Automation Platform のログイン詳細が必要になります。

    注記

    ポート 8447 はデフォルトで有効になっていますが、これは設定可能です。

  2. Ansible Automation Platform インスタンスは、次の情報を使用して clusters.yml に追加されます。

    • フロントエンドアクセス用の Ansible Automation Platform の URL/ポート
    • read アクセス用に事前設定された Ansible Automation Platform OAuth トークン

      注記

      Ansible Automation Platform にアクセスできない場合は、管理者に問い合わせてください。

  3. Personal Access Token の設定詳細は、トークンベースの認証を使用した外部アプリケーションへのアクセスの設定 を参照してください。
  4. アクセストークンを設定したら、次のコマンドを実行します。

    cp clusters.example.yaml clusters.yaml
    vi clusters.yaml
    Copy to Clipboard Toggle word wrap
  5. 以下の方法を使用して、データのプルと結合のために、1 つ以上の Ansible Automation Platform インスタンス (同じ Ansible Automation Platform バージョン) を Automation Dashboard 設定に追加できます。

    注記

    Ansible Automation Platform インスタンスが 1 つしかない場合は、2 番目のエントリーを削除します。

    ---
    clusters:
      - protocol: https			<--- Normally https
        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
        verify_ssl: false		<--- Can be used when using self signed certs
        sync_schedules:
          - name: Every 5 minutes sync
            rrule: DTSTART;TZID=Europe/Ljubljana:20250630T070000 FREQ=MINUTELY;INTERVAL=5
            enabled: true
    
      - protocol: https
        address: aap2.example.com
        port: 443
        access_token: WRn2swiqg5spEwUndDkrJoCeg4Qwuw
        verify_ssl: true
        sync_schedules:
          - name: Every 5 minutes sync
            rrule: DTSTART;TZID=Europe/Ljubljana:20250630T070000 FREQ=MINUTELY;INTERVAL=5
            enabled: true
    Copy to Clipboard Toggle word wrap
  6. 次のコマンドを実行して、Automation Dashboard の設定を読み込んでアクティブ化します。

    podman cp clusters.yaml automation-dashboard-web:/
    podman exec automation-dashboard-web /venv/bin/python ./manage.py setclusters /clusters.yaml
    Copy to Clipboard Toggle word wrap

    参考までに、次の出力例を参照してください。

    podman exec automation-dashboard-web /venv/bin/python ./manage.py setclusters /clusters.yaml
    Check if table exists.
    Reading YML file.
    Adding cluster: address=my-aap.example.com
    
    INFO 2025-05-20 09:55:00,926 connector 187 140208297051968 Checking if is AAP 2.4 at https://my-aap.example.com:443
    INFO 2025-05-20 09:55:00,926 connector 187 140208297051968 Pinging api https://my-aap.example.com:443/api/v2/ping/
    INFO 2025-05-20 09:55:00,926 connector 187 140208297051968 Executing GET request to https://my-aap.example.com:443/api/v2/ping/
    
    ERROR 2025-05-20 09:55:00,032 connector 301 140025281152832 GET request failed with status 404
    Successfully set up AAP clusters
    Copy to Clipboard Toggle word wrap
    注記

    Automation Dashboard は、Ansible Automation Platform 2.4、2.5、および 2.6 インスタンスをチェックします。出力例に示されているように、これにより 404 エラーが発生する可能性があります。エラーの詳細は、この章の検証セクションを参照してください。

  7. 手動でデータを取得して Automation Dashboard の設定をテストするには、次のコマンドを使用します。

    podman exec 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.
    Copy to Clipboard Toggle word wrap
    注記

    テスト時間を短縮するには、日付間隔を短くすることを検討してください。形式は YYYY-MM-DD です。

    その後、journalctl を使用して進行状況を監視できます。

    sudo journalctl -fn10
    Copy to Clipboard Toggle word wrap
  8. ブラウザーを更新すると、Automation Dashboard 内で取得したデータが表示されます。

検証

インストール中にエラーメッセージが表示された場合は、次の表を参照してください。

Expand

問題

考えられる原因

ソリューション

401 エラー

これは、不正な認証情報やトークンなどの認証エラーを示す不正アクセスメッセージです。

clusters.yml でアクセストークンが正しいことを確認します。

404 エラー

“not found” メッセージで、何かが正しく設定されていないか、正しいエンドポイントを指していないことを示しています。

clusters.yml で使用されている Ansible Automation Platform インスタンスの URL が正しいことを確認します。

インストールが成功すると、次の 3 つのコンテナーサービスが実行されるはずです。

podman ps --all --format "{{.Names}}"

postgresql
automation-dashboard-task
automation-dashboard-web
Copy to Clipboard Toggle word wrap

次のコマンドを実行すると、コンテナーのログを確認できます。

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 ...
Copy to Clipboard Toggle word wrap

systemd を使用して、サービスがどのように実行されているかを確認できます。

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/user@1000.service
           ├─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
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat