LinuxMonitor 1.0.2__tar.gz → 1.0.3__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.0.2 → linuxmonitor-1.0.3/LinuxMonitor.egg-info}/PKG-INFO +1 -1
- {linuxmonitor-1.0.2/LinuxMonitor.egg-info → linuxmonitor-1.0.3}/PKG-INFO +1 -1
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/linuxmonitor/linuxmonitor.py +5 -4
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/setup.py +1 -1
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/LICENSE.md +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/LinuxMonitor.egg-info/SOURCES.txt +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/LinuxMonitor.egg-info/dependency_links.txt +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/LinuxMonitor.egg-info/requires.txt +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/LinuxMonitor.egg-info/top_level.txt +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/README.md +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/linuxmonitor/__init__.py +0 -0
- {linuxmonitor-1.0.2 → linuxmonitor-1.0.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
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.0.
|
|
3
|
+
Version: 1.0.3
|
|
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
|
|
@@ -28,7 +28,7 @@ __email__ = "quentin@comte-gaz.com"
|
|
|
28
28
|
__license__ = "MIT License"
|
|
29
29
|
__copyright__ = "Copyright Quentin Comte-Gaz (2024)"
|
|
30
30
|
__python_version__ = "3.+"
|
|
31
|
-
__version__ = "1.0.
|
|
31
|
+
__version__ = "1.0.3 (2024/09/13)"
|
|
32
32
|
__status__ = "Usable for any Linux project"
|
|
33
33
|
|
|
34
34
|
import json
|
|
@@ -701,7 +701,7 @@ class LinuxMonitor:
|
|
|
701
701
|
|
|
702
702
|
#region Ping Websites
|
|
703
703
|
|
|
704
|
-
def _ping_website(self, website: str, display_name: str, display_only_if_critical: bool=False) -> str:
|
|
704
|
+
def _ping_website(self, website: str, display_name: str, timeout_in_sec: int, display_only_if_critical: bool=False) -> str:
|
|
705
705
|
"""
|
|
706
706
|
Ping a website.
|
|
707
707
|
|
|
@@ -715,7 +715,7 @@ class LinuxMonitor:
|
|
|
715
715
|
display_name = f"[{display_name}](https://{website})"
|
|
716
716
|
|
|
717
717
|
start_time: float = time.time()
|
|
718
|
-
res, out_msg = self.execute_and_verify(command=ping_command, display_name=f"ping {display_name}", timeout_in_sec=
|
|
718
|
+
res, out_msg = self.execute_and_verify(command=ping_command, display_name=f"ping {display_name}", timeout_in_sec=timeout_in_sec, display_only_if_critical=display_only_if_critical)
|
|
719
719
|
end_time: float = time.time()
|
|
720
720
|
|
|
721
721
|
if res == True and not display_only_if_critical:
|
|
@@ -737,7 +737,8 @@ class LinuxMonitor:
|
|
|
737
737
|
out_msg: str = ""
|
|
738
738
|
for ping_config in self.config['pings']:
|
|
739
739
|
if is_private or is_private == ping_config['is_private']:
|
|
740
|
-
|
|
740
|
+
timeout_in_sec: int = ping_config.get('timeout_in_sec', 5)
|
|
741
|
+
result: str = self._ping_website(website=ping_config['website'], display_name=ping_config['display_name'], timeout_in_sec=timeout_in_sec, display_only_if_critical=display_only_if_critical)
|
|
741
742
|
if result:
|
|
742
743
|
if out_msg:
|
|
743
744
|
out_msg += "\n"
|
|
@@ -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.0.
|
|
9
|
+
version="1.0.3",
|
|
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
|