MyGit

aceberg/WatchYourLAN

Fork: 127 Star: 3973 (更新于 2024-10-30 08:45:15)

license: MIT

Language: Go .

Lightweight network IP scanner. Can be used to notify about new hosts and monitor host online/offline history

最后发布版本: 2.0.1 ( 2024-09-02 22:25:52)

官方网址 GitHub网址

WatchYourLAN


Docker Go Report Card Maintainability Docker Image Size (latest semver) GitHub Discussions

Lightweight network IP scanner with web GUI. Features:

  • Send notification when new host is found
  • Monitor hosts online/offline history
  • Keep a list of all hosts in the network
  • Send data to InfluxDB2 to make a Grafana dashboard

[!WARNING]
This is version 2.0, which is now tagged latest. Version 1.0 can be found in this branch: v1. BREAKING CHANGES! Version 2.0 is not compatible with v1.0.

[!TIP]
WatchYourLAN supports vlans, docker0 and other complicated scans since v2.0.1. How-to here.

Screenshot_1

More screenshots

Expand

Screenshot_5
Screenshot_2
Screenshot_3
Screenshot_4

Quick start

Expand

Replace $YOURTIMEZONE with correct time zone and $YOURIFACE with network interface you want to scan. Network mode must be host. Set $DOCKERDATAPATH for container to save data:

docker run --name wyl \
	-e "IFACES=$YOURIFACE" \
	-e "TZ=$YOURTIMEZONE" \
	--network="host" \
	-v $DOCKERDATAPATH/wyl:/data/WatchYourLAN \
    aceberg/watchyourlan

Web GUI should be at http://localhost:8840

Install on Linux

Expand

All binary packages can be found in latest release. There are .deb, .rpm, .apk (Alpine Linux) and .tar.gz files.

Supported architectures: amd64, i386, arm_v5, arm_v6, arm_v7, arm64.
Dependencies: arp-scan, tzdata.

For amd64 there is a deb repo available

Config

Expand

Configuration can be done through config file, GUI or environment variables

Basic config

Variable Description Default
TZ Set your timezone for correct time
HOST Listen address 0.0.0.0
PORT Port for web GUI 8840
THEME Any theme name from https://bootswatch.com in lowcase or additional sand
COLOR Background color: light or dark dark
NODEPATH Path to local node modules
SHOUTRRR_URL WatchYourLAN uses Shoutrrr to send notifications. It is already integrated, just needs a correct URL. Examples for Discord, Email, Gotify, Matrix, Ntfy, Pushover, Slack, Telegram, Generic Webhook and etc are here

Scan settings

Variable Description Default
IFACES Interfaces to scan. Could be one or more, separated by space. See docs/VLAN_ARP_SCAN.md.
TIMEOUT Time between scans (seconds) 120
ARP_ARGS Arguments for arp-scan. Enable debug log level to see resulting command. (Example: -r 1). See docs/VLAN_ARP_SCAN.md.
ARP_STRS ARP_STRS_JOINED See docs/VLAN_ARP_SCAN.md.
LOG_LEVEL Log level: debug, info, warn or error info
TRIM_HIST Remove history after (hours) 48
HIST_IN_DB Store History in DB - if false, the History will be stored only in memory and will be lost on app restart. Though, it will keep the app DB smaller (and InfluxDB is recommended for long term History storage) false
USE_DB Either sqlite or postgres sqlite
PG_CONNECT Address to connect to PostgreSQL. (Example: postgres://username:password@192.168.0.1:5432/dbname?sslmode=disable). Full list of URL parameters here

InfluxDB2 config

This config matches Grafana's config for InfluxDB data source

Variable Description Default Example
INFLUX_ENABLE Enable export to InfluxDB2 false true
INFLUX_SKIP_TLS Skip TLS Verify false true
INFLUX_ADDR Address:port of InfluxDB2 server https://192.168.2.3:8086/
INFLUX_BUCKET InfluxDB2 bucket test
INFLUX_ORG InfluxDB2 org home
INFLUX_TOKEN Secret token, generated by InfluxDB2

Config file

Expand

Config file name is config_v2.yaml. Example:

arp_args: ""
color: dark
hist_in_db: false
host: 0.0.0.0
ifaces: enp4s0
influx_addr: ""
influx_bucket: ""
influx_enable: false
influx_org: ""
influx_skip_tls: false
influx_token: ""
log_level: info
nodepath: ""
pg_connect: ""
port: "8840"
shoutrrr_url: "gotify://192.168.0.1:8083/AwQqpAae.rrl5Ob/?title=Unknown host detected&DisableTLS=yes"
theme: sand
timeout: 60
trim_hist: 48
use_db: sqlite

Options

Expand
Key Description Default
-d Path to config dir /data/WatchYourLAN
-n Path to node modules (see below)

Local network only

Expand

By default, this app pulls themes, icons and fonts from the internet. But, in some cases, it may be useful to have an independent from global network setup. I created a separate image with all necessary modules and fonts. Run with Docker:

docker run --name node-bootstrap          \
    -p 8850:8850                          \
    aceberg/node-bootstrap
docker run --name wyl \
	-e "IFACES=$YOURIFACE" \
	-e "TZ=$YOURTIMEZONE" \
	--network="host" \
	-v $DOCKERDATAPATH/wyl:/data/WatchYourLAN \
    aceberg/watchyourlan -n "http://$YOUR_IP:8850"

Or use docker-compose

API & Integrations

Expand

API

Moved to docs/API.md

Integrations

Thanks

Expand

最近版本更新:(数据更新于 2024-09-04 04:40:12)

2024-09-02 22:25:52 2.0.1

2024-08-31 15:59:59 2.0.0

2024-01-06 01:13:18 1.0.6

2024-01-05 22:54:16 1.0.5

2023-11-06 14:22:46 1.0.4-try-goreleaser

2023-10-12 21:40:57 1.0.4

2023-10-08 15:02:21 1.0.3

2023-10-08 14:35:52 1.0.2-fix

2023-10-07 00:54:08 1.0.2

2023-08-18 14:36:47 1.0.1

主题(topics):

arp-scan, arp-scanner, intrusion-detection, monitoring, network-security, self-hosted, selfhosted

aceberg/WatchYourLAN同语言 Go最近更新仓库

2024-11-05 08:55:31 XTLS/Xray-core

2024-11-05 00:03:47 SagerNet/sing-box

2024-11-04 20:34:19 Permify/permify

2024-11-04 15:07:27 containerd/containerd

2024-11-03 20:10:56 flipped-aurora/gin-vue-admin

2024-11-03 00:46:25 dolthub/dolt