sync-monitor

module
v0.0.0-...-05d0980 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: Unlicense

README

Sync Monitor

Small tool to check delta from last repo sync. It reads lastsync file, which should contain last repository sync timestamp in unix format.

Usage

Minimal working example
sync-monitor --file /path/to/repo/lastsync
Full example
sync-monitor --file /path/to/repo/lastsync --port 1221 --interval 2m

Params

File

Lastsync file. Should exist.

Port

Port to expose metrics at. Leave empty or 0 for disable metrics.

Interval

Interval between checks.

SystemD daemon example

[Unit]
Description=Sync Monitor and Metrics
Wants=network-online.target
After=network-online.target nss-lookup.target

[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/usr/local/bin/sync-monitor --file /path/to/repo/lastsync --port 1221 --interval 2m

[Install]
WantedBy=multi-user.target

Build

With make
make binary
Without make
 CGO_ENABLED=0 go build github.com/kyberorg/sync-monitor/cmd/sync-monitor

About: State monitoring

Application can monitor Manjaro's state files. It reads timestamp from repo's state file and calculates delta (seconds between now and timestamp).

Usage
/usr/local/bin/sync-monitor
--manjaro.repo.path=/path/to/repo
--manjaro.repo.list=testing,stable,unstable
(other params are omiited)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL