diff --git a/bin/linspector b/bin/linspector index 1249e8e..3f5b7fe 100755 --- a/bin/linspector +++ b/bin/linspector @@ -5,6 +5,8 @@ Copyright (c) 2022 Johannes Findeisen . All Rights Reserved. See LICENSE.txt (MIT license). """ # TODO: VERY IMPORTANT! IMPLEMENT ERROR HANDLING ALL THE WAY...!!! +# Only exit execution on critical core errors. Do not exit when monitors are failing on +# configuration and execution, but log these errors. import argparse import sys diff --git a/etc/linspector.conf b/etc/linspector.conf index 484706f..5809e17 100644 --- a/etc/linspector.conf +++ b/etc/linspector.conf @@ -46,11 +46,12 @@ max_threads = 2048 max_processes = 24 ; if timezone is not set, UTC is used by default. timezone = CET -; this is for scheduling jobs to not run all at the same time. this should be set to the lowest interval you use. it -; can be set to a lower value if you only have a small amount of services you are monitoring. i recommend the lowest -; interval you use any any monitor. it is always starting with 0. default is 60. the current setting is for development -; only. -delta_range = 10 +; this is for scheduling jobs to not run all at the same time. this should not be set lower then the lowest interval +; you use in monitors. it can be set to a lower value if you only have a small amount of services you are monitoring. +; i recommend the lowest interval you use in any monitor but higher values will reduce cpu load when using monitors +; with a higher value then the delta_range. it is always starting with 0. default is 60. the current setting is for +; development only. +delta_range = 60 ; hostgroup parents; if the hostgroup "group1" is down, don't alert for the hosts in group2. see TODO.txt for more ; information. diff --git a/etc/monitors/network1/gateway.conf b/etc/monitors/network1/gateway.conf index b350b24..0199c5f 100644 --- a/etc/monitors/network1/gateway.conf +++ b/etc/monitors/network1/gateway.conf @@ -1,8 +1,10 @@ ; 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. -description = Cable Provider +description = Cable Provider Uplink Status service = net.fritzboxuplink hosts = 192.168.0.1,192.168.23.24,@group1,@testgroup1 diff --git a/etc/monitors/test/test10.conf b/etc/monitors/test/test10.conf index 030160e..46bf6a8 100644 --- a/etc/monitors/test/test10.conf +++ b/etc/monitors/test/test10.conf @@ -4,3 +4,4 @@ service = misc.dummy hosts = 192.168.10.10 [args] +interval = 60 diff --git a/etc/monitors/test/test11.conf b/etc/monitors/test/test11.conf new file mode 100644 index 0000000..64277e4 --- /dev/null +++ b/etc/monitors/test/test11.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test11 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test12.conf b/etc/monitors/test/test12.conf new file mode 100644 index 0000000..138ff6c --- /dev/null +++ b/etc/monitors/test/test12.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test12 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test13.conf b/etc/monitors/test/test13.conf new file mode 100644 index 0000000..249992c --- /dev/null +++ b/etc/monitors/test/test13.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test13 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test14.conf b/etc/monitors/test/test14.conf new file mode 100644 index 0000000..c30ba25 --- /dev/null +++ b/etc/monitors/test/test14.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test14 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test15.conf b/etc/monitors/test/test15.conf new file mode 100644 index 0000000..7758280 --- /dev/null +++ b/etc/monitors/test/test15.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test15 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test16.conf b/etc/monitors/test/test16.conf new file mode 100644 index 0000000..ea88b24 --- /dev/null +++ b/etc/monitors/test/test16.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test16 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test17.conf b/etc/monitors/test/test17.conf new file mode 100644 index 0000000..cd9010e --- /dev/null +++ b/etc/monitors/test/test17.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test17 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test18.conf b/etc/monitors/test/test18.conf new file mode 100644 index 0000000..dd9be51 --- /dev/null +++ b/etc/monitors/test/test18.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test18 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test19.conf b/etc/monitors/test/test19.conf new file mode 100644 index 0000000..12dc380 --- /dev/null +++ b/etc/monitors/test/test19.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test19 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test20.conf b/etc/monitors/test/test20.conf new file mode 100644 index 0000000..4419f9d --- /dev/null +++ b/etc/monitors/test/test20.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test20 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test21.conf b/etc/monitors/test/test21.conf new file mode 100644 index 0000000..7d137d9 --- /dev/null +++ b/etc/monitors/test/test21.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test21 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test22.conf b/etc/monitors/test/test22.conf new file mode 100644 index 0000000..bccaef7 --- /dev/null +++ b/etc/monitors/test/test22.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test22 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test23.conf b/etc/monitors/test/test23.conf new file mode 100644 index 0000000..059c9f0 --- /dev/null +++ b/etc/monitors/test/test23.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test23 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test24.conf b/etc/monitors/test/test24.conf new file mode 100644 index 0000000..b4451d2 --- /dev/null +++ b/etc/monitors/test/test24.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test24 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test25.conf b/etc/monitors/test/test25.conf new file mode 100644 index 0000000..78eef06 --- /dev/null +++ b/etc/monitors/test/test25.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test25 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test26.conf b/etc/monitors/test/test26.conf new file mode 100644 index 0000000..bad7b0d --- /dev/null +++ b/etc/monitors/test/test26.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test26 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test27.conf b/etc/monitors/test/test27.conf new file mode 100644 index 0000000..a21fa06 --- /dev/null +++ b/etc/monitors/test/test27.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test27 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test28.conf b/etc/monitors/test/test28.conf new file mode 100644 index 0000000..83dfc42 --- /dev/null +++ b/etc/monitors/test/test28.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test28 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test29.conf b/etc/monitors/test/test29.conf new file mode 100644 index 0000000..6ce8dec --- /dev/null +++ b/etc/monitors/test/test29.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test29 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test30.conf b/etc/monitors/test/test30.conf new file mode 100644 index 0000000..d1d0543 --- /dev/null +++ b/etc/monitors/test/test30.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test30 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test31.conf b/etc/monitors/test/test31.conf new file mode 100644 index 0000000..4b0a240 --- /dev/null +++ b/etc/monitors/test/test31.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test31 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test32.conf b/etc/monitors/test/test32.conf new file mode 100644 index 0000000..e434177 --- /dev/null +++ b/etc/monitors/test/test32.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test32 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test33.conf b/etc/monitors/test/test33.conf new file mode 100644 index 0000000..692089f --- /dev/null +++ b/etc/monitors/test/test33.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test33 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test34.conf b/etc/monitors/test/test34.conf new file mode 100644 index 0000000..0d27443 --- /dev/null +++ b/etc/monitors/test/test34.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test34 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test35.conf b/etc/monitors/test/test35.conf new file mode 100644 index 0000000..467773c --- /dev/null +++ b/etc/monitors/test/test35.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test35 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test36.conf b/etc/monitors/test/test36.conf new file mode 100644 index 0000000..cdc791a --- /dev/null +++ b/etc/monitors/test/test36.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test36 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test37.conf b/etc/monitors/test/test37.conf new file mode 100644 index 0000000..f6511f2 --- /dev/null +++ b/etc/monitors/test/test37.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test37 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test38.conf b/etc/monitors/test/test38.conf new file mode 100644 index 0000000..70225f1 --- /dev/null +++ b/etc/monitors/test/test38.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test38 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test39.conf b/etc/monitors/test/test39.conf new file mode 100644 index 0000000..c09c405 --- /dev/null +++ b/etc/monitors/test/test39.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test39 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60 diff --git a/etc/monitors/test/test40.conf b/etc/monitors/test/test40.conf new file mode 100644 index 0000000..708adce --- /dev/null +++ b/etc/monitors/test/test40.conf @@ -0,0 +1,7 @@ +[monitor] +description = Test40 +service = misc.dummy +hosts = 192.168.10.10 + +[args] +interval = 60