Magui
Table of contents
1 2 3 4 5 6 7 |
|
Introduction¶
Magui is a wrapper that calls functions from the Python library of Citellus README.
Some problems are not detected only on one node, but are made by the aggregation of data across them, for example:
- ntp sync
- galera replication status
- etc
- RHEL release differences
Magui aims to use Citellus for gathering the data and later, write plugins to analyze that information.
Highlights¶
-
Reuse saved citellus.json to speed up analisys on several files, retrigger if inconsistencies
-
Plugins use uuid to identify plugin properly and act on them.
-
Allows to get data from remote hosts with ansible-playbook
-
Autogrouping: based on metadata plugin, runs comparisons against sets of host roles, hostnames, etc for better spotting issues across systems.
-
Web interface using
citellus.html?json=magui.json
Check latest changes on
Installation¶
- Just clone the git repository and execute it from there ‘or’
- use ‘pipsi’ or create a python virtual env to install package ‘citellus’
sh # pipsi install citellus Already using interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in /home/iranzo/.local/venvs/citellus/bin/python3 Also creating executable in /home/iranzo/.local/venvs/citellus/bin/python Installing setuptools, pip, wheel...done. Collecting citellus Installing collected packages: citellus Successfully installed citellus-0.1.0.dev1072 Linked script /home/iranzo/.local/bin/citellus.py Linked script /home/iranzo/.local/bin/magui.py Done.
- Pipsi will take care of installing a virtual environment and link to binary folder so you can call citellus.py or magui.py directly
- Remember that pypi package might not contain all the latests plugins features as the github repo one.
- Container:
- Use our automatically built container in docker hub:
docker run --user=$(id -u) --rm -v $PATHTOSOSREPORT:/data:Z citellus/citellus:latest /data --entrypoint="magui.py"
- or build your own using the included
Dockerfile
in the git checkout.docker build . -f Dockerfile.centos7-atomic -t citellus:latest
# (from git checkout, then note image id)docker run --user=$(id -u) --rm -v $PATHTOSOSREPORT:/data:Z citellus:latest /data --entrypoint="magui.py"
- Notes about using docker:
- Docker passes as volume the path specified under /data so we do use that parameter with citellus for running the tests.
- The default user id within the container is 10001 and the commands or sosreport permissions doesn’t allow that user to gather all the information, so the container is required to run as the current user.
Usage help¶
Plugins for Magui are to be written in Python, check next section for details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Magui can be executed using the citellus docker image as well, by modifying the entrypoint:
In a directory structure as:
1 2 3 4 |
|
docker run --user=$(id -u) --rm --entrypoint="magui.py" -v /path/to/my/sosreports/:/data:Z citellus:latest -q /data/sosreport-overcloud-controller-0/ /data/sosreport-overcloud-controller-1/ /data/sosreport-overcloud-controller-2/
Running a check¶
This is an example of execution of Magui against a set of sosreports with seqno
plugin of Citellus enabled.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Running a check against remote hosts¶
1 2 3 4 5 6 |
|
Autogrouping¶
Magui does check metadata
for finding host roles or hostnames that should be checked together and generates additional json files for them.
Plugin development for Magui¶
Please do check
Please if you have any idea on any improvements please do not hesitate to open an issue or submit your contributions.