mirror of
https://github.com/ansible/awx.git
synced 2026-07-11 08:18:07 -02:30
Logging Integration, ELK docker-compose as update file
This commit is contained in:
@@ -16,8 +16,10 @@ from django.utils import timezone
|
||||
# AWX
|
||||
from awx.main.models.fact import Fact
|
||||
from awx.main.models.inventory import Host
|
||||
from awx.main.utils import format_for_log
|
||||
|
||||
logger = logging.getLogger('awx.main.commands.run_fact_cache_receiver')
|
||||
data_logger = logging.getLogger('awx.analytics.system_tracking')
|
||||
|
||||
|
||||
class FactBrokerWorker(ConsumerMixin):
|
||||
@@ -83,6 +85,7 @@ class FactBrokerWorker(ConsumerMixin):
|
||||
# Create new Fact entry
|
||||
fact_obj = Fact.add_fact(host_obj.id, module_name, self.timestamp, facts)
|
||||
logger.info('Created new fact <fact_id, module> <%s, %s>' % (fact_obj.id, module_name))
|
||||
data_logger.info('Received message with fact data', extra=format_for_log({module_name: facts}, kind="fact"))
|
||||
return fact_obj
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user