diff --git a/etc/linspector/linspector.ini b/etc/linspector/linspector.ini index 3f3fc59..d1b3f19 100644 --- a/etc/linspector/linspector.ini +++ b/etc/linspector/linspector.ini @@ -13,7 +13,7 @@ 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 = httpserver,mariadb,speedtest +plugins = HTTPServer,MariaDB ; 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 @@ -43,5 +43,7 @@ speedtest_url = https://go.microsoft.com/fwlink/?Linkid=850641 ; 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. -[types] -foo = bar \ No newline at end of file +[services] +foo = bar + +[tasks] \ No newline at end of file diff --git a/files/icons/linspector-150x150.png b/files/icons/linspector-150x150.png new file mode 100644 index 0000000..6d122e7 Binary files /dev/null and b/files/icons/linspector-150x150.png differ diff --git a/files/icons/linspector-16x16.png b/files/icons/linspector-16x16.png new file mode 100644 index 0000000..e92633b Binary files /dev/null and b/files/icons/linspector-16x16.png differ diff --git a/files/icons/linspector-40x40.png b/files/icons/linspector-40x40.png new file mode 100644 index 0000000..4f04ff6 Binary files /dev/null and b/files/icons/linspector-40x40.png differ diff --git a/files/images/30c3.png b/files/images/30c3.png new file mode 100644 index 0000000..807d67f Binary files /dev/null and b/files/images/30c3.png differ diff --git a/files/images/inspector-hat.svg b/files/images/inspector-hat.svg new file mode 100644 index 0000000..c5117fe --- /dev/null +++ b/files/images/inspector-hat.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + inspector hat + Sept 2009 + + + Franziska Sponsel + + + + + Franziska Sponsel + + + + + RRZE + + + + + inspector + hat + + + + + Beate Kaspar, Hendrik Eggers, Florian Löffler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/images/linspector-logo.svg b/files/images/linspector-logo.svg new file mode 100644 index 0000000..9f5edea --- /dev/null +++ b/files/images/linspector-logo.svg @@ -0,0 +1,4677 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/images/tux.svg b/files/images/tux.svg new file mode 100644 index 0000000..5794d0d --- /dev/null +++ b/files/images/tux.svg @@ -0,0 +1,1015 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/linspector/core/configuration.py b/linspector/core/configuration.py index 7d2a6f3..2f6cc79 100644 --- a/linspector/core/configuration.py +++ b/linspector/core/configuration.py @@ -42,7 +42,7 @@ class Configuration: # add keys and values from notifications, plugins and types defined in their subdir ini # files. - for target_section in ['notifications', 'plugins', 'types']: + for target_section in ['notifications', 'plugins', 'services', 'tasks']: # check if section exists before adding content. if not exists add the section. if not self.__configuration.has_section(target_section): self.__configuration.add_section(target_section) diff --git a/linspector/core/type.py b/linspector/core/service.py similarity index 100% rename from linspector/core/type.py rename to linspector/core/service.py diff --git a/linspector/core/types.py b/linspector/core/services.py similarity index 100% rename from linspector/core/types.py rename to linspector/core/services.py diff --git a/linspector/core/task.py b/linspector/core/task.py new file mode 100644 index 0000000..e2b4eff --- /dev/null +++ b/linspector/core/task.py @@ -0,0 +1,33 @@ +""" +This file is part of Linspector (https://linspector.org/) +Copyright (c) 2022 Johannes Findeisen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +from logging import getLogger + +logger = getLogger('linspector') + + +class Task: + + def __init__(self, configuration, environment): + self.__configuration = configuration + self.__environment = environment diff --git a/linspector/core/tasks.py b/linspector/core/tasks.py new file mode 100644 index 0000000..3090a64 --- /dev/null +++ b/linspector/core/tasks.py @@ -0,0 +1,33 @@ +""" +This file is part of Linspector (https://linspector.org/) +Copyright (c) 2022 Johannes Findeisen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +from logging import getLogger + +logger = getLogger('linspector') + + +class Tasks: + + def __init__(self, configuration, environment): + self.__configuration = configuration + self.__environment = environment diff --git a/linspector/notications/sms.py b/linspector/notications/sms.py index 592df07..1f47070 100644 --- a/linspector/notications/sms.py +++ b/linspector/notications/sms.py @@ -27,7 +27,7 @@ from linspector.core.notification import Notification logger = getLogger('linspector') -class SmsNotification(Notification): +class SMSNotification(Notification): def __init__(self, configuration, environment): super().__init__(configuration, environment) diff --git a/linspector/notications/twitter.py b/linspector/notications/twitter.py new file mode 100644 index 0000000..fbdfa48 --- /dev/null +++ b/linspector/notications/twitter.py @@ -0,0 +1,35 @@ +""" +This file is part of Linspector (https://linspector.org/) +Copyright (c) 2022 Johannes Findeisen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +from logging import getLogger +from linspector.core.notification import Notification + +logger = getLogger('linspector') + + +class TwitterNotification(Notification): + + def __init__(self, configuration, environment): + super().__init__(configuration, environment) + self.__configuration = configuration + self.__environment = environment diff --git a/linspector/notications/xmpp.py b/linspector/notications/xmpp.py new file mode 100644 index 0000000..94e0404 --- /dev/null +++ b/linspector/notications/xmpp.py @@ -0,0 +1,35 @@ +""" +This file is part of Linspector (https://linspector.org/) +Copyright (c) 2022 Johannes Findeisen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +from logging import getLogger +from linspector.core.notification import Notification + +logger = getLogger('linspector') + + +class XMPPNotification(Notification): + + def __init__(self, configuration, environment): + super().__init__(configuration, environment) + self.__configuration = configuration + self.__environment = environment diff --git a/linspector/plugins/lish.py b/linspector/plugins/lish.py new file mode 100644 index 0000000..a4ec8cd --- /dev/null +++ b/linspector/plugins/lish.py @@ -0,0 +1,36 @@ +""" +This file is part of Linspector (https://linspector.org/) +Copyright (c) 2022 Johannes Findeisen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +from logging import getLogger +from linspector.core.plugin import Plugin + +logger = getLogger('linspector') + + +# TODO: check for all required configuration options and set defaults if needed. +class LishPlugin(Plugin): + + def __init__(self, configuration, environment): + super().__init__(configuration, environment) + self.__configuration = configuration + self.__environment = environment diff --git a/linspector/plugins/mariadb.py b/linspector/tasks/mariadb.py similarity index 95% rename from linspector/plugins/mariadb.py rename to linspector/tasks/mariadb.py index c5f09ed..8799cd4 100644 --- a/linspector/plugins/mariadb.py +++ b/linspector/tasks/mariadb.py @@ -22,13 +22,13 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from logging import getLogger -from linspector.core.plugin import Plugin +from linspector.core.task import Task logger = getLogger('linspector') # TODO: check for all required configuration options and set defaults if needed. -class MariadbPlugin(Plugin): +class MariaDBTask(Task): def __init__(self, configuration, environment): super().__init__(configuration, environment) diff --git a/linspector/plugins/redis.py b/linspector/tasks/redis.py similarity index 95% rename from linspector/plugins/redis.py rename to linspector/tasks/redis.py index 83364b9..fc94352 100644 --- a/linspector/plugins/redis.py +++ b/linspector/tasks/redis.py @@ -22,13 +22,13 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from logging import getLogger -from linspector.core.plugin import Plugin +from linspector.core.task import Task logger = getLogger('linspector') # TODO: check for all required configuration options and set defaults if needed. -class RedisPlugin(Plugin): +class RedisPlugin(Task): def __init__(self, configuration, environment): super().__init__(configuration, environment) diff --git a/linspector/plugins/sqlite.py b/linspector/tasks/sqlite.py similarity index 95% rename from linspector/plugins/sqlite.py rename to linspector/tasks/sqlite.py index e2ccde2..afb74ff 100644 --- a/linspector/plugins/sqlite.py +++ b/linspector/tasks/sqlite.py @@ -22,13 +22,13 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from logging import getLogger -from linspector.core.plugin import Plugin +from linspector.core.task import Task logger = getLogger('linspector') # TODO: check for all required configuration options and set defaults if needed. -class SqlitePlugin(Plugin): +class SQLitePlugin(Task): def __init__(self, configuration, environment): super().__init__(configuration, environment)