Lot of bug fixing, optimizations and refactoring.

This commit is contained in:
Johannes Findeisen 2022-10-01 04:37:35 +02:00
commit 549510c3a4
19 changed files with 145 additions and 91 deletions

View file

@ -1,10 +1,15 @@
; required options:
[monitor]
; currently i get errors when the service option is not spelled correct. error handling need to fix this. same for
; notifications and tasks.
service = net.FritzboxUplink
service = net.fritzboxuplink
hosts = 192.168.0.1,192.168.23.24,@group1,@testgroup1
interval = 60
; optional options when using notifications, plugins, services or tasks:
[args]
; notifications separated by ','. no whitespaces allowed. the case is not important.
notifications = sMs,EmaiL
notifications = sms,emaiL
; values from main configuration can be overridden for each defined monitor
; email_receivers separated by ','. no whitespaces allowed
email_receivers = admin@example.com,fallback@example.com
@ -18,18 +23,10 @@ tasks = redis
; so we don't need to add a monitor for each host... but it would be a good idea to expose these to hostgroups
; internally to single hosts to become a monitor for each host internally. some more ideas are in ;)
; hosts with added hostgroup defined in main configuration file
hosts = 192.168.0.1,192.168.23.24,@group1,@testgroup1
; monitors can add their self into a hostgroup
hostgroup = group1
hostgroups = group1
user = USERNAME
password = PASSWORD
info = Cable Provider
; only alert when the error reaches the threshold
threshold = 3
; need to think about it but since Linspector does not know variables defined by a service, notification or task they
; need to be handed over as **kwargs dict. so i think it would be a good idea to put them here and just give over all
; these vars as a dict. for now only interval and service are know and even required arguments to get a service running.
[args]
foo = bar
bar = foo