No description
  • Go 70.1%
  • templ 24.9%
  • Dockerfile 4.1%
  • Shell 0.9%
Find a file
2026-03-30 22:00:29 +07:00
.github/workflows chore (ci): add github action 2026-03-30 22:00:29 +07:00
db feat: working signifer 2026-03-18 02:31:22 +07:00
images chore: add signifer image 2026-03-18 03:12:09 +07:00
ui feat: add favicon 2026-03-18 03:22:43 +07:00
.dockerignore feat: working signifer 2026-03-18 02:31:22 +07:00
.gitignore feat: working signifer 2026-03-18 02:31:22 +07:00
build.sh feat: working signifer 2026-03-18 02:31:22 +07:00
config.yaml.example feat: add database configuration 2026-03-18 02:43:30 +07:00
discord.go feat: working signifer 2026-03-18 02:31:22 +07:00
docker-compose.yml fix: config mounting 2026-03-18 03:03:43 +07:00
Dockerfile fix: try to make docker image and build smaller 2026-03-18 02:53:46 +07:00
go.mod feat: working signifer 2026-03-18 02:31:22 +07:00
go.sum feat: working signifer 2026-03-18 02:31:22 +07:00
LICENSE feat: working signifer 2026-03-18 02:31:22 +07:00
main.go feat: add database configuration 2026-03-18 02:43:30 +07:00
ping.go fix: add database mutex 2026-03-18 03:16:23 +07:00
README.md chore: make the image less tall 2026-03-18 03:14:27 +07:00
rest.go feat: add signifer image in the web ui 2026-03-18 03:21:15 +07:00
sqlc.yaml feat: working signifer 2026-03-18 02:31:22 +07:00

Signifer

Signifer

A signifer was a standard bearer of the Roman legions. He carried a signum (military standard) for a cohort or century.

Signifer is a network device monitoring application that tracks device availability via ICMP pings and sends Discord webhook notifications when status changes occur.

Features

  • ICMP Monitoring: Ping devices (IPv4/IPv6) with configurable intervals
  • State Tracking: Detects device status changes (online ↔ offline)
  • Discord Notifications: Rich embeds with color coding, latency, and failure reasons
  • Web UI: Device management interface powered by Templ and Tailwind CSS
  • SQLite Database: Lightweight data persistence
  • Basic Authentication: Secure web interface access

Quick Start

# Create config.yaml from example
cp config.yaml.example config.yaml
# Edit config.yaml and add your Discord webhook URL

docker-compose up -d

Access at http://localhost with credentials admin/admin.

From Binary

# Build
./build.sh

# Create config.yaml
cat > config.yaml << EOF
discord:
  webhook_url: "YOUR_DISCORD_WEBHOOK_URL"
EOF

# Run
./signifer

Configuration

Create a config.yaml file:

# Web server port (default: 9090)
port: 9090

# Discord webhook URL (REQUIRED)
discord:
  webhook_url: "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"

# Basic authentication (default: admin/admin)
auth:
  user: "admin"
  password: "secure_password"

# Ping configuration
ping:
  interval_seconds: 30  # How often to ping devices (default: 30)

Using Docker

The config.yaml file is mounted into the container at /app/config.yaml. Create this file before running:

# Create config.yaml on host
cat > config.yaml << EOF
discord:
  webhook_url: "YOUR_DISCORD_WEBHOOK_URL"
EOF

# Run with docker-compose
docker-compose up -d

Discord Notifications

Signifer sends notifications when:

  • A device goes offline (red embed)

    • Includes hostname, previous state, and reason (DNS resolution error, timeout, etc.)
  • A device comes back online (green embed)

    • Includes hostname, previous state, current state, and latency

Example Notification

Device Offline:

┌─────────────────────────────────────────┐
│ Device Offline                          │
│ Database Server is no longer responding │
├─────────────────────────────────────────┤
│ Hostname:       db01.example.com        │
│ Previous State: Online                  │
│ Current State:  Offline                 │
│ Reason:         DNS resolution error    │
└─────────────────────────────────────────┘

Building from Source

Prerequisites

  • Go 1.25+
  • GCC (for SQLite)

Build

go build -o signifer .
sudo setcap cap_net_raw=+ep ./signifer  # Grant ICMP capability

Development

# Generate templ code
templ generate

# Generate SQL code
sqlc generate

# Run
go run .

License

MIT