A small GO based agent for monitoring CPU, Memory and Disk usage.
π Starting Probe...
π‘ Data logging is enabled.
π¨ Alarm is armed.
π€ Probe is watching.
Before you start, you need to install the prerequisites.
- Redis:
Version >= 5.0
for data logging
Downloads can be found at releases page on GitHub.
- GO:
Version >= 1.21
git clone [email protected]:petaki/probe.git
cd probe
go build
cp .env.example .env
The configruation is stored in the .env
file.
PATTERN*
- Prefix*PATTERN
- Suffix*PATTERN*
- ContainsPATTERN
- Exact match
PROBE_DISK_IGNORED=/dev,/var/lib/docker/*
PROBE_REDIS_URL=redis://127.0.0.1:6379/0
PROBE_REDIS_KEY_PREFIX=probe:
PROBE_DATA_LOG_ENABLED=true
PROBE_DATA_LOG_TIMEOUT=2592000
PROBE_ALARM_ENABLED=false
0
- Disabled
PROBE_ALARM_CPU_PERCENT=30
0
- Disabled
PROBE_ALARM_MEMORY_PERCENT=50
0
- Disabled
PROBE_ALARM_DISK_PERCENT=80
0
- Disabled
PROBE_ALARM_LOAD_VALUE=1.0
PROBE_ALARM_WEBHOOK_METHOD=POST
PROBE_ALARM_WEBHOOK_URL=http://127.0.0.1:4000/alarm
PROBE_ALARM_WEBHOOK_HEADER='{"Authorization": "Bearer TOKEN", "Accept": "application/json"}'
%p
- Probe%n
- Name of the watcher%a
- Alarm percent or value%u
- Used percent or value%t
- Timestamp inRFC3339
format%x
- Timestamp inUnix
format%l
- Satellite link (relative)
PROBE_ALARM_WEBHOOK_BODY='{"probe": "%p", "name": "%n", "alarm": %a, "used": %u, "timestamp_rfc3339": "%t", "timestamp_unix": %x, "link": "%l"}'
PROBE_ALARM_FILTER_ENABLED=false
0
- Disabled
PROBE_ALARM_FILTER_WAIT=5
0
- Disabled
PROBE_ALARM_FILTER_SLEEP=300
You can run the tests using the following command:
go test -v ./...
You can display the collected data with the Satellite.
- @dyipon for development ideas, bug reports and testing
If you are facing a problem with this package or found any bug, please open an issue on GitHub.
The MIT License (MIT). Please see License File for more information.