██╗ ██╗██╗ ██╗████████╗██╗██╗ ███████╗
╚██╗██╔╝██║ ██║╚══██╔══╝██║██║ ██╔════╝
╚███╔╝ ██║ ██║ ██║ ██║██║ ███████╗
██╔██╗ ██║ ██║ ██║ ██║██║ ╚════██║
██╔╝ ██╗╚██████╔╝ ██║ ██║███████╗███████║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝
One command. Full monitoring stack. Fully automated.
- Overview
- Architecture
- Installation
- Usage
- Commands Reference
- Supported Tools
- SSH Remote Mode
- AI Assistant
- Development Guide
- Contributing
xUtils automates the installation, configuration, and management of:
| Tool | Category | What it does |
|---|---|---|
| Nagios | Monitoring | Infrastructure & service checks |
| Zabbix | Monitoring | Enterprise agent-based monitoring |
| Graylog | Log Management | Centralized log aggregation |
| Wazuh | SIEM/XDR | Security events & intrusion detection |
| Grafana | Dashboards | Metrics visualization |
| Prometheus | Metrics | Time-series data collection |
| Fail2ban | Security | SSH/HTTP brute-force prevention |
Without xUtils: 30 minutes → several hours per tool, with risk of error.
With xUtils: xutils install nagios — done in minutes.
xutils/
├── main.go # Entry point
├── cmd/ # CLI commands (Cobra)
│ ├── root.go # Root command + banner
│ ├── install.go # xutils install [tool]
│ ├── configure.go # xutils configure / uninstall / update
│ ├── doctor.go # xutils doctor
│ ├── status.go # xutils status
│ ├── ssh.go # xutils ssh [host] [command]
│ ├── ai.go # xutils ai [question]
│ └── list.go # xutils list
├── core/
│ ├── detector/ # Auto OS detection (Debian/Ubuntu/Arch/Fedora/macOS/Windows)
│ ├── executor/ # Command runner (local + SSH)
│ └── logger/ # Structured logging
├── modules/
│ └── common/ # All tool installers
│ ├── installer.go # Base interface + registry
│ ├── nagios.go
│ ├── zabbix.go
│ ├── graylog.go
│ ├── wazuh.go
│ └── grafana_prometheus_fail2ban.go
├── ai/
│ └── assistant.go # Ollama AI + fallback KB
├── Makefile # Build, cross-compile, package
├── Dockerfile # Multi-stage Docker build
├── install.sh # Universal install script
└── .github/workflows/
└── release.yml # CI/CD: test → build → release
Tech stack: Go 1.22 · Cobra CLI · golang.org/x/crypto/ssh · Ollama AI
curl -fsSL https://raw.githubusercontent.com/xutils/xutils/main/install.sh | bash# Add repository
curl -fsSL https://packages.xutils.dev/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/xutils.gpg
echo "deb [signed-by=/etc/apt/trusted.gpg.d/xutils.gpg] https://packages.xutils.dev/apt stable main" \
| sudo tee /etc/apt/sources.list.d/xutils.list
sudo apt-get update
sudo apt-get install xutils
# Or download .deb directly:
wget https://github.com/xutils/xutils/releases/latest/download/xutils_1.0.0_amd64.deb
sudo dpkg -i xutils_1.0.0_amd64.debsudo dnf config-manager --add-repo https://packages.xutils.dev/rpm/xutils.repo
sudo dnf install xutils# Via AUR (yay):
yay -S xutils
# Via pacman (manual):
git clone https://aur.archlinux.org/xutils.git
cd xutils && makepkg -siwinget install xutils.xutilsOr download the .exe from GitHub Releases and add to %PATH%.
Requirements: Go 1.22+, Git
git clone https://github.com/xutils/xutils.git
cd xutils
make deps # Download Go modules
make build # Build for current platform
make install # Install to /usr/local/bin/# System diagnostics
xutils doctor
# List all available tools
xutils list
# Install a tool (interactive, auto-detects OS)
sudo xutils install nagios
sudo xutils install zabbix
sudo xutils install graylog
sudo xutils install wazuh
sudo xutils install grafana
sudo xutils install prometheus
sudo xutils install fail2ban
# Simulate install (no changes made)
sudo xutils install nagios --dry-run
# Skip all prompts (use defaults)
sudo xutils install nagios --yes
# Check service status
xutils status
xutils status nagios
# Reconfigure an installed tool
sudo xutils configure nagios
# Remove a tool
sudo xutils uninstall nagios
# AI-powered diagnostics
xutils ai "Why is Nagios not starting?"
xutils ai "How to add Wazuh agents?"
xutils ai "Graylog is slow, how to optimize?"xutils [command] [flags]
Commands:
install Install a monitoring/security tool
configure Reconfigure an installed tool
uninstall Remove a tool and its data
update Update an installed tool
doctor Run full system diagnostics
status Show status of installed tools
ssh Run commands on a remote host
ai AI-powered diagnostics assistant
list List all available tools
version Show version information
Global Flags:
-v, --verbose Enable verbose output
--dry-run Simulate without making changes
--no-color Disable colored output
-h, --help Show help
Install Flags:
-y, --yes Skip confirmation prompts
--ssh host Remote host for installation
--user user SSH username (default: root)
--key path SSH private key path
--port port SSH port (default: 22)
Install tools on a remote server without logging in manually:
# Using SSH key (recommended)
xutils install nagios --ssh 192.168.1.50 --user ubuntu --key ~/.ssh/id_rsa
# Using user@host shorthand
xutils install wazuh --ssh admin@myserver.com
# Run diagnostics on remote host
xutils ssh root@10.0.0.1 doctor
# Check status on remote
xutils ssh admin@prod-server.com statusxUtils includes an AI assistant powered by Ollama (local, private):
# Setup Ollama (one time):
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3
# Ask questions:
xutils ai "Why is Nagios not starting?"
xutils ai "How do I configure Zabbix for 500 hosts?"
xutils ai "Graylog memory is too high"
xutils ai "Add remote agent to Wazuh"
# Use a specific model:
xutils ai --model mistral "Optimize Prometheus retention"If Ollama is not installed, xUtils falls back to a built-in knowledge base with pre-defined solutions for common issues.
git clone https://github.com/xutils/xutils.git
cd xutils
go mod download
# Run without installing
go run . --help
go run . list
go run . doctor
# Build
make build
./xutils --help
# Run tests
make test
# Cross-compile all platforms
make cross-build- Create
modules/common/mytool.go - Implement the
Installerinterface:type MyToolInstaller struct { base *BaseInstaller } func (m *MyToolInstaller) Install() error { ... } func (m *MyToolInstaller) Configure() error { ... } func (m *MyToolInstaller) Uninstall() error { ... } func (m *MyToolInstaller) Update() error { ... } func (m *MyToolInstaller) ShowPlan() { ... } func (m *MyToolInstaller) DryRun() { ... } func (m *MyToolInstaller) PrintSummary() { ... }
- Register in
modules/common/installer.go→GetInstaller()switch
git tag v1.1.0
git push origin v1.1.0
# GitHub Actions auto-builds and publishes release- Fork the repository
- Create a feature branch:
git checkout -b feat/add-elastic - Implement your changes
- Write tests
- Submit a pull request
MIT License — see LICENSE
xUtils — Because life is too short for manual monitoring setup.