From f1487c77bf39639ccfb3220057b1a677bf8e7c5e Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Sat, 21 Oct 2023 17:29:47 +0000 Subject: [PATCH] Delete curl.py --- gui/metrics/curl.py | 210 -------------------------------------------- 1 file changed, 210 deletions(-) delete mode 100644 gui/metrics/curl.py diff --git a/gui/metrics/curl.py b/gui/metrics/curl.py deleted file mode 100644 index bf186c5..0000000 --- a/gui/metrics/curl.py +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# License: GNU General Public License v2 -# -# Author: thl-cmk[at]outlook[dot]com -# URL : https://thl-cmk.hopto.org -# Date : 2022-02-15 -# -# Metrics file for the curl plugin -# -# 2022-02-15: rewritten form cmk 2.0, based on the work by doc[at]snowheaven[dot]de -# 2022-02-20: added num_connects, num_redirects, size_download, size_header and speed_download -# 2022-03-13: moved cert time left graph to the end of graphs -# 2022-05-17: added scalars to cert_time_left - -from cmk.gui.i18n import _ - -from cmk.gui.plugins.metrics.utils import ( - metric_info, - graph_info, - perfometer_info, -) - -metric_info['time_namelookup'] = { - 'title': _('Time name lookup'), - 'unit': 's', - 'color': '11/a', -} -metric_info['time_connect'] = { - 'title': _('Time connect'), - 'unit': 's', - 'color': '21/a', -} -metric_info['time_appconnect'] = { - 'title': _('Time app connect'), - 'unit': 's', - 'color': '31/b', -} -metric_info['time_pretransfer'] = { - 'title': _('Time pre transfer'), - 'unit': 's', - 'color': '41/c', -} -metric_info['time_starttransfer'] = { - 'title': _('Time start transfer'), - 'unit': 's', - 'color': '13/b', -} -metric_info['time_total'] = { - 'title': _('Time Total'), - 'unit': 's', - 'color': '25/a', -} -metric_info['time_redirect'] = { - 'title': _('Time redirect'), - 'unit': 's', - 'color': '33/b', -} - -metric_info['num_connects'] = { - 'title': _('# of connects'), - 'unit': 'count', - 'color': '14/a', -} -metric_info['num_redirects'] = { - 'title': _('# of redirects'), - 'unit': 'count', - 'color': '24/b', -} -metric_info['num_headers'] = { - 'title': _('# of headers'), - 'unit': 'count', - 'color': '34/b', -} - -metric_info['size_download'] = { - 'title': _('Size download'), - 'unit': 'bytes', - 'color': '15/b', -} -metric_info['size_upload'] = { - 'title': _('Size upload'), - 'unit': 'bytes', - 'color': '25/b', -} - -metric_info['size_header'] = { - 'title': _('Size header'), - 'unit': 'bytes', - 'color': '35/b', -} -metric_info['size_request'] = { - 'title': _('Size request'), - 'unit': 'bytes', - 'color': '14/b', -} - -metric_info['speed_download'] = { - 'title': _('Speed download'), - 'unit': 'bytes/s', - 'color': '23/a', -} -metric_info['speed_upload'] = { - 'title': _('Speed upload'), - 'unit': 'bytes/s', - 'color': '13/a', -} - -metric_info['cert_time_left'] = { - 'title': _('Certificate Time left'), - 'unit': 's', - 'color': '33/b', -} - -graph_info['curl_times_total'] = { - 'title': _('Times total'), - 'metrics': [ - ('time_total', 'area'), - ], - 'scalars': [ - ('time_total:crit', _('crit')), - ('time_total:warn', _('warn')), - ], -} -graph_info['curl_times'] = { - 'title': _('Times'), - 'metrics': [ - ('time_redirect', 'line'), - ('time_starttransfer', 'line'), - ('time_pretransfer', 'line'), - ('time_appconnect', 'line'), - ('time_connect', 'line'), - ('time_namelookup', 'line'), - ], - 'optional_metrics': [ - 'time_redirect', - 'time_starttransfer', - 'time_pretransfer', - 'time_appconnect', - 'time_connect', - 'time_namelookup', - ], -} -graph_info['curl_speed'] = { - 'title': _('Speed'), - 'metrics': [ - ('speed_upload', '-area'), - ('speed_download', 'area'), - ], - 'optional_metrics': [ - 'speed_download', - 'speed_upload', - ], -} -graph_info['curl_size_download'] = { - 'title': _('Size download/upload'), - 'metrics': [ - ('size_upload', '-area'), - ('size_download', 'area'), - ], - 'optional_metrics': [ - 'size_upload', - 'size_download', - ], -} -graph_info['curl_size_header'] = { - 'title': _('Size header/request'), - 'metrics': [ - ('size_request', '-area'), - ('size_header', 'area'), - ], - 'optional_metrics': [ - 'size_request', - 'size_header', - ], -} -graph_info['curl_counts'] = { - 'title': _('Counts'), - 'metrics': [ - ('num_redirects', '-line'), - ('num_connects', 'line'), - ('num_headers', 'line'), - - ], - 'optional_metrics': [ - 'num_connects', - 'num_redirects', - 'num_headers', - ], -} -graph_info['curl_cert_time'] = { - 'title': _('Certificate time left'), - 'metrics': [ - ('cert_time_left', 'area'), - ], - 'scalars': [ - ('cert_time_left:crit', _('crit')), - ('cert_time_left:warn', _('warn')), - ], -} - -perfometer_info.append( - { - 'type': 'logarithmic', - 'metric': 'time_total', - 'half_value': 5.0, # 5 seconds -> bar half full - 'exponent': 2.0, # every double of 5 == 10% of bar more full - }, -) -- GitLab