The POI Health Check is a Python-based utility designed to orchestrate health checks across multiple servers using customizable Point-Of-Interest (POI) scripts. This tool facilitates the collection, execution, and reporting of system health data from various server environments. It supports multi-threading, secure SSH execution, and integration with popular reporting tools like Confluence, Dynatrace, email, and LogScale (formerly SYSLOG).
- Automated Health Checks: Collect and execute health-check scripts on a list of servers, similar to Ansible.
- Customizable Scripts: Use a sub-directory of customizable POI scripts that can be tailored for specific checks.
- Multi-Threaded Execution: Leverage multiple threads to process a large list of servers efficiently.
- Extensive Reporting: Output results in various formats and optionally push them to Confluence, Dynatrace, email, and SYSLOG.
- Secure Operations: POI scripts are copied and executed on target servers, with a cleanup trap to ensure no residual files are left behind.
- Python 3.x
- Required Python packages (can be installed via
requirements.txt):requestsconfigparserargparseconcurrent.futures
-
Clone the Repository:
git clone https://github.com/aztekmq/poiHC.git cd poiHC -
Install Required Packages:
pip install -r requirements.txt
-
Setup Configuration:
- Configure the necessary settings in the
config.inifiles located under theconfig/single/andconfig/rdqm/directories. - Update the
inventory_fileto point to your list of target servers.
- Configure the necessary settings in the
The script supports the following command-line arguments:
-t,--type: Required. Specifies the type of the MQ environment. Choose betweensingleorrdqm.
To execute the health check, run the following command:
python3 poi-healthcheck.py -t <environment-type>Example:
python3 poi-healthcheck.py -t single- SSH Key: The script uses SSH for remote execution. Ensure that the
ssh_keyparameter in the configuration is correctly set to the path of your SSH private key. - Logging: Customize the logging configuration in the
config.inifile, including log file location, log level, and log rotation size. - POI Scripts: Place your POI scripts in the appropriate directory (
pois/single/orpois/rdqm/).
The results are stored in a JSON file named results.<type>.json, where <type> corresponds to the environment type (single or rdqm). The script can also generate an HTML report and push the results to Confluence, Dynatrace, email, or SYSLOG, depending on the configuration.
Your POI scripts should follow a specific structure and be placed in the pois/single/ or pois/rdqm/ directories. The script should output a status of ok or error, and provide details for further analysis.
The health check results can be published to various platforms based on the configuration:
- Confluence: Automatically update a Confluence page with the health check results and documentation.
- Email: Send a detailed report via email to specified recipients.
- SYSLOG: Log results to SYSLOG for centralized logging and monitoring.
We welcome contributions to enhance the functionality and performance of the POI Health Check tool. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
Please ensure that your code adheres to the project's coding standards and includes relevant tests.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or support, please contact the project maintainer at rob@aztekmq.net.