Skip to content

os-minmon.plugin.bash¤

minimal monitoring system configurations.

group:prenet | runtype:cron | deps: - | port: -

Usage
os-minmon install|uninstall|download|disable|configgen|configapply|check|run
$ os-minmon install - install minimal monitoring
$ os-minmon uninstall - uninstall minimal monitoring
$ os-minmon download - download minmon packages to pkg dir
$ os-minmon disable - disable minimal monitoring plugin
$ os-minmon configgen - generate minimal monitoring configuration files
$ os-minmon configapply - apply minimal monitoring configuration files
$ os-minmon check - check minimal monitoring plugin status
$ os-minmon run - run minimal monitoring
$ os-minmon help - show this help message
Description

This tool helps install, configure, and manage a minimal monitoring system for basic system health and performance tracking.

Jangbi Configs¤

/opt/jangbi/.config
RUN_OS_MINMON=1 # enable minimal monitoring
MINMON_INTERVAL="60" # monitoring interval in seconds

Check if running¤

bash command
$ pidof minmon
12345
$ tail -f /var/log/minmon.log
[2025-01-01 12:00:00] System check started

Current Configuration¤

Current configuration is stored in /etc/minmon/. it is generated by os-minmon configgen command on install. You can edit it manually and not run install or configapply commands to keep current configurations.

/etc/minmon/minmon.toml
[[actions]]
name = "Log error"
type = "Log"
level = "Error"
template = """{{check_name}} check didn't have valid data for alarm '{{alarm_name}}' and id '{{alarm_id}}': {{check_error}}."""

[log]
level = "Info" # Info|Debug|Warning|Error
target = "Stdout" # Stdout|Stderr|Journal

### net-darkstat start ###
[[checks]]
disable = false
name = "net-darkstat check"
type = "ProcessExitStatus"
# check optional
interval = 30
timeout = 5
# ProcessExitStatus
#path = "/usr/bin/pidof"
#arguments = ["dnsmasq"]
#status_code = [0,1]
path = "/opt/jangbi/init.sh"
arguments = ["--check","net-darkstat"]

[[checks.alarms]]
status_codes = [0]
disable = false
name = "net-darkstat alarm"
action = "net-darkstat run"
# alarms optional
cycles = 2
repeat_cycles = 100
error_repeat_cycles = 200
error_action = "Log error"

[[actions]]
name = "net-darkstat run"
type = "Process"
path = "/opt/jangbi/init.sh"
arguments = ["--launch","net-darkstat"]
### dnsmasq end ###

### net-dnsmasq start ###
[[checks]]
disable = false
name = "net-dnsmasq check"
type = "ProcessExitStatus"
# check optional
interval = 30
timeout = 5
# ProcessExitStatus
#path = "/usr/bin/pidof"
#arguments = ["dnsmasq"]
#status_code = [0,1]
path = "/opt/jangbi/init.sh"
arguments = ["--check","net-dnsmasq"]

[[checks.alarms]]
status_codes = [0]
disable = false
name = "net-dnsmasq alarm"
action = "net-dnsmasq run"
# alarms optional
cycles = 2
repeat_cycles = 100
error_repeat_cycles = 200
error_action = "Log error"

[[actions]]
name = "net-dnsmasq run"
type = "Process"
path = "/opt/jangbi/init.sh"
arguments = ["--launch","net-dnsmasq"]
### dnsmasq end ###