linspector/etc/linspector.conf
Johannes Findeisen 7e228a3196 Some more logging stuff. log is now a global function as argument.
Don't know if it is good, but it made things easier to me.
2022-10-06 02:42:15 +02:00

114 lines
No EOL
6.2 KiB
Text

; all you need to know: https://docs.python.org/3/library/configparser.html ... ;)
[linspector]
; report core errors to the following users
error_receivers = admin@example.com
; available log levels are: "error", "warning", "info" and "debug". if no log_level is set, it will be critical only.
log_level= debug
log_file = ~/code/linspector/linspector/log/linspector.log
; number of log files to be kept. i recommend to use the lowest sensible value for keeping performance high. so set
; the size of the log file higher to increase the log history.
log_file_count = 25
; log file size in megabytes as float.
;log_file_size = 1
; log file size in bytes as int. you can set to bytes if you want to set a value lower then 1 megabyte. but it will
; only be used when log_file_size is not set.
;log_file_size_bytes = 10485760
pid_file = /var/run/user/1000/linspector.pid
; plugins separated by ','. no whitespaces allowed! not case sensitive.
plugins = Lish,HTTPServer
; globally configured tasks will always run on all monitors when no task is configured there. if tasks are configured in
; a monitor then maybe only run tasks from the dedicated monitor. maybe it is a good idea to run global tasks in every
; monitor and the monitor can add tasks to the global settings... need to think about it.
; tasks separated by ','. no whitespaces allowed! not case sensitive.
tasks = SQLite
notifications = SMS
; maybe the run_mode is obsolete because this will be a daemon but maybe it is useful for one time execution?
; in uplink the available run_modes were cron, daemon and foreground
run_mode = cron
; members to send notifications to if something internally in Linspector went wrong.
members = superadmin@example.com,developers@example.com
; scheduler configuration
start_scheduler = true
; the mode the scheduler should run. options are, process or thread. default is the thread mode. process mode will run
; multiple processes, thread mode will run only one process with multiple threads. maybe this can be combined to run
; multiple processes with multiple threads... dont know this actually but reading the APScheduler documentation will
; explain this.... :) default is "thread" but Linspector will only run on one CPU core then. default threads are 1024
; but this can be set much higher here. this should be minimal set to the number of monitors you are running.
scheduler_mode = process
max_threads = 2048
; i recommend to set this to your number of CPU cores available when running on a dedicated Linspector host. but if the
; system is running other services you should lower this value when you have too high CPU load. if you have enough
; resources this value really can be higher then your available CPU cores.
max_processes = 48
; 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
; hostgroup parents; if the hostgroup "group1" is down, don't alert for the hosts in group2. see TODO.txt for more
; information.
[hostgroupparents]
; hostgroup group1 is parent of group2
group1 = group2
; a flexible way to define groups of hosts which can be used by monitors as target for monitoring for easily monitor
; groups without adding a monitor for each host. for some more information see the "hosts" section in gateway.conf.
; hostgroups can be defined in separate files in etc/hostgroups to be more flexible.
[hostgroups]
; add single hosts
group1 = host1,host2,host3
; add a range of ip addresses. maybe a different range operator should be chosen but for now i think ">" is sexy... :)
; for ip ranges see: https://stackoverflow.com/questions/19157307/generate-range-of-ips-in-python
group2 = 192.168.1.1>192.168.1.127
; add a combination of hosts and ranges
group3 = host1,host2,host3,192.168.1.1>192.168.1.127
; using groups inside groups. but need to take care about recursive dependencies.
group4 = host10,host11,host12,@group3
; member groups to define recipients for notifications. see hostgroups for more details.
[membergroups]
admins = admin1@example.com,admin2@example.com,admin3@example.com
developers = hanez@example.com
; just an idea taken from the old Linspector design. not tried but seems a good idea to add global options to monitor
; groups. no idea of an implementation yet.
[monitorgroups]
; members of monitors to automatically send notifications to all without need to set them in each monitor. members can
; be added to monitors in the configuration of each monitor though.
network1_members = admin@example.com,@admins
; every notification can be configured in it's own configuration file in etc/notifications; there no notification
; name as prefix is needed. see email example.
[notifications]
; values can be overridden in each defined monitor
sms_receivers = +number1,+number2
sms_configuration_file = ~/linspector/etc/gammurc
; retry to send interval and number of retries if something failed
sms_resend = 10
sms_resend_count = 5
email_resend = 10
; every plugin can be configured in it's own ini file in etc/plugins; there no plugin name as prefix is needed. see
; httpserver example.
[plugins]
; if types can or must be configured before use; for now no use case seen.
; every type can be configured in it's own ini file in etc/types; there no type name as prefix is not needed.
[services]
; run the speedtest not very often. it is not for alerting about problems bur maybe will be at some day.
speedtest_interval = 3600
; the file to get for calculation of the downlink speed. microsoft has very fast servers so it will become a meaningful
; result.
speedtest_url = https://go.microsoft.com/fwlink/?Linkid=850641
; tasks executed at the end of each monitor execution. this is for storing data for longtime analysis. not every task
; is storing results and this feature is fully optional. Linspector must run even without activated tasks!
[tasks]
mariadb_database = linspector
mariadb_host = 10.0.0.254
mariadb_password = PASSWORD
mariadb_port = 3306
mariadb_user = USER