First commit with working service execution and a defined log output (0.20).

This commit is contained in:
Johannes Findeisen 2023-02-22 15:25:58 +01:00
commit c8fa991478
14 changed files with 63 additions and 177 deletions

View file

@ -1,37 +1,12 @@
; required options:
[monitor]
; Currently not used but should replace current usage of description. The description should be optional...
title = The Monitor Title
; The description must not but should be a unique description of the monitor for better identifying it in the datastore
; if a task is being used.
title = Uplink Status
description = Cable Provider Uplink Status
service = net.fritzboxuplink
hosts = 192.168.0.1,192.168.23.24,@group1,@testgroup1
; this is obsolete because the host will become part of the args but removing it now will break the code. linspector
; should be for checking local or remote stuff so a host is optional.
hosts = 192.168.1.1
; optional options when using notifications, plugins, services or tasks. btw. they still can be a required argument by
; a corresponding notification, plugin, service or task. they will need to check required args by themself and throw an
; exception if something fails. linspector never knows about required args:
[args]
; this only depends on the SLA you made with the product owner. this option is optional. the default is 300 seconds.
interval = 60
; notifications separated by ','. no whitespaces allowed. the case is not important.
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
; sms_receivers separated by ','. no whitespaces allowed
sms_receivers = +number1,+number2
; setting to None fails. just do not set this option. currently i get an error when tasks is not set here. need to be
; fixed. setting it like below works but is no good design for optional options. same for notifications.
tasks = redis
; maybe this should be some kind of range too, for example for the ping service like: 10.0.0.1>10.0.0.42 or more
; sophisticated kind of ranges... i will find a solution for that... like host groups in the old version of Linspector
; 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
; monitors can add their self into a hostgroup
hostgroups = group1
user = USERNAME
host = 192.168.1.1
password = PASSWORD
; only alert when the error reaches the threshold
threshold = 3
interval = 60

View file

@ -1,14 +1,10 @@
[monitor]
description = Cable Provider
service = Net.FritzboxUplink
hosts = 192.168.1.1
title = Uplink Status
description = DSL Provider Uplink Status
service = net.fritzboxuplink
hosts = 192.168.2.1
[args]
interval = 60
notifications = email
email_receivers = admin@example.com,fallback@example.com
sms_receivers = +number1,+number2
tasks = mariadb,file
user = USERNAME
host = 192.168.2.1
password = PASSWORD
hostgroups = group1
interval = 5