Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory Sync and Ad-Hoc Commands are not send in Logs #15302

Open
4 of 9 tasks
valkiriaaquatica opened this issue Jun 26, 2024 · 3 comments
Open
4 of 9 tasks

Inventory Sync and Ad-Hoc Commands are not send in Logs #15302

valkiriaaquatica opened this issue Jun 26, 2024 · 3 comments

Comments

@valkiriaaquatica
Copy link

valkiriaaquatica commented Jun 26, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.

Feature type

Enhancement to Existing Feature
Logging

Feature Summary

Hi,
I'm using AAP and AWX for production and development enviroments , I have Logstash (formerly ELK) as the logging tool for have a log control.
I have used all the loggers that offer in the logging settings (as shown below) but when I want to get the logs from a Inventory Sync or a Ad-hoc command, not all the info that is shown in the IU or in API is shown in logs.

[
  "awx",
  "activity_stream",
  "job_events",
  "system_tracking",
  "broadcast_websocket"
]

Example: I sync a source of a Azure dynamic invetory, the log sent from AAP to logstash have the information of the background paybook used default that is project_udpate.yml playbook that Ansible uses default. That is fine, the problem comes when there is no information shown of the actual debug of inventory, as an example in the IU I receive this info where it gets the groups and hosts or in case of error also as an example

   21.385 INFO     Processing JSON output...
   21.388 INFO     Loaded 13 groups, 13 hosts
   21.578 INFO     Inventory import completed for 12345567in 0.2s

ERROR

[WARNING]:  * Failed to parse
/runner/project/azure/23456789.azure_rm.yml with
auto plugin: a batched request failed with status code 404, url /subscriptions/
23456789/providers/Microsoft.Compute/virtualMachine

So that debug info could be very useful to get it as an stdout send within the logs.
Main reason to do this is to be able to make dashboards of accounts with certain type of problem to get it more organized.

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Steps to reproduce

  1. Have a Inevtnory with some source prepared
  2. Deploy ELK (as a docker compose exmaple you can fllow tihis documentation which is really fast to deploy https://community.hetzner.com/tutorials/deploy-elk-stack-with-docker )
  3. Configure Logging in your AWX/AAP to send logs to the IP:port logstash configured
  4. Try to get the information of the debug of an inventory (no matter if its with error or not)

Current results

No logs of inventory debug are sent within the logs.

Sugested feature result

Add a new object in the Json or a new dict value like "stdout" where all the debug is collected so it can be analyzed after.

Additional information

No response

@djyasin
Copy link
Member

djyasin commented Jul 3, 2024

Hello @valkiriaaquatica,
Have you looked through our documentation regarding logging? If not, you can view that here You may be able to adjust the logs to suit your needs better.
Please let us know if that helps!

@valkiriaaquatica
Copy link
Author

Hi @djyasin ,
thanks for the repy.
I've tried with te options show in the documentation and with different Logging Aggregator Level Threshold but I no log from inventory_update was sent.

In the api/v2 the information that I want to receive in logs is: https://aap.domain.com/api/v2/inventory_updates/12345/events/_ that is in json format or https://aap.domain.com/api/v2/inventory_updates/72392/stdout/ but not in json format.

In the latest documentation is nothing show about inventory_updates.. but searching i found on https://docs.ansible.com/ansible-tower/3.3.5/html/administration/logging.html old AWX version that was job_status , I've tried but still do not work (probably because after that version job_status was deprecated).

So I've not yet how to send these logs..

Thanks in advance!

@thedoubl3j
Copy link
Member

Those endpoints are what you want to look at but they are not part of the log aggregator so they will not be found with the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants