Skip to main content

ansible-role-collect-logs - An Ansible role for aggregating logs from different nodes.

Project description

An Ansible role for aggregating logs from different nodes.

Requirements

This role gathers logs and debug information from a target system and collates them in a designated directory, artcl_collect_dir, on the localhost.

Additionally, the role will convert templated bash scripts, created and used by TripleO-Quickstart during deployment, into rST files. These rST files are combined with static rST files and fed into Sphinx to create user friendly post-build-documentation specific to an original deployment.

Finally, the role optionally handles uploading these logs to a rsync server or to an OpenStack Swift object storage. Logs from Swift can be exposed with os-loganalyze.

Role Variables

Example Playbook

---
- name: Gather logs
  hosts: all:!localhost
  roles:
    - collect-logs

Templated Bash to rST Conversion Notes

Templated bash scripts used during deployment are converted to rST files during the create-docs portion of the role’s call. Shell scripts are fed into an awk script and output as restructured text. The awk script has several simple rules:

  1. Only lines between ### ---start_docs and ### ---stop_docs will be parsed.

  2. Lines containing # nodoc will be excluded.

  3. Lines containing ## :: indicate subsequent lines should be formatted as code blocks

  4. Other lines beginning with ## <anything else> will have the prepended ## removed. This is how and where general rST formatting is added.

  5. All other lines, including shell comments, will be indented by four spaces.

Enabling sosreport Collection

sosreport is a unified tool for collecting system logs and other debug information. To enable creation of sosreport(s) with this role, create a custom config (you can use centosci-logs.yml as a template) and ensure that artcl_collect_sosreport: true is set.

License

Apache 2.0

Author Information

RDO-CI Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansible-role-collect-logs-1.0.0.tar.gz (108.0 kB view hashes)

Uploaded Source

Built Distribution

ansible_role_collect_logs-1.0.0-py2.py3-none-any.whl (121.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page