eping 4.4__tar.gz → 4.6__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.4
2
2
  Name: eping
3
- Version: 4.4
3
+ Version: 4.6
4
4
  Summary: Continuous ICMP reachability monitor built on fping, with a CSV logfile analyser (epinga)
5
5
  Author-email: Ewald Jeitler <ewald@jeitler.cc>
6
6
  License: GPL-3.0-or-later
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Dynamic: license-file
19
19
 
20
- # eping.py 4.04
20
+ # eping.py 4.06
21
21
 
22
22
  Continuous ICMP reachability monitor built on `fping`. Scans a host list in a loop,
23
23
  reports each host UP/DOWN/NO-DNS, counts state changes. CLI (curses) or web GUI.
@@ -1,4 +1,4 @@
1
- # eping.py 4.04
1
+ # eping.py 4.06
2
2
 
3
3
  Continuous ICMP reachability monitor built on `fping`. Scans a host list in a loop,
4
4
  reports each host UP/DOWN/NO-DNS, counts state changes. CLI (curses) or web GUI.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eping"
7
- version = "4.04"
7
+ version = "4.06"
8
8
  description = "Continuous ICMP reachability monitor built on fping, with a CSV logfile analyser (epinga)"
9
9
  readme = "README.md"
10
10
  license = { text = "GPL-3.0-or-later" }
@@ -7,7 +7,7 @@
7
7
  # I knew how it worked.
8
8
  # Now, only god knows it!
9
9
  # - - - - - - - - - - - - - - - - - - - - - - - -
10
- VERSION = '4.04'
10
+ VERSION = '4.06'
11
11
  version = VERSION # legacy alias (kept for existing references)
12
12
 
13
13
  # --- scaling limits ---
@@ -956,7 +956,7 @@ def ssh_apply_pending():
956
956
  return
957
957
  old = SOURCE_LABEL
958
958
  ssh_activate(p if p is not False else None)
959
- _source_events.append('SOURCE SWITCH %s -> %s' % (old, SOURCE_LABEL))
959
+ _source_events.append((get_date_time(), 'SOURCE SWITCH %s -> %s' % (old, SOURCE_LABEL)))
960
960
 
961
961
  def ssh_init(target, key, hostkey='accept-new', resolve=True):
962
962
  """-ssh at startup: ask for the secret, trust the host key (ssh's own prompt), verify
@@ -1065,8 +1065,8 @@ def source_set(down, reason=''):
1065
1065
  if down != _source_down:
1066
1066
  _source_down = down
1067
1067
  # logged as a comment row (shown in epinga.py's comment timeline)
1068
- _source_events.append(('JUMPHOST %s OFFLINE: %s' % (SOURCE_LABEL, reason)) if down
1069
- else ('JUMPHOST %s ONLINE again' % SOURCE_LABEL))
1068
+ _source_events.append((get_date_time(), ('JUMPHOST %s OFFLINE: %s' % (SOURCE_LABEL, reason)) if down
1069
+ else ('JUMPHOST %s ONLINE again' % SOURCE_LABEL)))
1070
1070
 
1071
1071
  _fping_caps = None
1072
1072
  def fping_capabilities():
@@ -1682,8 +1682,10 @@ def fping_cmd(summary_hosts_list, lock, cmd_base=None):
1682
1682
  elif ssh_target and line.strip():
1683
1683
  stray.append(line.strip())
1684
1684
  ping.wait()
1685
- if ssh_target and (ping.returncode == 255 or (not fping_result_data and ping.returncode not in (0, 1, 2)
1686
- and not _abort_scan)):
1685
+ # a scan cut short by a command (scan_abort) ends the ssh client with exit 255 ("Killed
1686
+ # by signal 15"): that is not a lost jump host
1687
+ if ssh_target and not _abort_scan and (ping.returncode == 255 or (
1688
+ not fping_result_data and ping.returncode not in (0, 1, 2))):
1687
1689
  _source_fail_reason = (' / '.join(stray) or ('ssh/fping exit ' + str(ping.returncode)))[:200]
1688
1690
  with _procs_lock:
1689
1691
  try:
@@ -2622,7 +2624,7 @@ def update_host_state(host_state, fping_result_data_sorted, tz_offset,
2622
2624
  now_str = get_date_time()
2623
2625
  while _source_events:
2624
2626
  _ev = _source_events.pop(0)
2625
- write_log_comment(logging_enabled, logfile_file_name, _ev, tz_offset) # shown in the report's comment timeline
2627
+ write_log_comment(logging_enabled, logfile_file_name, _ev[1], tz_offset, now_str=_ev[0]) # time of the event, not of the write # shown in the report's comment timeline
2626
2628
  if down_streak is None:
2627
2629
  down_streak = {}
2628
2630
  # process in real chronological order (not the IP/hostname sort order the caller
@@ -2728,7 +2730,7 @@ def neutralize_csv_formula(text):
2728
2730
  return "'" + text
2729
2731
  return text
2730
2732
 
2731
- def write_log_comment(logging_enabled, logfile_file_name, comment_text, tz_offset=0):
2733
+ def write_log_comment(logging_enabled, logfile_file_name, comment_text, tz_offset=0, now_str=None):
2732
2734
  """Append a free-text, timestamped comment row to the CSV log (if logging is on).
2733
2735
 
2734
2736
  Uses the sentinel HOSTNAME '#COMMENT#' so epinga.py can split these rows out
@@ -2740,7 +2742,7 @@ def write_log_comment(logging_enabled, logfile_file_name, comment_text, tz_offse
2740
2742
  """
2741
2743
  if not logging_enabled or not comment_text:
2742
2744
  return False
2743
- now_str = get_date_time()
2745
+ now_str = now_str or get_date_time()
2744
2746
  ts = datetime.datetime.strptime(now_str, "%d/%m/%Y %H:%M:%S")
2745
2747
  if tz_offset:
2746
2748
  ts = ts + datetime.timedelta(hours=tz_offset)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eping
3
- Version: 4.4
3
+ Version: 4.6
4
4
  Summary: Continuous ICMP reachability monitor built on fping, with a CSV logfile analyser (epinga)
5
5
  Author-email: Ewald Jeitler <ewald@jeitler.cc>
6
6
  License: GPL-3.0-or-later
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Dynamic: license-file
19
19
 
20
- # eping.py 4.04
20
+ # eping.py 4.06
21
21
 
22
22
  Continuous ICMP reachability monitor built on `fping`. Scans a host list in a loop,
23
23
  reports each host UP/DOWN/NO-DNS, counts state changes. CLI (curses) or web GUI.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes