ilia 01d35172e4
Some checks failed
CI / lint-and-test (pull_request) Failing after 58s
CI / ansible-validation (pull_request) Failing after 1m58s
CI / secret-scanning (pull_request) Successful in 58s
CI / dependency-scan (pull_request) Successful in 1m1s
CI / sast-scan (pull_request) Successful in 1m55s
CI / license-check (pull_request) Successful in 58s
CI / vault-check (pull_request) Failing after 1m55s
CI / playbook-test (pull_request) Successful in 1m57s
CI / container-scan (pull_request) Successful in 1m27s
CI / sonar-analysis (pull_request) Successful in 2m4s
CI / workflow-summary (pull_request) Successful in 55s
Fix: Resolve linting errors and improve firewall configuration
- 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
2025-12-17 22:51:04 -05:00
..

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

  • base role (for basic packages)

Example Playbook

- hosts: servers
  roles:
    - role: monitoring
      monitoring_install_fail2ban: false

Tags

  • monitoring: All monitoring tasks
  • tools: Tool installation only
  • scripts: Custom script deployment
  • security: 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