Commit Graph

49 Commits

Author SHA1 Message Date
Martin Juhl
321aa3b01d Update handlers.py
The setFormatter tries to create the external.log file.. So we should check if LOG_AGGREGATOR_AUDIT is active here as well
2019-10-29 11:24:11 -04:00
Ryan Petrello
a076e84a33 add a settings flag for writing all external logs to disk 2019-10-09 13:54:54 -04:00
Ryan Petrello
dfa8d44eb8 don't ship external logs from the main thread of the dispatcher
this is a fairly esoteric change that attempts to work around a bug
we've discovered in cpython itself

context: https://github.com/ansible/awx/issues/4181
2019-06-27 16:24:36 -04:00
AlanCoding
d3f047d731 Move dynamic log level logic to filter 2019-05-22 14:00:39 -04:00
Ryan Petrello
b1d75327e3 add the ability to toggle DEBUG logging on dynamically 2019-05-16 07:58:31 -04:00
Ryan Petrello
daeeaf413a clean up unnecessary usage of the six library (awx only supports py3) 2019-01-25 00:19:48 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
Ryan Petrello
6bd9792518 default HTTP-based log emits to HTTPS
see: https://github.com/ansible/awx/issues/2048
2018-07-09 11:52:04 -04:00
AlanCoding
015b19d8c3 interpret null protocol as logging.NullHandler 2018-05-30 15:21:51 -04:00
AlanCoding
ac20aa954a Replace logging-related restart with dynamic handler
refactor existing handlers to be the related
  "real" handler classes, which are swapped
  out dynamically by external logger "proxy" handler class

real handler swapout only done on setting change

remove restart_local_services method
get rid of uWSGI fifo file

change TCP/UDP return type contract so that it mirrors
  the request futures object
add details to socket error messages
2018-05-02 09:47:22 -04:00
Ryan Petrello
982539f444 fix a bug when testing UDP-based logging configuration
see: https://github.com/ansible/ansible-tower/issues/7868
2018-01-29 12:05:51 -05:00
AlanCoding
67867cf0c8 flake8: comply with new E722 rule 2017-12-01 12:16:44 -05:00
Matthew Jones
c7a85d9738 Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -04:00
Alan Rominger
047624a857 Merge pull request #6944 from AlanCoding/splunk_host
handle Splunk hostname case from support
2017-07-10 21:07:12 -04:00
AlanCoding
459c33d272 More consistently provide fields in job_events logger
* Change scheme from using event dict to JobEvent object
* Add processing to grok object fields
* Allow override of provided formatter in case of future issues
2017-07-10 10:34:04 -04:00
AlanCoding
d23e11c43c handle Splunk hostname case from support 2017-07-07 21:03:16 -04:00
Aaron Tan
9874e123be Allow specifying log handler level. 2017-07-06 09:39:54 -04:00
Chris Meyers
fee16fe391 Merge pull request #6588 from chrismeyersfsu/feature-fact_cache
initial tower fact cache implementation
2017-06-22 09:58:28 -04:00
Ryan Petrello
45bdd9f747 improve readability of the honcho console logs in the dev environment
* colorize uwsgi and celery logs; DEBUG lines are green, WARN lines
  are yellow, ERROR lines (and tracebacks) are red
* pretty-print fact callback receiver JSON
* simplify the uwsgi log format so it's more legible
2017-06-22 09:19:32 -04:00
Chris Meyers
965159a1fb rename store_facts to use_fact_cache 2017-06-21 13:45:27 -04:00
Chris Meyers
4c118159ed system_tracking logging for fact cache 2017-06-21 13:45:27 -04:00
Matthew Jones
e1e83598e9 Merge branch 'release_3.1.3' into devel
* release_3.1.3: (52 commits)
  ack fact scan messages
  making ldap user/group search fields into codemirror instances
  removing UI parsing for LDAP User and Group Search fields
  Allow exception view to accept all valid HTTP methods.
  Restore ability of parsing extra_vars string for provisioning callback.
  Fix up backup/restore role broken in f7a8e45809758322d9ee41c5305850dd70ed5faf
  Stop / start ansible-tower-service during restores
  value_to_python should encode lookup fields as ascii
  fix brace interpolation on standard out pane
  Adjust some hardcoded usages of 'awx' to use 'aw_user' and 'aw_group'.
  Pull Spanish updates from Zanata
  Temporarily grant awx user createdb role
  Stop giving ownership of backups to postgres
  don't display chunked lines'
  Add dropdown li truncation with ellipsis
  CTiT -> adhoc modules should allow the user to add new modules
  Remove task that was replacing the supervisor systemd tmp file
  Fix failing supervisorctl commands on RH-based distros
  Give ownership of the supervisor socket to awx
  Setting for external log emissions cert verification
  ...
