21
1. Deploy n8n in Docker
2. Create An Infrastructure Monitor Workflow
3. Plan For An AI-Driven Workflow To Remedy Common Issues
4. Create AWX/Semaphore Remediation Jobs
5. Discord Bot Set Up
6. The AI-Assisted Remediation Workflow Into n8n
7. Real Test Scenarios
8. Security & Functionality Considerations
Would you like to empower AI with certain maintenance tasks over your infrastructure with an approval workflow via Discord to stay in control? How to best define a low, medium or high-risk operation and modify AI’s behavior accordingly to avoid unwanted surprises? In this tutorial, we will build on Part 1 of the tutorial and dive in while leveraging the following technologies:
- Prometheus (covered in Part 1) – captures metrics – you will need to install it with the
process-exporter(namedprocess-exporter) module to fetch all the required details. - Loki (covered in Part 1) – captures logs
- Grafana (covered in Part 1) – visualizes data (not required for AI-powered automation)
- n8n (covered in this Part 2) – automation platform (low-code).
- Claude AI (or another LLM of your preference)
- AWX or Semaphore UI (you can also use another tool like Ansible Automation Platform (AAP, which replaced Ansible Tower), Spacelift, Rundeck, etc.)
- If you do not have it set up yet, follow my previous tutorial on how to **Deploy Ansible AWX to automate OS patching .**
- Steps 1 and 2 in this tutorial can be completed without it.
- Gitea (or another source version control tool) to store your Ansible playbooks (same as with AWX).
As the first step, we will deploy n8n and connect it with AI (Claude) to analyze logs from our monitoring tools regularly to provide us with consolidated advice about service outages and to suggest tweaks based on metrics (RAM / disk / CPU usage).