Argus is a lightweight and efficient uptime monitoring service written in Go. It periodically checks the availability and response time of a given URL and logs the results. Designed with simplicity, reliability, and extensibility in mind, Argus is a great starting point for developers looking to monitor service health.
- Periodic URL Monitoring: Monitor the availability of any URL at regular intervals.
- Response Time Measurement: Measure the time it takes for the URL to respond.
- Status Logging: Logs the URL status (up or down) along with error details.
- Customizable Intervals: Set your preferred monitoring interval (e.g., every 30 seconds).
- Lightweight and Fast: Simple design for quick execution and minimal resource usage.
- Extendable: Easy to add new features, such as email notifications or logging mechanisms.
- Go 1.23+ installed on your machine.
- Git for version control (optional).
- (Optional) Docker for containerized deployment.
-
Clone this repository:
git clone https://github.com/tejastn10/argus.git cd argus
-
Install dependencies:
go mod tidy
-
Run the project:
go run main.go
-
Build the project:
go build -o argus
-
Run the service with URL and monitoring interval flags:
You can pass the URL and monitoring interval as command-line flags:
./argus -url=https://example.com -interval=30s
-
Argus will start monitoring the specified URL and log the status, response time, and errors (if any).
-
Example Docker Usage:
If you're running Argus in Docker, you can use the pre-configured
docker-compose.yml
file, which automatically passes the required flags to the container.docker-compose up -d
INFO : Starting uptime monitoring for https://example.com every 30 seconds
SUCCESS : URL: https://example.com | Response Time: 1.113759875s | Status: 200
SUCCESS : URL: https://example.com | Response Time: 299.630625ms | Status: 200
argus/
├── logs/ # Core package with console and file logging logic
├── monitor/ # Core package with URL monitoring logic
├── go.mod # Dependency management
├── main.go # Main application entry point
└── README.md # Project documentation
Deploy Argus as a containerized service using Docker.
docker build -t argus .
docker run -d argus
We have included an example docker-compose.yml file that can be used to run Argus easily in a Docker container.
You can pull the Argus Docker image directly from the Docker Hub registry.
Docker Hub Link: tejastn10/argus
Contributions are welcome! Feel free to open an issue or submit a pull request if you have ideas to enhance Argus.
- Add support for email notifications on downtime.
- Implement a REST API for managing monitored URLs.
- Store logs in a database for analysis.
- Build a dashboard to visualize uptime statistics.
This project is licensed under the MIT License. See the LICENSE file for details.
- Inspired by the mythological Argus, the all-seeing guardian.
- Built with ❤️ and Go.