LinuxMonitor 1.3.3__tar.gz → 1.3.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: LinuxMonitor
3
- Version: 1.3.3
3
+ Version: 1.3.4
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
3
+ Version: 1.3.4
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.3 (2024/09/19)"
36
+ __version__ = "1.3.4 (2024/09/19)"
37
37
  __status__ = "Usable for any Linux project"
38
38
 
39
39
  import json
@@ -238,10 +238,10 @@ class LinuxMonitor:
238
238
  out_msg += f" - Error code: `{returncode}`"
239
239
 
240
240
  if stderr_str != "":
241
- out_msg += f"\n - Error log:\n```sh\n{stderr_str}\n```"
241
+ out_msg += f"\n - Error log:\n```sh\n{stderr_str}\n```"
242
242
 
243
243
  if stdout_str != "":
244
- out_msg += f"\n - Info:\n```sh\n{stdout_str}\n```"
244
+ out_msg += f"\n - Info:\n```sh\n{stdout_str}\n```"
245
245
  elif res == None:
246
246
  # Command timed out
247
247
  if not show_only_std_and_exception:
@@ -880,7 +880,7 @@ class LinuxMonitor:
880
880
 
881
881
  if not res and service_name_to_restart != "":
882
882
  restart_msg = await self.restart_service(is_private=is_private, service_name=service_name_to_restart, force_restart=False)
883
- out_msg += f"\n - {restart_msg}"
883
+ out_msg += f"\n - {restart_msg}"
884
884
 
885
885
  if out_msg != "":
886
886
  out_msg = f"# 🌐 Website access state 🌐\n{out_msg}"
@@ -1049,7 +1049,7 @@ class LinuxMonitor:
1049
1049
  res, out_msg = await self.execute_and_verify(command=status_command, display_name=f"état de {display_name}", show_only_std_and_exception=True, timeout_in_sec=timeout_in_sec, display_only_if_critical=False, check_also_stdout_not_containing=check_also_stdout_not_containing)
1050
1050
  return res, out_msg
1051
1051
  except Exception as e:
1052
- out_msg = f"⚠️ **Error checking status of service {service_name}**:\n```sh\n{e}\n```"
1052
+ out_msg = f" - ⚠️ **Error checking status of service {service_name}**:\n```sh\n{e}\n```"
1053
1053
  logging.exception(msg=out_msg)
1054
1054
  return None, out_msg
1055
1055
 
@@ -1089,10 +1089,10 @@ class LinuxMonitor:
1089
1089
  out_msg += "\n"
1090
1090
  out_msg += f"- {service_icon} {self.config['services'][service_name]['display_name']}: **{service_status}**"
1091
1091
  if status != True and status_msg != "":
1092
- out_msg += f"\n - {status_msg}"
1092
+ out_msg += f"\n{status_msg}"
1093
1093
 
1094
1094
  if status is False:
1095
- out_msg += f"\n - " + await self.restart_service(is_private=is_private, service_name=service_name, force_restart=False)
1095
+ out_msg += f"\n - " + await self.restart_service(is_private=is_private, service_name=service_name, force_restart=False)
1096
1096
 
1097
1097
  except Exception as e:
1098
1098
  out_msg = f"**Internal error checking services status**:\n```sh\n{e}\n```"
@@ -1258,7 +1258,7 @@ class LinuxMonitor:
1258
1258
 
1259
1259
  # Display the error of retrieving the certificate if there is one
1260
1260
  if cert_infos["error"]:
1261
- out_msg += f"\n - Reason: `{cert_infos['error']}`"
1261
+ out_msg += f"\n - Reason: `{cert_infos['error']}`"
1262
1262
  except Exception as e:
1263
1263
  out_msg = f"- ⚠️ **Error checking SSL certificate of [{display_name}](https://{hostname})**:\n```sh\n{e}\n```"
1264
1264
  logging.exception(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.3",
9
+ version="1.3.4",
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