LinuxMonitor 1.1.0__tar.gz → 1.1.1__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.1.0
3
+ Version: 1.1.1
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
@@ -52,6 +52,7 @@ List of 'check' functionalities:
52
52
  - Check services status and restart them if needed
53
53
  - Check certificates expiration and validity
54
54
  - Check last user connections IPs
55
+ - Check uptime (to inform if the server has been rebooted)
55
56
 
56
57
  Additionnal functionalities:
57
58
  - Get hostname, OS details, kernel version, server datetime, uptime
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: LinuxMonitor
3
- Version: 1.1.0
3
+ Version: 1.1.1
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
@@ -52,6 +52,7 @@ List of 'check' functionalities:
52
52
  - Check services status and restart them if needed
53
53
  - Check certificates expiration and validity
54
54
  - Check last user connections IPs
55
+ - Check uptime (to inform if the server has been rebooted)
55
56
 
56
57
  Additionnal functionalities:
57
58
  - Get hostname, OS details, kernel version, server datetime, uptime
@@ -24,6 +24,7 @@ List of 'check' functionalities:
24
24
  - Check services status and restart them if needed
25
25
  - Check certificates expiration and validity
26
26
  - Check last user connections IPs
27
+ - Check uptime (to inform if the server has been rebooted)
27
28
 
28
29
  Additionnal functionalities:
29
30
  - Get hostname, OS details, kernel version, server datetime, uptime
@@ -13,6 +13,7 @@ Non exhaustive list of features (available by using it in shell or in python scr
13
13
  - Check services status and restart them if needed
14
14
  - Check certificates expiration and validity
15
15
  - Check last user connections IPs
16
+ - Check uptime (to inform if the server has been rebooted)
16
17
 
17
18
  - Get hostname, OS details, kernel version, server datetime, uptime
18
19
  - Get connected users
@@ -28,7 +29,7 @@ __email__ = "quentin@comte-gaz.com"
28
29
  __license__ = "MIT License"
29
30
  __copyright__ = "Copyright Quentin Comte-Gaz (2024)"
30
31
  __python_version__ = "3.+"
31
- __version__ = "1.1.0 (2024/09/14)"
32
+ __version__ = "1.1.1 (2024/09/14)"
32
33
  __status__ = "Usable for any Linux project"
33
34
 
34
35
  import json
@@ -675,13 +676,16 @@ class LinuxMonitor:
675
676
  dispo += f"{int(minutes)}min "
676
677
  if seconds >= 1:
677
678
  dispo += f"{int(seconds)}sec "
679
+ dispo += "ago"
678
680
 
679
681
  out_msg: str = ""
680
682
  if uptime_seconds < self.critical_uptime_seconds:
681
- out_msg = f"- 🚨 **Server restarted recently**:\n- {dispo}(started on {boot_time})"
683
+ out_msg = f"- 🚨 **Server restarted recently**:\n- {dispo} (started on {boot_time})"
684
+ logging.warning(msg=out_msg)
682
685
  elif not display_only_if_critical:
683
686
  if uptime_seconds < self.warning_uptime_seconds:
684
- out_msg = f"- ⚠️ **Server restarted recently**: {dispo}(started on {boot_time})"
687
+ out_msg = f"- ⚠️ **Server restarted recently**: {dispo} (started on {boot_time})"
688
+ logging.warning(msg=out_msg)
685
689
  else:
686
690
  # Funny emoji depending on uptime if everything is fine
687
691
  emoji: str = ""
@@ -702,7 +706,7 @@ class LinuxMonitor:
702
706
  else:
703
707
  emoji = "☢️"
704
708
 
705
- out_msg = f"- {emoji} **{dispo}**(started on {boot_time})"
709
+ out_msg = f"- {emoji} **{dispo}** (started on {boot_time})"
706
710
 
707
711
  if out_msg != "":
708
712
  out_msg = f"# 🕒 System availability 🕒\n{out_msg}"
@@ -1635,7 +1639,7 @@ class LinuxMonitor:
1635
1639
  datetime_last_services_error_displayed: Optional[datetime] = None
1636
1640
  need_to_check_uptime: bool = True # No need to check uptime every time (since once ok, it can't be wrong)
1637
1641
 
1638
- if not self.start_scheduled_task_show_info_immediately:
1642
+ if not self.start_scheduled_tasks_immediately:
1639
1643
  logging.info(msg=f"Waiting for {self.duration_in_sec_wait_between_each_schedule_task_execution} seconds before starting the execution of {'private' if is_private else 'public'} scheduled tasks...")
1640
1644
  await asyncio.sleep(delay=self.duration_in_sec_wait_between_each_schedule_task_execution)
1641
1645
 
@@ -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.1.0",
9
+ version="1.1.1",
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