LinuxMonitor 1.3.6__tar.gz → 1.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7/LinuxMonitor.egg-info}/PKG-INFO +1 -1
- {linuxmonitor-1.3.6/LinuxMonitor.egg-info → linuxmonitor-1.3.7}/PKG-INFO +1 -1
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/linuxmonitor/linuxmonitor.py +23 -23
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/setup.py +1 -1
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/LICENSE.md +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/LinuxMonitor.egg-info/SOURCES.txt +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/LinuxMonitor.egg-info/dependency_links.txt +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/LinuxMonitor.egg-info/requires.txt +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/LinuxMonitor.egg-info/top_level.txt +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/README.md +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/linuxmonitor/__init__.py +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/linuxmonitor/__main__.py +0 -0
- {linuxmonitor-1.3.6 → linuxmonitor-1.3.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
|
|
5
5
|
Home-page: https://github.com/QuentinCG/Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
|
|
5
5
|
Home-page: https://github.com/QuentinCG/Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -33,7 +33,7 @@ __email__ = "quentin@comte-gaz.com"
|
|
|
33
33
|
__license__ = "MIT License"
|
|
34
34
|
__copyright__ = "Copyright Quentin Comte-Gaz (2024)"
|
|
35
35
|
__python_version__ = "3.+"
|
|
36
|
-
__version__ = "1.3.
|
|
36
|
+
__version__ = "1.3.7 (2024/09/19)"
|
|
37
37
|
__status__ = "Usable for any Linux project"
|
|
38
38
|
|
|
39
39
|
import json
|
|
@@ -1896,17 +1896,17 @@ class LinuxMonitor:
|
|
|
1896
1896
|
try:
|
|
1897
1897
|
out_msg: str = ""
|
|
1898
1898
|
display_name: str = command_name
|
|
1899
|
-
for
|
|
1900
|
-
if
|
|
1901
|
-
display_name =
|
|
1902
|
-
command: str =
|
|
1903
|
-
is_private_cmd: bool =
|
|
1899
|
+
for command_config_key in self.config['commands'].keys():
|
|
1900
|
+
if self.config['commands'][command_config_key]['command'] == command_name:
|
|
1901
|
+
display_name = self.config['commands'][command_config_key]['display_name']
|
|
1902
|
+
command: str = self.config['commands'][command_config_key]['command']
|
|
1903
|
+
is_private_cmd: bool = self.config['commands'][command_config_key]['is_private']
|
|
1904
1904
|
|
|
1905
1905
|
if is_private or is_private == is_private_cmd:
|
|
1906
|
-
show_content_if_success: bool =
|
|
1907
|
-
show_content_if_issue: bool =
|
|
1908
|
-
is_content_json: bool =
|
|
1909
|
-
timeout_in_sec: int =
|
|
1906
|
+
show_content_if_success: bool = self.config['commands'][command_config_key].get('show_content_if_success', False)
|
|
1907
|
+
show_content_if_issue: bool = self.config['commands'][command_config_key].get('show_content_if_issue', False)
|
|
1908
|
+
is_content_json: bool = self.config['commands'][command_config_key].get('is_content_json', False)
|
|
1909
|
+
timeout_in_sec: int = self.config['commands'][command_config_key].get('timeout_in_sec', 10)
|
|
1910
1910
|
|
|
1911
1911
|
res: str = await self._execute_command(command=command, display_name=display_name, show_content_if_success=show_content_if_success, show_content_if_issue=show_content_if_issue, is_content_json=is_content_json, timeout_in_sec=timeout_in_sec, display_only_if_critical=False)
|
|
1912
1912
|
if res != "":
|
|
@@ -1932,18 +1932,18 @@ class LinuxMonitor:
|
|
|
1932
1932
|
try:
|
|
1933
1933
|
out_msg: str = ""
|
|
1934
1934
|
|
|
1935
|
-
for
|
|
1936
|
-
if is_private or is_private ==
|
|
1937
|
-
display_name: str =
|
|
1938
|
-
command: str =
|
|
1939
|
-
show_content_if_success: bool =
|
|
1940
|
-
show_content_if_issue: bool =
|
|
1941
|
-
is_content_json: bool =
|
|
1942
|
-
timeout_in_sec: int =
|
|
1935
|
+
for command_config_key in self.config['commands'].keys():
|
|
1936
|
+
if is_private or is_private == self.config['commands'][command_config_key]['is_private']:
|
|
1937
|
+
display_name: str = self.config['commands'][command_config_key]['display_name']
|
|
1938
|
+
command: str = self.config['commands'][command_config_key]['command']
|
|
1939
|
+
show_content_if_success: bool = self.config['commands'][command_config_key].get('show_content_if_success', False)
|
|
1940
|
+
show_content_if_issue: bool = self.config['commands'][command_config_key].get('show_content_if_issue', False)
|
|
1941
|
+
is_content_json: bool = self.config['commands'][command_config_key].get('is_content_json', False)
|
|
1942
|
+
timeout_in_sec: int = self.config['commands'][command_config_key].get('timeout_in_sec', 10)
|
|
1943
1943
|
|
|
1944
|
-
if is_scheduled_tasks_for_issues and not
|
|
1944
|
+
if is_scheduled_tasks_for_issues and not self.config['commands'][command_config_key].get('execute_in_scheduled_tasks_for_issues', False):
|
|
1945
1945
|
continue
|
|
1946
|
-
if is_scheduled_tasks_for_infos and not
|
|
1946
|
+
if is_scheduled_tasks_for_infos and not self.config['commands'][command_config_key].get('execute_in_scheduled_tasks_for_infos', False):
|
|
1947
1947
|
continue
|
|
1948
1948
|
|
|
1949
1949
|
res: str = await self._execute_command(command=command, display_name=display_name, show_content_if_success=show_content_if_success, show_content_if_issue=show_content_if_issue, is_content_json=is_content_json, timeout_in_sec=timeout_in_sec, display_only_if_critical=display_only_if_critical)
|
|
@@ -1962,9 +1962,9 @@ class LinuxMonitor:
|
|
|
1962
1962
|
async def list_commands(self, is_private: bool) -> str:
|
|
1963
1963
|
try:
|
|
1964
1964
|
out_msg: str = "# 📜 Commands 📜\n"
|
|
1965
|
-
for
|
|
1966
|
-
if is_private or is_private ==
|
|
1967
|
-
display_name: str =
|
|
1965
|
+
for command_config_key in self.config['commands'].keys():
|
|
1966
|
+
if is_private or is_private == self.config['commands'][command_config_key]['is_private']:
|
|
1967
|
+
display_name: str = self.config['commands'][command_config_key]['display_name']
|
|
1968
1968
|
out_msg += f"- {display_name}\n"
|
|
1969
1969
|
|
|
1970
1970
|
logging.info(msg=out_msg)
|
|
@@ -6,7 +6,7 @@ with io.open(file='README.md', mode='r', encoding='utf-8') as readme_file:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="LinuxMonitor",
|
|
9
|
-
version="1.3.
|
|
9
|
+
version="1.3.7",
|
|
10
10
|
description="Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)",
|
|
11
11
|
long_description=readme,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|