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:
Only lines between ### ---start_docs and ### ---stop_docs will be parsed.
Lines containing # nodoc will be excluded.
Lines containing ## :: indicate subsequent lines should be formatted as code blocks
Other lines beginning with ## <anything else> will have the prepended ## removed. This is how and where general rST formatting is added.
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
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
Built Distribution
File details
Details for the file ansible-role-collect-logs-1.0.0.tar.gz
.
File metadata
- Download URL: ansible-role-collect-logs-1.0.0.tar.gz
- Upload date:
- Size: 108.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3edb1e61ca64a822893743136fa1ce8c677b13c719d14ddde2a72c1ae8205b74 |
|
MD5 | ae8c04e6470d12053973d9b8814ab8cc |
|
BLAKE2b-256 | 329558b0cca3f8b2d668cbaa9405b2c72c3df28249fa055ff74287b92f1f3ff1 |
File details
Details for the file ansible_role_collect_logs-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ansible_role_collect_logs-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 121.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41aa9d800108d934adb347dfcc537608d6dc3ded7383abdc1b4b6fd984c53e8a |
|
MD5 | 24145719d101c1afee39370d8f7afe30 |
|
BLAKE2b-256 | a63708dd01c98a52c1b67864ef819e5dc00149dbebc59898dec536662c07c29a |