Cleanups and README update.
This commit is contained in:
parent
eda404ef74
commit
7d5e372410
5 changed files with 24 additions and 20 deletions
17
README.md
17
README.md
|
|
@ -8,15 +8,17 @@ complicated. The idea still remains so here is the rebirth of Linspector. First
|
|||
of this rewrite where done as a new project named
|
||||
[monipy](https://git.unixpeople.org/linspector/monipy), but I moved to the name
|
||||
Linspector because I believe it is the better and cooler name... Old Linspector code is
|
||||
not available in any repository anymore, but I have archived it on my local disc.
|
||||
not available in this repository anymore, you can find it under
|
||||
[https://git.unixpeople.org/linspector/linspector-old]().
|
||||
|
||||
Hope this project it will become useful for someone at some day and not only for
|
||||
Hope this project will become useful for someone at some day and not only for
|
||||
me. Just give me some amount of time for the first usable release... ;)
|
||||
|
||||
## About
|
||||
|
||||
**Linspector** contains some tools and a daemon to monitor your infrastructure. It
|
||||
collects data for statistics and sends alerts in case of errors.
|
||||
**Linspector** contains a daemon and some tools to monitor your infrastructure. It
|
||||
collects data for statistics and sends alerts in case of errors. When extending Linspector
|
||||
with plugins it for example can provide a web interface etc.
|
||||
|
||||
This project is at a very early stage of development it is not able for usage.
|
||||
I design the software actually and try to convert my ideas to software. Code
|
||||
|
|
@ -61,6 +63,13 @@ According to: [https://wiki.unixpeople.org/linux_kernel_version_numbering](https
|
|||
not affect the documentation and _must_ not break the API.
|
||||
- **FIXES** _must_ never affect anything else then stability or security.
|
||||
|
||||
### Configuration file rules
|
||||
|
||||
- No inline comments so every available character can be used in values
|
||||
- Values can be overridden in each monitor
|
||||
- File names in etc/* are not important but section names and key names.
|
||||
- Comments can be inserted using ';' or '#'
|
||||
|
||||
## License
|
||||
|
||||
### MIT License
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
; all you need to know: https://docs.python.org/3/library/configparser.html ... ;)
|
||||
; manifest:
|
||||
; - no inline comments so every available character can be used in values
|
||||
; - values can be overridden in each monitor
|
||||
; - file names are not important but section names and key names.
|
||||
; - comments can be inserted using ',' or '#'
|
||||
[linspector]
|
||||
; report core errors to the following users
|
||||
error_receivers = admin@example.com
|
||||
|
|
@ -13,8 +8,8 @@ log_count = 5
|
|||
log_size = 10485760
|
||||
pid_file = /var/run/user/1000/linspector.pid
|
||||
; default delimiters '=' and ':' should be changed to ',' to be more native
|
||||
plugins = backend.HTTPServer
|
||||
tasks = database.MariaDB:storage.Logger
|
||||
plugins = HTTPServer
|
||||
tasks = MariaDB:Logger
|
||||
; 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
|
||||
|
|
@ -23,8 +18,8 @@ run_mode = cron
|
|||
; is needed. see email example.
|
||||
[notifications]
|
||||
; values can be overridden in each defined monitor
|
||||
sms_receivers = +34324234234:+324242344
|
||||
sms_configuration_file = ~/code/linspector/etc/gammurc
|
||||
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
|
||||
|
|
@ -43,6 +38,6 @@ speedtest_url = https://go.microsoft.com/fwlink/?Linkid=850641
|
|||
[tasks]
|
||||
mariadb_database = linspector
|
||||
mariadb_host = 10.0.0.254
|
||||
mariadb_password = 3qx7HfrxGNM83lqN
|
||||
mariadb_password = PASSWORD
|
||||
mariadb_port": 3306
|
||||
mariadb_user = uplink
|
||||
mariadb_user = USER
|
||||
|
|
@ -2,6 +2,6 @@
|
|||
resend = 20
|
||||
smtp_host = mail.example.com
|
||||
smtp_port = 25
|
||||
smtp_password = k4509knsd09
|
||||
smtp_user = alert@hanez.org
|
||||
smtp_password = PASSWORD
|
||||
smtp_user = alerts@example.com
|
||||
receivers = admin@example.com
|
||||
|
|
@ -84,9 +84,9 @@ class Configuration:
|
|||
else:
|
||||
return None
|
||||
|
||||
# this function can be called by notifications, plugins and types to set a default value if not
|
||||
# this function can be called by notifications, plugins etc. to set their default values if not
|
||||
# configured. since all objects have access to the configuration this should not be done from
|
||||
# any other place because it can break monipy.
|
||||
# any other place because it can break linspector.
|
||||
# maybe it can be used for dynamic runtime configuration later but need to think about it.
|
||||
def set_option(self, section, option, value):
|
||||
if not self.__configuration.has_option(section, option):
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ logger = getLogger('linspector')
|
|||
class Environment:
|
||||
"""
|
||||
Object for storing environment variables at runtime. These variables must not affect the
|
||||
stability of monipy.
|
||||
stability or runtime of Linspector.
|
||||
"""
|
||||
def __init__(self, configuration):
|
||||
self.__configuration = configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue