Some checks failed
CI / lint-and-test (push) Successful in 1m16s
CI / ansible-validation (push) Successful in 5m49s
CI / secret-scanning (push) Successful in 1m33s
CI / dependency-scan (push) Successful in 2m48s
CI / sast-scan (push) Successful in 5m46s
CI / license-check (push) Successful in 1m11s
CI / vault-check (push) Failing after 5m25s
CI / playbook-test (push) Successful in 5m32s
CI / container-scan (push) Successful in 4m32s
CI / sonar-analysis (push) Successful in 6m53s
CI / workflow-summary (push) Successful in 1m6s
- Fix UFW firewall to allow outbound traffic (was blocking all outbound) - Add HOST parameter support to shell Makefile target - Fix all ansible-lint errors (trailing spaces, missing newlines, document starts) - Add changed_when: false to check commands - Fix variable naming (vault_devGPU -> vault_devgpu) - Update .ansible-lint config to exclude .gitea/ and allow strategy: free - Fix NodeSource repository GPG key handling in shell playbook - Add missing document starts to host_vars files - Clean up empty lines in datascience role files Reviewed-on: #2
Role: monitoring
Description
Installs comprehensive system monitoring tools and custom monitoring scripts for performance analysis and security monitoring.
Requirements
- Ansible 2.9+
- Debian/Ubuntu systems
- Sufficient disk space for logs
Installed Tools
- htop: Interactive process viewer
- btop: Modern system monitor (from apt or binary)
- iotop: I/O monitoring
- nethogs: Network usage per process
- iftop: Network bandwidth monitoring
- ncdu: Disk usage analyzer
- fail2ban: Intrusion prevention
- logwatch: Log analysis and reporting
Custom Scripts
/usr/local/bin/monitoring/sysinfo: System overview dashboard/usr/local/bin/monitoring/netinfo: Network monitoring script
Variables
| Variable | Default | Description |
|---|---|---|
monitoring_install_htop |
true |
Install htop process viewer |
monitoring_install_fail2ban |
true |
Install intrusion prevention |
monitoring_install_logwatch |
true |
Install log analysis |
monitoring_custom_scripts |
true |
Install custom monitoring scripts |
Dependencies
baserole (for basic packages)
Example Playbook
- hosts: servers
roles:
- role: monitoring
monitoring_install_fail2ban: false
Tags
monitoring: All monitoring taskstools: Tool installation onlyscripts: Custom script deploymentsecurity: Security monitoring tools
Fail2ban Configuration
- SSH protection: Enabled by default
- Ban time: 10 minutes
- Find time: 10 minutes
- Max retry: 5 attempts
Notes
- Creates monitoring user directories
- Configures fail2ban with custom rules
- btop installed from apt on Debian 12+, or from GitHub binary on older versions
- Custom scripts require manual execution