LinuxMonitor 1.2.5__tar.gz → 1.2.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.2.5 → linuxmonitor-1.2.7/LinuxMonitor.egg-info}/PKG-INFO +1 -1
- {linuxmonitor-1.2.5/LinuxMonitor.egg-info → linuxmonitor-1.2.7}/PKG-INFO +1 -1
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/linuxmonitor/linuxmonitor.py +11 -8
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/setup.py +1 -1
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/LICENSE.md +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/LinuxMonitor.egg-info/SOURCES.txt +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/LinuxMonitor.egg-info/dependency_links.txt +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/LinuxMonitor.egg-info/requires.txt +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/LinuxMonitor.egg-info/top_level.txt +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/README.md +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/linuxmonitor/__init__.py +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/linuxmonitor/__main__.py +0 -0
- {linuxmonitor-1.2.5 → linuxmonitor-1.2.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.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.2.
|
|
3
|
+
Version: 1.2.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
|
|
@@ -30,7 +30,7 @@ __email__ = "quentin@comte-gaz.com"
|
|
|
30
30
|
__license__ = "MIT License"
|
|
31
31
|
__copyright__ = "Copyright Quentin Comte-Gaz (2024)"
|
|
32
32
|
__python_version__ = "3.+"
|
|
33
|
-
__version__ = "1.2.
|
|
33
|
+
__version__ = "1.2.7 (2024/09/16)"
|
|
34
34
|
__status__ = "Usable for any Linux project"
|
|
35
35
|
|
|
36
36
|
import json
|
|
@@ -232,13 +232,13 @@ class LinuxMonitor:
|
|
|
232
232
|
# Command returned an error code
|
|
233
233
|
if not show_only_std_and_exception:
|
|
234
234
|
out_msg = f"❌ **Error {display_name}**\n"
|
|
235
|
-
out_msg += f"- Error code: {returncode}"
|
|
235
|
+
out_msg += f" - Error code: `{returncode}`"
|
|
236
236
|
|
|
237
237
|
if stderr_str != "":
|
|
238
|
-
out_msg += f"\n- Error log:\n```sh\n{stderr_str}\n```"
|
|
238
|
+
out_msg += f"\n - Error log:\n```sh\n{stderr_str}\n```"
|
|
239
239
|
|
|
240
240
|
if stdout_str != "":
|
|
241
|
-
out_msg += f"\n- Info:\n```sh\n{stdout_str}\n```"
|
|
241
|
+
out_msg += f"\n - Info:\n```sh\n{stdout_str}\n```"
|
|
242
242
|
elif res == None:
|
|
243
243
|
# Command timed out
|
|
244
244
|
if not show_only_std_and_exception:
|
|
@@ -1080,21 +1080,24 @@ class LinuxMonitor:
|
|
|
1080
1080
|
if is_private or self.config["services"][service_name]['is_private'] == is_private:
|
|
1081
1081
|
status, status_msg = await self._get_service_status(is_private=is_private, service_name=service_name)
|
|
1082
1082
|
if status is False:
|
|
1083
|
-
out_msg = f"❌ **{self.config['services'][service_name]['display_name']} inactive**. Restarting the service is necessary."
|
|
1083
|
+
out_msg = f"- ❌ **{self.config['services'][service_name]['display_name']} inactive**. Restarting the service is necessary."
|
|
1084
1084
|
logging.warning(msg=out_msg)
|
|
1085
1085
|
if status_msg != "":
|
|
1086
1086
|
out_msg += f"\n{status_msg}"
|
|
1087
1087
|
|
|
1088
1088
|
out_msg_full += out_msg + "\n"
|
|
1089
|
-
out_msg_full += await self.restart_service(is_private=is_private, service_name=service_name) + "\n"
|
|
1089
|
+
out_msg_full += " - " + await self.restart_service(is_private=is_private, service_name=service_name) + "\n"
|
|
1090
1090
|
elif status is None:
|
|
1091
|
-
out_msg: str = f"⚠️ **Error checking status of {self.config['services'][service_name]['display_name']}** (not restarting it)."
|
|
1091
|
+
out_msg: str = f"- ⚠️ **Error checking status of {self.config['services'][service_name]['display_name']}** (not restarting it)."
|
|
1092
1092
|
logging.error(msg=out_msg)
|
|
1093
1093
|
out_msg_full += out_msg + "\n"
|
|
1094
1094
|
except Exception as e:
|
|
1095
|
-
out_msg_full = f"**Internal error during service status check.**:\n```sh\n{e}\n```"
|
|
1095
|
+
out_msg_full = f"- **Internal error during service status check.**:\n```sh\n{e}\n```"
|
|
1096
1096
|
logging.exception(msg=out_msg_full)
|
|
1097
1097
|
|
|
1098
|
+
if out_msg_full != "":
|
|
1099
|
+
out_msg_full = f"# 📱 Services status 📱\n{out_msg_full}"
|
|
1100
|
+
|
|
1098
1101
|
return out_msg_full
|
|
1099
1102
|
|
|
1100
1103
|
#endregion
|
|
@@ -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.2.
|
|
9
|
+
version="1.2.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
|