Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit a6990804 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 22007220
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
# 2022-04-26: made http(s) URLs clickable # 2022-04-26: made http(s) URLs clickable
# 2022-05-15: added workaround for raise ValueError("Cannot render negative timespan") # 2022-05-15: added workaround for raise ValueError("Cannot render negative timespan")
# 2022-05-17: fixed wrong import path for _TIME_UNITS and _gen_timespan_chunks # 2022-05-17: fixed wrong import path for _TIME_UNITS and _gen_timespan_chunks
# 2023-06-07: moved gui files to ~/local/lib/chek_mk/gui/plugins/...
# #
# Example output from agent: # Example output from agent:
......
File added
No preview for this file type
#!/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
},
)
This diff is collapsed.
...@@ -22,11 +22,10 @@ ...@@ -22,11 +22,10 @@
'download_url': 'https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/curl', 'download_url': 'https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/curl',
'files': {'agent_based': ['curl.py'], 'files': {'agent_based': ['curl.py'],
'agents': ['bakery/curl.py', 'plugins/curl.sh', 'plugins/curl.ps1'], 'agents': ['bakery/curl.py', 'plugins/curl.sh', 'plugins/curl.ps1'],
'web': ['plugins/wato/curl.py', 'plugins/metrics/curl.py']}, 'gui': ['metrics/curl.py', 'wato/curl.py']},
'name': 'curl', 'name': 'curl',
'num_files': 6,
'title': 'cURL agent plugin', 'title': 'cURL agent plugin',
'version': '20220515.v0.1.8c', 'version': '0.1.9-20230607',
'version.min_required': '2.0.0', 'version.min_required': '2.1.0b1',
'version.packaged': '2021.09.20', 'version.packaged': '2.1.0p21',
'version.usable_until': None} 'version.usable_until': None}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment