Welcome to DevOpsBashHub – a comprehensive collection of shell scripts tailored for DevOps tasks. This repository is designed to simplify and automate various DevOps operations. These scripts are here to save you time and effort.
The repository is organized into different folders, each dedicated to a specific DevOps function:
aws/: Scripts related to Amazon Web Services operations.backup/: Scripts for backing up directories and databases with retention.benchmarkers/: Scripts to get system hardware information and capacity.docker/: Scripts for docker management and monitoring.libs/: Library scripts that support various functionalities.log-management/: Scripts for managing and analyzing logs.monitoring/: Scripts to set up and manage monitoring solutions.security/: Scripts for auditing and hardening system security.user-management/: Scripts for managing linux system users.
autoscale.sh: Fetches and displays detailed information about AWS Auto-Scaling Groups.cost.sh: Fetches and displays detailed information about AWS cloud bill.ec2-list.sh: Fetches and displays details of running EC2 instances, including names, private and public IP addresses, and instance types in a formatted table.
backup-directory.sh: Creates timestamped, compressed backups of a directory and enforces a retention policy.mysql-backup.sh: Dumps one or more MySQL/MariaDB databases into compressed files with retention.
spec-collector.sh: Collect and report system hardware and software configuration.system-benchmark.sh: Benchmarks CPU, memory, and disk.
container-stats.sh: Monitors and logs CPU and memory usage of Docker containersimage-cleanup.sh: Reclaims Docker disk space by pruning stopped containers, dangling images, and unused volumes (supports dry-run).
common-log.sh: Library scripts for log format.
rotate-log.sh: Automates the rotation and compression of log files.
cpu-monitor.sh: Monitors CPU load and utilization, alerting when usage or load average crosses a threshold.disk-monitor.sh: Monitors specified mount points for disk usage in a Linux system.memory-monitor.sh: Monitors RAM and swap usage, alerting when either exceeds a threshold.network-latency-monitor.sh: Logs the latency in a file.process-monitor.sh: Monitors specified critical processes on a server and automatically attempts to restart them if they are not running.ssl-monitor.sh: Checks the expiration dates of SSL certificates.web-monitor.sh: Monitors a list of websites for availability.
failed-logins.sh: Audits failed SSH login attempts and flags IPs showing brute-force activity.listening-ports.sh: Audits actively listening TCP/UDP ports and their owning processes.
To use these scripts, clone the repository and navigate to the desired script directory:
git clone https://github.com/yourusername/DevOpsShellHub.git
cd DevOpsShellHub/