IPResist is a Go-based application that performs periodic health checks on IP addresses and stores the results in InfluxDB. The application uses MySQL for persistent data storage and Docker Compose for orchestration.
- Periodic health checks on specified IP addresses
- Storage of health check results in InfluxDB
- MySQL database for persistent data storage
- Configuration through environment variables
- Docker
- Docker-Compose
After clone the repositry, create a .env
file in the root directory with the following content:
ADDRESS=0.0.0.0
PORT=8080
DB_USER=myuser
DB_PASSWORD=mypassword
DB_NAME=mydb
DB_HOST=mysql
DB_PORT=3306
INFLUXDB_HOST=http://influxdb:8086
INFLUXDB_TOKEN=adminpassword
INFLUXDB_ORG=myorg
INFLUXDB_BUCKET=mybucket
HEALTH_CHECK_INTERVAL=300
Use Docker Compose to build and start the services:
docker-compose build .
docker-compose up -d
This will start the following services:
- MySQL (port 3306)
- InfluxDB (port 8086)
- IPResist Go application (port 8080)
To stop the running containers:
docker-compose down
Configuration for the application is done through environment variables. These can be set in the .env
file in the root of the project. The following variables are used:
ADDRESS
: The address the Go application will listen on (default0.0.0.0
)PORT
: The port the Go application will listen on (default8080
)DB_USER
: MySQL database userDB_PASSWORD
: MySQL database passwordDB_NAME
: MySQL database nameDB_HOST
: MySQL database host (defaultmysql
)DB_PORT
: MySQL database port (default3306
)INFLUXDB_HOST
: InfluxDB host URLINFLUXDB_TOKEN
: InfluxDB tokenINFLUXDB_ORG
: InfluxDB organizationINFLUXDB_BUCKET
: InfluxDB bucketHEALTH_CHECK_INTERVAL
: Interval for performing health checks (in seconds, default300
)
The application performs periodic health checks on the specified IP addresses using the scheduler defined in internal/scheduler/scheduler.go
. The results are stored in InfluxDB.
Contributions are welcome! If you would like to contribute.
I am looking for a front-end developer, preferably experienced with React, to create a web interface for our API. This interface will allow users to interact with the IPResist application and visualize health check results.
This project is licensed under the Apache License - see the LICENSE file for details.
Mohammad Reza Fadaei - mohrezfadaei@gmail.com