Skip to content

Commit

Permalink
Merge pull request #37 from mfreeman451/36-app-rename
Browse files Browse the repository at this point in the history
renamed project
  • Loading branch information
mfreeman451 authored Jan 18, 2025
2 parents 80aa043 + 8d34352 commit eba7301
Show file tree
Hide file tree
Showing 30 changed files with 168 additions and 3,884 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build HomeMon Packages
name: Build ServiceRadar Packages

on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.23'

- name: Install dependencies
run: |
Expand All @@ -29,5 +29,5 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: homemon-packages
name: serviceradar-packages
path: release-artifacts/*.deb
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .github/workflows/release.yml
name: Release HomeMon Packages
name: Release ServiceRadar Packages
on:
release:
types: [created]
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ elements/
*.deb

# Build outputs
homemon-dusk_*/
homemon-poller_*/
homemon-cloud_*/
serviceradar-dusk_*/
serviceradar-poller_*/
serviceradar-cloud_*/
dist/
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# HomeMon
# ServiceRadar

```
__
| |--.-----.--------.-----.--------.-----.-----.
| | _ | | -__| | _ | |
|__|__|_____|__|__|__|_____|__|__|__|_____|__|__|
.-----.-----.----.--.--.|__|.----.-----.----.---.-.--| |.---.-.----.
|__ --| -__| _| | || || __| -__| _| _ | _ || _ | _|
|_____|_____|__| \___/ |__||____|_____|__| |___._|_____||___._|__|
```
[![Release HomeMon Packages](https://github.com/mfreeman451/homemon/actions/workflows/release.yml/badge.svg)](https://github.com/mfreeman451/homemon/actions/workflows/release.yml)
[![Release ServiceRadar Packages](https://github.com/mfreeman451/serviceradar/actions/workflows/release.yml/badge.svg)](https://github.com/mfreeman451/serviceradar/actions/workflows/release.yml)

ServiceRadar is a distributed network monitoring system designed for monitoring infrastructure and services in hard to reach places or constrained environments.
It provides real-time monitoring of internal services, with cloud-based alerting capabilities to ensure you stay informed even during network or power outages.

HomeMon is a distributed network monitoring system designed for monitoring home infrastructure and services. It provides real-time monitoring of internal services, with cloud-based alerting capabilities to ensure you stay informed even during network or power outages.

<img width="1470" alt="Screenshot 2025-01-13 at 10 15 22 PM" src="https://github.com/user-attachments/assets/0aa1416d-dec2-4bcd-8df5-00bffcef79ec" />
<img width="1386" alt="Screenshot 2025-01-16 at 9 48 57 PM" src="https://github.com/user-attachments/assets/f7565610-d583-450d-8ffe-2f4bf63b913a" />
<img width="1466" alt="Screenshot 2025-01-14 at 10 29 38 AM" src="https://github.com/user-attachments/assets/e0753cb3-08c2-456b-afc1-35c99fac7882" />

## Architecture

HomeMon uses a distributed architecture with three main components:
ServiceRadar uses a distributed architecture with three main components:

```mermaid
graph TD
Expand Down Expand Up @@ -79,14 +80,14 @@ graph TD

## Installation

HomeMon components are distributed as Debian packages. Each component has its own package:
ServiceRadar components are distributed as Debian packages. Each component has its own package:

### Building Packages

1. Clone the repository:
```bash
git clone https://github.com/mfreeman451/homemon.git
cd homemon
git clone https://github.com/mfreeman451/serviceradar.git
cd serviceradar
```

2. Build the agent package:
Expand All @@ -108,38 +109,38 @@ cd homemon

1. **Agent Installation** (on monitored hosts):
```bash
sudo dpkg -i homemon-dusk_1.0.0.deb # For Dusk nodes
sudo dpkg -i serviceradar-dusk_1.0.0.deb # For Dusk nodes
# or
sudo dpkg -i homemon-agent_1.0.0.deb # For other hosts
sudo dpkg -i serviceradar-agent_1.0.0.deb # For other hosts
```

2. **Poller Installation** (on any host in your network):
```bash
sudo dpkg -i homemon-poller_1.0.0.deb
sudo dpkg -i serviceradar-poller_1.0.0.deb
```

3. **Cloud Installation** (on a reliable host):
```bash
sudo dpkg -i homemon-cloud_1.0.0.deb
sudo dpkg -i serviceradar-cloud_1.0.0.deb
```

## Configuration

### Agent Configuration

Default location: `/etc/homemon/checkers/`
Default location: `/etc/serviceradar/checkers/`

For Dusk nodes:
```json
# /etc/homemon/checkers/dusk.json
# /etc/serviceradar/checkers/dusk.json
{
"name": "dusk",
"node_address": "localhost:8080",
"timeout": "5m",
"listen_addr": ":50052"
}

# /etc/homemon/checkers/external.json
# /etc/serviceradar/checkers/external.json
{
"name": "dusk",
"address": "localhost:50052"
Expand All @@ -148,7 +149,7 @@ For Dusk nodes:

### Poller Configuration

Default location: `/etc/homemon/poller.json`
Default location: `/etc/serviceradar/poller.json`

```json
{
Expand All @@ -170,7 +171,7 @@ Default location: `/etc/homemon/poller.json`

### Cloud Configuration

Default location: `/etc/homemon/cloud.json`
Default location: `/etc/serviceradar/cloud.json`

```json
{
Expand All @@ -192,8 +193,8 @@ Default location: `/etc/homemon/cloud.json`

1. **Agent Deployment**:
- Must run on each host you want to monitor
- For Dusk nodes, use the homemon-dusk package
- For other hosts, use the homemon-agent package
- For Dusk nodes, use the serviceradar-dusk package
- For other hosts, use the serviceradar-agent package
- Requires port 50051 to be accessible to the poller

2. **Poller Deployment**:
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
set -e

# Build the builder image
docker build -t homemon-builder -f Dockerfile.build .
docker build -t serviceradar-builder -f Dockerfile.build .

# Run just the cloud package build in the container
docker run --rm -v $(pwd):/build homemon-builder ./setup-deb-cloud.sh
docker run --rm -v $(pwd):/build serviceradar-builder ./setup-deb-cloud.sh

echo "Build completed. Check release-artifacts/ directory for the cloud package."
6 changes: 3 additions & 3 deletions buildAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
./setup-deb-dusk-checker.sh
./setup-deb-agent.sh

scp release-artifacts/homemon-poller_1.0.0.deb [email protected]:~/
scp release-artifacts/homemon-agent_1.0.0.deb [email protected]:~/
scp release-artifacts/homemon-dusk-checker_1.0.0.deb [email protected]:~/
scp release-artifacts/serviceradar-poller_1.0.0.deb [email protected]:~/
scp release-artifacts/serviceradar-agent_1.0.0.deb [email protected]:~/
scp release-artifacts/serviceradar-dusk-checker_1.0.0.deb [email protected]:~/
10 changes: 5 additions & 5 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"os/signal"
"syscall"

"github.com/mfreeman451/homemon/pkg/agent"
"github.com/mfreeman451/homemon/pkg/grpc"
"github.com/mfreeman451/homemon/proto"
"github.com/mfreeman451/serviceradar/pkg/agent"
"github.com/mfreeman451/serviceradar/pkg/grpc"
"github.com/mfreeman451/serviceradar/proto"

"google.golang.org/grpc/health"
healthpb "google.golang.org/grpc/health/grpc_health_v1"
Expand All @@ -23,10 +23,10 @@ const (
)

func main() {
log.Printf("Starting homemon agent...")
log.Printf("Starting serviceradar agent...")

// Command line flags
configDir := flag.String("config", "/etc/homemon/checkers", "Path to checkers config directory")
configDir := flag.String("config", "/etc/serviceradar/checkers", "Path to checkers config directory")
listenAddr := flag.String("listen", ":50051", "gRPC listen address")
flag.Parse()

Expand Down
8 changes: 4 additions & 4 deletions cmd/checkers/dusk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"os/signal"
"syscall"

"github.com/mfreeman451/homemon/pkg/checker/dusk"
"github.com/mfreeman451/homemon/pkg/grpc"
"github.com/mfreeman451/homemon/proto"
"github.com/mfreeman451/serviceradar/pkg/checker/dusk"
"github.com/mfreeman451/serviceradar/pkg/grpc"
"github.com/mfreeman451/serviceradar/proto"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"
)
Expand All @@ -24,7 +24,7 @@ const (
func main() {
log.Printf("Starting Dusk checker...")

configFile := flag.String("config", "/etc/homemon/checkers/dusk.json", "Path to config file")
configFile := flag.String("config", "/etc/serviceradar/checkers/dusk.json", "Path to config file")
flag.Parse()

log.Printf("Loading config from: %s", *configFile)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cloud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"os/signal"
"syscall"

"github.com/mfreeman451/homemon/pkg/cloud"
"github.com/mfreeman451/homemon/pkg/cloud/api"
"github.com/mfreeman451/serviceradar/pkg/cloud"
"github.com/mfreeman451/serviceradar/pkg/cloud/api"
)

func main() {
configPath := flag.String("config", "/etc/homemon/cloud.json", "Path to config file")
configPath := flag.String("config", "/etc/serviceradar/cloud.json", "Path to config file")
flag.Parse()

ctx := context.Background()
Expand Down
4 changes: 2 additions & 2 deletions cmd/poller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"os/signal"
"syscall"

"github.com/mfreeman451/homemon/pkg/poller"
"github.com/mfreeman451/serviceradar/pkg/poller"
)

func main() {
configPath := flag.String("config", "/etc/homemon/poller.json", "Path to config file")
configPath := flag.String("config", "/etc/serviceradar/poller.json", "Path to config file")
flag.Parse()

config, err := poller.LoadConfig(*configPath)
Expand Down
52 changes: 0 additions & 52 deletions db/homemon-schema.sql

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/mfreeman451/homemon
module github.com/mfreeman451/serviceradar

go 1.23.4

Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/external_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"log"

grpcpkg "github.com/mfreeman451/homemon/pkg/grpc"
"github.com/mfreeman451/homemon/proto"
grpcpkg "github.com/mfreeman451/serviceradar/pkg/grpc"
"github.com/mfreeman451/serviceradar/proto"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package agent
import (
"context"

"github.com/mfreeman451/homemon/proto"
"github.com/mfreeman451/serviceradar/proto"
)

type Service interface {
Expand Down
6 changes: 3 additions & 3 deletions pkg/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"sync"
"time"

"github.com/mfreeman451/homemon/pkg/checker"
"github.com/mfreeman451/homemon/pkg/sweeper"
"github.com/mfreeman451/homemon/proto"
"github.com/mfreeman451/serviceradar/pkg/checker"
"github.com/mfreeman451/serviceradar/pkg/sweeper"
"github.com/mfreeman451/serviceradar/proto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/sweep_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

"github.com/mfreeman451/homemon/pkg/sweeper"
"github.com/mfreeman451/homemon/proto"
"github.com/mfreeman451/serviceradar/pkg/sweeper"
"github.com/mfreeman451/serviceradar/proto"
)

type SweepService struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/checker/dusk/dusk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

"github.com/gorilla/websocket"
"github.com/mfreeman451/homemon/proto"
"github.com/mfreeman451/serviceradar/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/health/grpc_health_v1"
Expand Down
Loading

0 comments on commit eba7301

Please sign in to comment.