SRE Toolbox CLI is a command-line tool designed to simplify troubleshooting and automation tasks for Site Reliability Engineers (SREs). It integrates common Linux utilities to assist with debugging, monitoring, and managing systems, helping SREs quickly resolve incidents, reduce downtime, and ensure smooth operations.
With a focus on providing human-readable outputs, this CLI centralizes useful tools and abstracts complex commands, streamlining day-to-day troubleshooting tasks.
- [WIP] Service Status Check: Verify the status of critical services using
systemctl
, restart services, or retrieve logs for debugging when issues are detected. - Network Debugging: Diagnose network issues using
dig
,ping
,traceroute
, andnetstat
for quick connectivity checks and performance troubleshooting. - [WIP] Log Analysis: Retrieve and display logs from
journalctl
anddmesg
in a user-friendly format to identify system errors and warnings quickly. - [WIP] Resource Monitoring: Monitor CPU, memory, and disk usage with commands like
top
,df
, andfree
to ensure optimal resource utilization. - [WIP] Firewall and Network Security: Use
iptables
to inspect firewall rules and check for potential network traffic blocks or security issues. - [WIP] Service Logs Extraction: If a service is failing, automatically fetch the latest logs from
journalctl
to help debug the root cause of the issue.
To install SRE Toolbox CLI, make sure you have Go installed on your system, and then follow these steps:
git clone https://github.com/your-username/project-name.git
cd project-name
go build -o teemo-cli
This will generate the teemo-cli binary which you can execute directly.
Here are some examples of how to use the SRE Toolbox CLI:
-
Check Service Status:
./teemo-cli service-check --service nginx
This will check if the
nginx
service is active and provide logs if the service is not running. -
Fetch Network Debug Information:
./teemo-cli network-debug --tool dig --target example.com
This will use
dig
to check DNS resolution for the target. -
Monitor Resource Usage:
./teemo-cli resource-check --type memory
This command shows the current memory usage on the system.
-
Extract Service Logs:
./teemo-cli logs --service nginx
This fetches the latest logs from
journalctl
for the specified service.
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request. Follow the guidelines below to contribute to this project:
- Fork the repository.
- Create a new branch.
- Make your changes and ensure they are well-tested.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Built using Go.
- Inspiration from various Linux tools and SRE best practices.