-
Feature Request
-
Resolution: Unresolved
-
Normal
-
None
-
2.4, 2.5
-
False
-
-
False
This RFE is to add the value of the "Launched by" field on the job details to the "actor" field of the Activity Stream for scheduled job launches. Also, the "actor" information should be included in the summary_fields.
When a job is launched manually:
- you can view the job details in the UI and see the "Launched by" value
- this is the name of the person responsible for launching the job template
- the Activity Stream shows the "actor" which is the same value as the "Launched by" in the job details
When a job is launched via a schedule:
- you can view the job details in the UI and see the "Launched by" value
- this is the name of the schedule responsible for launching the job template
- however, the Activity Stream has no actor identified
Launched_by snippet of the Job Details for a job launched manually:
"launched_by": { "id": 1, "name": "admin", "type": "user", "url": "/api/controller/v2/users/1/" },
Launched_by snippet of the Job Details for a job launched via a schedule
"launched_by": { "id": 6, "name": "test schedule", "type": "schedule", "url": "/api/controller/v2/schedules/6/" },
Actual Activity Stream log event for Manual Job Launch:
{ '@timestamp': '2025-03-02T23:33:03.676Z', 'message': 'Activity Stream update entry for job', 'host': 'my.controller.node', 'level': 'INFO', 'logger_name': 'awx.analytics.activity_stream', 'stack_info': None, 'changes': { 'name': 'Org1 Demo Job Template', 'description': '', 'job_type': 'run', 'inventory': 'Org1 Inventory-2', 'project': 'Org1 Project-8', 'playbook': 'hello_world.yml', 'scm_branch': '', 'forks': 0, 'limit': '', 'verbosity': 0, 'extra_vars': '{}', 'job_tags': '', 'force_handlers': False, 'skip_tags': '', 'start_at_task': '', 'timeout': 0, 'use_fact_cache': False, 'execution_environment': None, 'job_template': 'Org1 Demo Job Template-9', 'allow_simultaneous': False, 'instance_group': None, 'diff_mode': False, 'job_slice_number': 0, 'job_slice_count': 1, 'webhook_service': '', 'webhook_credential': None, 'webhook_guid': '', 'id': 6, 'credentials': [], 'labels': [] }, 'relationship': '', 'actor': 'admin', < ---------------------- HERE 'operation': 'create', 'object1': 'job', 'object2': '', 'summary_fields': { 'job': [ { 'id': 6, 'name': 'Org1 Demo Job Template', 'description': '', 'status': 'pending', 'failed': False, 'elapsed': '0.000' } ], 'job_template': [ { 'id': 9, 'name': 'Org1 Demo Job Template', 'description': '' } ], 'actor': { 'id': 1, 'username': 'admin', 'first_name': '', 'last_name': '' } }, 'guid': '5631a627f776406cb655ef90d1829302', 'cluster_host_id': 'xx.xx.xx.xxx', 'tower_uuid': None }
Actual Activity Stream log event for Scheduled Job Launch:
{ '@timestamp': '2025-03-02T23:22:28.877Z', 'message': 'Activity Stream update entry for job', 'host': 'my.controller.node', 'level': 'INFO', 'logger_name': 'awx.analytics.activity_stream', 'stack_info': None, 'changes': { 'name': 'Org1 Demo Job Template', 'description': '', 'job_type': 'run', 'inventory': 'Org1 Inventory-2', 'project': 'Org1 Project-8', 'playbook': 'hello_world.yml', 'scm_branch': '', 'forks': 0, 'limit': '', 'verbosity': 0, 'extra_vars': '{}', 'job_tags': '', 'force_handlers': False, 'skip_tags': '', 'start_at_task': '', 'timeout': 0, 'use_fact_cache': False, 'execution_environment': None, 'job_template': 'Org1 Demo Job Template-9', 'allow_simultaneous': False, 'instance_group': None, 'diff_mode': False, 'job_slice_number': 0, 'job_slice_count': 1, 'webhook_service': '', 'webhook_credential': None, 'webhook_guid': '', 'id': 5, 'credentials': [], 'labels': [] }, 'relationship': '', 'actor': None, < ---------------------- HERE 'operation': 'create', 'object1': 'job', 'object2': '', 'summary_fields': { 'job': [ { 'id': 5, 'name': 'Org1 Demo Job Template', 'description': '', 'status': 'new', 'failed': False, 'elapsed': '0.000' } ], 'job_template': [ { 'id': 9, 'name': 'Org1 Demo Job Template', 'description': '' } ] }, 'guid': '03214745d8664d7da6f0919dda6dad96', 'cluster_host_id': 'xx.xx.xx.xxx', 'tower_uuid': None }
EXPECTED Activity Stream log event for Scheduled Job Launch:
{ '@timestamp': '2025-03-02T23:22:28.877Z', 'message': 'Activity Stream update entry for job', 'host': 'my.controller.node', 'level': 'INFO', 'logger_name': 'awx.analytics.activity_stream', 'stack_info': None, 'changes': { 'name': 'Org1 Demo Job Template', 'description': '', 'job_type': 'run', 'inventory': 'Org1 Inventory-2', 'project': 'Org1 Project-8', 'playbook': 'hello_world.yml', 'scm_branch': '', 'forks': 0, 'limit': '', 'verbosity': 0, 'extra_vars': '{}', 'job_tags': '', 'force_handlers': False, 'skip_tags': '', 'start_at_task': '', 'timeout': 0, 'use_fact_cache': False, 'execution_environment': None, 'job_template': 'Org1 Demo Job Template-9', 'allow_simultaneous': False, 'instance_group': None, 'diff_mode': False, 'job_slice_number': 0, 'job_slice_count': 1, 'webhook_service': '', 'webhook_credential': None, 'webhook_guid': '', 'id': 5, 'credentials': [], 'labels': [] }, 'relationship': '', 'actor': test schedule, < ---------------------- MODIFIED 'operation': 'create', 'object1': 'job', 'object2': '', 'summary_fields': { 'job': [ { 'id': 5, 'name': 'Org1 Demo Job Template', 'description': '', 'status': 'new', 'failed': False, 'elapsed': '0.000' } ], 'job_template': [ { 'id': 9, 'name': 'Org1 Demo Job Template', 'description': '' } ], < ---------------------- MODIFIED 'actor': < ---------------------- MODIFIED { < ---------------------- MODIFIED 'id': 6, < ---------------------- MODIFIED 'name:': 'test schedule', < ---------------------- MODIFIED 'description': '' < ---------------------- MODIFIED } }, 'guid': '03214745d8664d7da6f0919dda6dad96', 'cluster_host_id': 'xx.xx.xx.xxx', 'tower_uuid': None }