LinuxMonitor 1.3.10__tar.gz → 1.3.11__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.10
3
+ Version: 1.3.11
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.10
3
+ Version: 1.3.11
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.10 (2024/09/23)"
36
+ __version__ = "1.3.11 (2024/09/23)"
37
37
  __status__ = "Usable for any Linux project"
38
38
 
39
39
  import json
@@ -146,6 +146,8 @@ class LinuxMonitor:
146
146
  raise ValueError("The basic configuration must contain the 'warning_uptime_seconds' key")
147
147
  self.warning_uptime_seconds: int = basic_config.get('warning_uptime_seconds') # type: ignore
148
148
 
149
+ self.excluded_interfaces: List[str] = basic_config.get('excluded_interfaces', []) # type: ignore
150
+
149
151
  # Get the scheduled tasks for issues configuration
150
152
  if self.allow_scheduled_tasks_check_for_issues:
151
153
  schedule_check_for_issues_config: Dict[str, Any] = self.config.get('scheduled_tasks_check_for_issues', {}) # type: ignore
@@ -1831,11 +1833,8 @@ class LinuxMonitor:
1831
1833
  stats = psutil.net_if_stats()
1832
1834
  network_usage: str = ""
1833
1835
 
1834
- # List of interfaces to exclude (e.g., local interface)
1835
- excluded_interfaces = {"lo"}
1836
-
1837
1836
  for interface in interfaces:
1838
- if interface in excluded_interfaces or interface not in stats:
1837
+ if interface in self.excluded_interfaces or interface not in stats:
1839
1838
  continue
1840
1839
 
1841
1840
  ip_addresses = []
@@ -1924,7 +1923,9 @@ class LinuxMonitor:
1924
1923
  is_content_json: bool = self.config['commands'][command_config_key].get('is_content_json', False)
1925
1924
  timeout_in_sec: int = self.config['commands'][command_config_key].get('timeout_in_sec', 10)
1926
1925
 
1927
- 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)
1926
+ res: str = await self._execute_command(command=command, display_name=display_name, show_content_if_success=show_content_if_success,
1927
+ show_content_if_issue=show_content_if_issue, is_content_json=is_content_json,
1928
+ timeout_in_sec=timeout_in_sec, display_only_if_critical=False)
1928
1929
  if res != "":
1929
1930
  if out_msg != "":
1930
1931
  out_msg += "\n"
@@ -1962,7 +1963,9 @@ class LinuxMonitor:
1962
1963
  if is_scheduled_tasks_for_infos and not self.config['commands'][command_config_key].get('execute_in_scheduled_tasks_for_infos', False):
1963
1964
  continue
1964
1965
 
1965
- 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)
1966
+ res: str = await self._execute_command(command=command, display_name=display_name, show_content_if_success=show_content_if_success, # type: ignore
1967
+ show_content_if_issue=show_content_if_issue, is_content_json=is_content_json,
1968
+ timeout_in_sec=timeout_in_sec, display_only_if_critical=display_only_if_critical)
1966
1969
  if res != "":
1967
1970
  if out_msg != "":
1968
1971
  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.3.10",
9
+ version="1.3.11",
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