Skip to main content

Installation

This guide will walk you through installing Site Availability Monitoring on your system.

Prerequisites

Before getting started, ensure you have the following installed on your system:

Required Dependencies

Optional Dependencies

Clone the Repository

First, clone the Site Availability Monitoring repository:

git clone https://github.com/Levy-Tal/site-availability.git
cd site-availability

Backend Setup

1. Navigate to Backend Directory

cd backend

2. Download Dependencies

go mod download

3. Build the Application

go build -o site-availability main.go

4. Create Configuration File

Copy the example configuration and customize it for your environment:

cp ../helpers/config/single-server.yaml config.yaml

5. Run the Backend

./site-availability

The backend will start on http://localhost:8080 by default.

Frontend Setup

1. Navigate to Frontend Directory

cd ../frontend

2. Install Dependencies

npm install

3. Configure Frontend

Edit src/config.js to point to your backend:

const config = {
apiUrl: "http://localhost:8080",
// ... other configuration
};

4. Start Development Server

npm start

The frontend will be available at http://localhost:3000.

Verification

To verify your installation:

  1. Backend Health Check: Visit http://localhost:8080/health
  2. Frontend: Open http://localhost:3000 in your browser
  3. Metrics Endpoint: Check http://localhost:8080/metrics for Prometheus metrics

Next Steps

Troubleshooting

Common Issues

Port Already in Use

If you get a "port already in use" error:

# Check what's using the port
lsof -i :8080
# Kill the process if needed
kill -9 <PID>

Go Module Issues

If you encounter Go module issues:

go clean -modcache
go mod download

Node.js Issues

If npm install fails:

rm -rf node_modules package-lock.json
npm install

For more troubleshooting, see our Troubleshooting Guide.