2017-04-28 13:57:04 -04:00
Aaron Tan
8d2ee8c30f Refactor log handler and support TCP/UDP communications 2017-04-25 11:07:57 -04:00
AlanCoding
3af0f505d8 Setting for external log emissions cert verification
Stopgap solution for issue for 3.1.3 where Splunk servers with a
self-signed certificate could not receive logs from Tower.
Users should set `LOG_AGGREGATOR_VERIFY_CERT = False` in settings
to use this.
2017-04-17 14:50:01 -04:00
Alan Rominger
f3dd7f7987 Remove async from logging test kwargs 2017-04-12 09:22:50 -04:00
Matthew Jones
1c8bc62e38 Merge branch 'release_3.1.2' into devel
* release_3.1.2: (33 commits)
  updating changelog for 3.1.2
  Add back SRC_ONLY_PKGS
  Fix ubuntu 14 restart service list pt 2
  Make sure the insight playbook fetch doesn't quote user and pass
  Add requirements/vendor to gitignore
  Conditionally install from local python dependencies in spec file
  Remove requirements/vendor on make clean.
  Update brew-srpm target to generate local requirements files
  Get offline pip installs working
  Add clean-dist target
  Navigate back to the jobDetails state when the user clicks outside the host event modal.
  Don't use jinja quote filter on insights username or password
  fix legacy standard out
  Fixed permissions typo
  add test, restore old behavior in api test
  create _survey_element_validation and use it for updating extra_vars
  Do not set the default if the field was not passed in to kwargs_extra_vars
  Remove log aggregator port required mark.
  Modify according to review feedback.
  Host Event json should be read-only
  ...
2017-03-31 10:36:02 -04:00
Aaron Tan
07e7e4cfd0 Modify according to review feedback. 2017-03-24 11:35:45 -04:00
Ryan Petrello
a69dfced74 Merge remote-tracking branch 'origin/release_3.1.2' into devel 2017-03-21 10:39:16 -04:00
Aaron Tan
f69c2569d6 Smarter log aggregator host name generation. 2017-03-20 13:20:16 -04:00
Ryan Petrello
98ad2684d3 when async log shipping fails, log an explanation 2017-03-15 17:23:44 -04:00
Ryan Petrello
b3733d233e always use async http logging - even in celery workers
additionally, add a timeout to requests to avoid thread starvation

see: #5718
see: #5729
2017-03-15 13:17:01 -04:00
Ryan Petrello
8c1de7f109 add an API endpoint for testing external log aggregrator connectivity
see: #5164
2017-03-09 13:19:56 -05:00
Chris Meyers
0b04001b15 host may be None, account for that 2017-02-23 14:31:24 -05:00
Chris Meyers
e78377dcfc remove formatters dependency on settings 2017-02-21 14:06:20 -05:00
Chris Meyers
af9975c6af add a new logger, awx.analytics.performance.api
* Used to log API timing information
2017-02-17 15:35:03 -05:00
AlanCoding
fbe712dcd1 refactor adding logger loop from PR review 2017-02-13 15:45:05 -05:00
AlanCoding
603dfea580 get rid of HTTPSHandler subclass which is not needed 2017-02-13 15:07:33 -05:00
AlanCoding
d912013db7 fix some bugs with the logging reload approach 2017-02-10 15:57:24 -05:00
AlanCoding
cdf28f1bca remove old logger reconfig method 2017-02-10 11:54:19 -05:00
AlanCoding
91031cbbc8 modularize logging config in proper Django fashion 2017-02-10 11:38:32 -05:00
Alan Rominger
8c1be80215 Merge pull request #5277 from AlanCoding/various_logging_updates
Update logging docs & switch out null logger
2017-02-09 15:56:09 -05:00
Ryan Petrello
cee0b29fef clarify a logging handler docstring 2017-02-09 15:16:58 -05:00
Ryan Petrello
1b9a2e4a36 correctly set the Authorization header for non-async log handling
see: #5276
2017-02-09 15:14:39 -05:00
AlanCoding
1c6f037076 stop using Django NullHandler which is being removed in future version 2017-02-09 11:53:51 -05:00
Ryan Petrello
669012138e refactor utils.handlers.HTTPSHandler's usage of django settings 2017-02-08 16:34:00 -05:00
Ryan Petrello
2c447942d5 add tests for our custom log aggregator/handler 2017-02-08 14:19:32 -05:00
AlanCoding
cc4aa49556 pool restart with thread-based external log config
for CTiT enablement of celery task Tower logs
2017-01-04 14:53:49 -05:00
AlanCoding
064a40ba92 Manage null default state for logging integration and DB definition 2016-12-02 16:45:27 -05:00
AlanCoding
7848198b9f New awx.main.utils directory, distributed task to invalidate settings 2016-12-02 14:36:04 -05:00