python.d remove litespeed (#17663)
Ilya Mashchenko committed
May 15, 2024 at 16:03 UTC
b4d536b44162d48634df48f1d9898d33fe456e0a
7 files changed
+1
-602
CMakeLists.txt
-2
@@ -2740,7 +2740,6 @@ install(FILES
2740
src/collectors/python.d.plugin/haproxy/haproxy.conf
2741
src/collectors/python.d.plugin/icecast/icecast.conf
2742
src/collectors/python.d.plugin/ipfs/ipfs.conf
2743
- src/collectors/python.d.plugin/litespeed/litespeed.conf
2743
src/collectors/python.d.plugin/memcached/memcached.conf
2744
src/collectors/python.d.plugin/monit/monit.conf
2745
src/collectors/python.d.plugin/nsd/nsd.conf
@@ -2782,7 +2781,6 @@ install(FILES
2781
src/collectors/python.d.plugin/haproxy/haproxy.chart.py
2782
src/collectors/python.d.plugin/icecast/icecast.chart.py
2783
src/collectors/python.d.plugin/ipfs/ipfs.chart.py
2785
- src/collectors/python.d.plugin/litespeed/litespeed.chart.py
2784
src/collectors/python.d.plugin/memcached/memcached.chart.py
2785
src/collectors/python.d.plugin/monit/monit.chart.py
2786
src/collectors/python.d.plugin/nsd/nsd.chart.py
src/collectors/python.d.plugin/litespeed/README.md
deleted
-1
@@ -1 +0,0 @@
1
-integrations/litespeed.md
\ No newline at end of file
src/collectors/python.d.plugin/litespeed/integrations/litespeed.md
deleted
-170
@@ -1,170 +0,0 @@
1
-<!--startmeta
2
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/litespeed/README.md"
3
-meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/litespeed/metadata.yaml"
4
-sidebar_label: "Litespeed"
5
-learn_status: "Published"
6
-learn_rel_path: "Collecting Metrics/Web Servers and Web Proxies"
7
-most_popular: False
8
-message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
9
-endmeta-->
10
-
11
-# Litespeed
12
-
13
-
14
-<img src="https://netdata.cloud/img/litespeed.svg" width="150"/>
15
-
16
-
17
-Plugin: python.d.plugin
18
-Module: litespeed
19
-
20
-<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
-
22
-## Overview
23
-
24
-Examine Litespeed metrics for insights into web server operations. Analyze request rates, response times, and error rates for efficient web service delivery.
25
-
26
-The collector uses the statistics under /tmp/lshttpd to gather the metrics.
27
-
28
-This collector is supported on all platforms.
29
-
30
-This collector only supports collecting metrics from a single instance of this integration.
31
-
32
-
33
-### Default Behavior
34
-
35
-#### Auto-Detection
36
-
37
-If no configuration is present, the collector will attempt to read files under /tmp/lshttpd/.
38
-
39
-#### Limits
40
-
41
-The default configuration for this integration does not impose any limits on data collection.
42
-
43
-#### Performance Impact
44
-
45
-The default configuration for this integration is not expected to impose a significant performance impact on the system.
46
-
47
-
48
-## Metrics
49
-
50
-Metrics grouped by *scope*.
51
-
52
-The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
53
-
54
-
55
-
56
-### Per Litespeed instance
57
-
58
-These metrics refer to the entire monitored application.
59
-
60
-This scope has no labels.
61
-
62
-Metrics:
63
-
64
-| Metric | Dimensions | Unit |
65
-|:------|:----------|:----|
66
-| litespeed.net_throughput | in, out | kilobits/s |
67
-| litespeed.net_ssl_throughput | in, out | kilobits/s |
68
-| litespeed.connections | free, used | conns |
69
-| litespeed.ssl_connections | free, used | conns |
70
-| litespeed.requests | requests | requests/s |
71
-| litespeed.requests_processing | processing | requests |
72
-| litespeed.public_cache | hits | hits/s |
73
-| litespeed.private_cache | hits | hits/s |
74
-| litespeed.static | hits | hits/s |
75
-
76
-
77
-
78
-## Alerts
79
-
80
-There are no alerts configured by default for this integration.
81
-
82
-
83
-## Setup
84
-
85
-### Prerequisites
86
-
87
-No action required.
88
-
89
-### Configuration
90
-
91
-#### File
92
-
93
-The configuration file name for this integration is `python.d/litespeed.conf`.
94
-
95
-
96
-You can edit the configuration file using the `edit-config` script from the
97
-Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
98
-
99
-```bash
100
-cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
101
-sudo ./edit-config python.d/litespeed.conf
102
-```
103
-#### Options
104
-
105
-There are 2 sections:
106
-
107
-* Global variables
108
-* One or more JOBS that can define multiple different instances to monitor.
109
-
110
-The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
111
-
112
-Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
113
-
114
-Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
115
-
116
-
117
-<details><summary>Config options</summary>
118
-
119
-| Name | Description | Default | Required |
120
-|:----|:-----------|:-------|:--------:|
121
-| update_every | Sets the default data collection frequency. | 5 | no |
122
-| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |
123
-| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |
124
-| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |
125
-| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | | no |
126
-| path | Use a different path than the default, where the lightspeed stats files reside. | /tmp/lshttpd/ | no |
127
-
128
-</details>
129
-
130
-#### Examples
131
-
132
-##### Set the path to statistics
133
-
134
-Change the path for the litespeed stats files
135
-
136
-```yaml
137
-localhost:
138
- name: 'local'
139
- path: '/tmp/lshttpd'
140
-
141
-```
142
-
143
-
144
-## Troubleshooting
145
-
146
-### Debug Mode
147
-
148
-To troubleshoot issues with the `litespeed` collector, run the `python.d.plugin` with the debug option enabled. The output
149
-should give you clues as to why the collector isn't working.
150
-
151
-- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
152
- your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
153
-
154
- ```bash
155
- cd /usr/libexec/netdata/plugins.d/
156
- ```
157
-
158
-- Switch to the `netdata` user.
159
-
160
- ```bash
161
- sudo -u netdata -s
162
- ```
163
-
164
-- Run the `python.d.plugin` to debug the collector:
165
-
166
- ```bash
167
- ./python.d.plugin litespeed debug trace
168
- ```
169
-
170
-
src/collectors/python.d.plugin/litespeed/litespeed.chart.py
deleted
-188
@@ -1,188 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-# Description: litespeed netdata python.d module
3
-# Author: Ilya Mashchenko (ilyam8)
4
-# SPDX-License-Identifier: GPL-3.0-or-later
5
-
6
-import glob
7
-import os
8
-import re
9
-from collections import namedtuple
10
-
11
-from bases.FrameworkServices.SimpleService import SimpleService
12
-
13
-update_every = 10
14
-
15
-# charts order (can be overridden if you want less charts, or different order)
16
-ORDER = [
17
- 'net_throughput_http', # net throughput
18
- 'net_throughput_https', # net throughput
19
- 'connections_http', # connections
20
- 'connections_https', # connections
21
- 'requests', # requests
22
- 'requests_processing', # requests
23
- 'pub_cache_hits', # cache
24
- 'private_cache_hits', # cache
25
- 'static_hits', # static
26
-]
27
-
28
-CHARTS = {
29
- 'net_throughput_http': {
30
- 'options': [None, 'Network Throughput HTTP', 'kilobits/s', 'net throughput',
31
- 'litespeed.net_throughput', 'area'],
32
- 'lines': [
33
- ['bps_in', 'in', 'absolute'],
34
- ['bps_out', 'out', 'absolute', -1]
35
- ]
36
- },
37
- 'net_throughput_https': {
38
- 'options': [None, 'Network Throughput HTTPS', 'kilobits/s', 'net throughput',
39
- 'litespeed.net_ssl_throughput', 'area'],
40
- 'lines': [
41
- ['ssl_bps_in', 'in', 'absolute'],
42
- ['ssl_bps_out', 'out', 'absolute', -1]
43
- ]
44
- },
45
- 'connections_http': {
46
- 'options': [None, 'Connections HTTP', 'conns', 'connections', 'litespeed.connections', 'stacked'],
47
- 'lines': [
48
- ['conn_free', 'free', 'absolute'],
49
- ['conn_used', 'used', 'absolute']
50
- ]
51
- },
52
- 'connections_https': {
53
- 'options': [None, 'Connections HTTPS', 'conns', 'connections', 'litespeed.ssl_connections', 'stacked'],
54
- 'lines': [
55
- ['ssl_conn_free', 'free', 'absolute'],
56
- ['ssl_conn_used', 'used', 'absolute']
57
- ]
58
- },
59
- 'requests': {
60
- 'options': [None, 'Requests', 'requests/s', 'requests', 'litespeed.requests', 'line'],
61
- 'lines': [
62
- ['requests', None, 'absolute', 1, 100]
63
- ]
64
- },
65
- 'requests_processing': {
66
- 'options': [None, 'Requests In Processing', 'requests', 'requests', 'litespeed.requests_processing', 'line'],
67
- 'lines': [
68
- ['requests_processing', 'processing', 'absolute']
69
- ]
70
- },
71
- 'pub_cache_hits': {
72
- 'options': [None, 'Public Cache Hits', 'hits/s', 'cache', 'litespeed.public_cache', 'line'],
73
- 'lines': [
74
- ['pub_cache_hits', 'hits', 'absolute', 1, 100]
75
- ]
76
- },
77
- 'private_cache_hits': {
78
- 'options': [None, 'Private Cache Hits', 'hits/s', 'cache', 'litespeed.private_cache', 'line'],
79
- 'lines': [
80
- ['private_cache_hits', 'hits', 'absolute', 1, 100]
81
- ]
82
- },
83
- 'static_hits': {
84
- 'options': [None, 'Static Hits', 'hits/s', 'static', 'litespeed.static', 'line'],
85
- 'lines': [
86
- ['static_hits', 'hits', 'absolute', 1, 100]
87
- ]
88
- }
89
-}
90
-
91
-t = namedtuple('T', ['key', 'id', 'mul'])
92
-
93
-T = [
94
- t('BPS_IN', 'bps_in', 8),
95
- t('BPS_OUT', 'bps_out', 8),
96
- t('SSL_BPS_IN', 'ssl_bps_in', 8),
97
- t('SSL_BPS_OUT', 'ssl_bps_out', 8),
98
- t('REQ_PER_SEC', 'requests', 100),
99
- t('REQ_PROCESSING', 'requests_processing', 1),
100
- t('PUB_CACHE_HITS_PER_SEC', 'pub_cache_hits', 100),
101
- t('PRIVATE_CACHE_HITS_PER_SEC', 'private_cache_hits', 100),
102
- t('STATIC_HITS_PER_SEC', 'static_hits', 100),
103
- t('PLAINCONN', 'conn_used', 1),
104
- t('AVAILCONN', 'conn_free', 1),
105
- t('SSLCONN', 'ssl_conn_used', 1),
106
- t('AVAILSSL', 'ssl_conn_free', 1),
107
-]
108
-
109
-RE = re.compile(r'([A-Z_]+): ([0-9.]+)')
110
-
111
-ZERO_DATA = {
112
- 'bps_in': 0,
113
- 'bps_out': 0,
114
- 'ssl_bps_in': 0,
115
- 'ssl_bps_out': 0,
116
- 'requests': 0,
117
- 'requests_processing': 0,
118
- 'pub_cache_hits': 0,
119
- 'private_cache_hits': 0,
120
- 'static_hits': 0,
121
- 'conn_used': 0,
122
- 'conn_free': 0,
123
- 'ssl_conn_used': 0,
124
- 'ssl_conn_free': 0,
125
-}
126
-
127
-
128
-class Service(SimpleService):
129
- def __init__(self, configuration=None, name=None):
130
- SimpleService.__init__(self, configuration=configuration, name=name)
131
- self.order = ORDER
132
- self.definitions = CHARTS
133
- self.path = self.configuration.get('path', '/tmp/lshttpd/')
134
- self.files = list()
135
-
136
- def check(self):
137
- if not self.path:
138
- self.error('"path" not specified')
139
- return False
140
-
141
- fs = glob.glob(os.path.join(self.path, '.rtreport*'))
142
-
143
- if not fs:
144
- self.error('"{0}" has no "rtreport" files or dir is not readable'.format(self.path))
145
- return None
146
-
147
- self.debug('stats files:', fs)
148
-
149
- for f in fs:
150
- if not is_readable_file(f):
151
- self.error('{0} is not readable'.format(f))
152
- continue
153
- self.files.append(f)
154
-
155
- return bool(self.files)
156
-
157
- def get_data(self):
158
- """
159
- Format data received from http request
160
- :return: dict
161
- """
162
- data = dict(ZERO_DATA)
163
-
164
- for f in self.files:
165
- try:
166
- with open(f) as b:
167
- lines = b.readlines()
168
- except (OSError, IOError) as err:
169
- self.error(err)
170
- return None
171
- else:
172
- parse_file(data, lines)
173
-
174
- return data
175
-
176
-
177
-def parse_file(data, lines):
178
- for line in lines:
179
- if not line.startswith(('BPS_IN:', 'MAXCONN:', 'PLAINCONN:', 'REQ_RATE []:')):
180
- continue
181
- m = dict(RE.findall(line))
182
- for v in T:
183
- if v.key in m:
184
- data[v.id] += float(m[v.key]) * v.mul
185
-
186
-
187
-def is_readable_file(v):
188
- return os.path.isfile(v) and os.access(v, os.R_OK)
src/collectors/python.d.plugin/litespeed/litespeed.conf
deleted
-72
@@ -1,72 +0,0 @@
1
-# netdata python.d.plugin configuration for litespeed
2
-#
3
-# This file is in YaML format. Generally the format is:
4
-#
5
-# name: value
6
-#
7
-# There are 2 sections:
8
-# - global variables
9
-# - one or more JOBS
10
-#
11
-# JOBS allow you to collect values from multiple sources.
12
-# Each source will have its own set of charts.
13
-#
14
-# JOB parameters have to be indented (using spaces only, example below).
15
-
16
-# ----------------------------------------------------------------------
17
-# Global Variables
18
-# These variables set the defaults for all JOBs, however each JOB
19
-# may define its own, overriding the defaults.
20
-
21
-# update_every sets the default data collection frequency.
22
-# If unset, the python.d.plugin default is used.
23
-# update_every: 1
24
-
25
-# priority controls the order of charts at the netdata dashboard.
26
-# Lower numbers move the charts towards the top of the page.
27
-# If unset, the default for python.d.plugin is used.
28
-# priority: 60000
29
-
30
-# penalty indicates whether to apply penalty to update_every in case of failures.
31
-# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
32
-# penalty: yes
33
-
34
-# autodetection_retry sets the job re-check interval in seconds.
35
-# The job is not deleted if check fails.
36
-# Attempts to start the job are made once every autodetection_retry.
37
-# This feature is disabled by default.
38
-# autodetection_retry: 0
39
-
40
-# ----------------------------------------------------------------------
41
-# JOBS (data collection sources)
42
-#
43
-# The default JOBS share the same *name*. JOBS with the same name
44
-# are mutually exclusive. Only one of them will be allowed running at
45
-# any time. This allows autodetection to try several alternatives and
46
-# pick the one that works.
47
-#
48
-# Any number of jobs is supported.
49
-#
50
-# All python.d.plugin JOBS (for all its modules) support a set of
51
-# predefined parameters. These are:
52
-#
53
-# job_name:
54
-# name: myname # the JOB's name as it will appear at the
55
-# # dashboard (by default is the job_name)
56
-# # JOBs sharing a name are mutually exclusive
57
-# update_every: 1 # the JOB's data collection frequency
58
-# priority: 60000 # the JOB's order on the dashboard
59
-# penalty: yes # the JOB's penalty
60
-# autodetection_retry: 0 # the JOB's re-check interval in seconds
61
-#
62
-# Additionally to the above, lightspeed also supports the following:
63
-#
64
-# path: 'PATH' # path to lightspeed stats files directory
65
-#
66
-# ----------------------------------------------------------------------
67
-# AUTO-DETECTION JOBS
68
-# only one of them will run (they have the same name)
69
-
70
-localhost:
71
- name : 'local'
72
- path : '/tmp/lshttpd/'
src/collectors/python.d.plugin/litespeed/metadata.yaml
deleted
-168
@@ -1,168 +0,0 @@
1
-plugin_name: python.d.plugin
2
-modules:
3
- - meta:
4
- plugin_name: python.d.plugin
5
- module_name: litespeed
6
- monitored_instance:
7
- name: Litespeed
8
- link: "https://www.litespeedtech.com/products/litespeed-web-server"
9
- categories:
10
- - data-collection.web-servers-and-web-proxies
11
- icon_filename: "litespeed.svg"
12
- related_resources:
13
- integrations:
14
- list: []
15
- info_provided_to_referring_integrations:
16
- description: ""
17
- keywords:
18
- - litespeed
19
- - web
20
- - server
21
- most_popular: false
22
- overview:
23
- data_collection:
24
- metrics_description: "Examine Litespeed metrics for insights into web server operations. Analyze request rates, response times, and error rates for efficient web service delivery."
25
- method_description: "The collector uses the statistics under /tmp/lshttpd to gather the metrics."
26
- supported_platforms:
27
- include: []
28
- exclude: []
29
- multi_instance: false
30
- additional_permissions:
31
- description: ""
32
- default_behavior:
33
- auto_detection:
34
- description: "If no configuration is present, the collector will attempt to read files under /tmp/lshttpd/."
35
- limits:
36
- description: ""
37
- performance_impact:
38
- description: ""
39
- setup:
40
- prerequisites:
41
- list: []
42
- configuration:
43
- file:
44
- name: python.d/litespeed.conf
45
- options:
46
- description: |
47
- There are 2 sections:
48
-
49
- * Global variables
50
- * One or more JOBS that can define multiple different instances to monitor.
51
-
52
- The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
53
-
54
- Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
55
-
56
- Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
57
- folding:
58
- title: "Config options"
59
- enabled: true
60
- list:
61
- - name: update_every
62
- description: Sets the default data collection frequency.
63
- default_value: 5
64
- required: false
65
- - name: priority
66
- description: Controls the order of charts at the netdata dashboard.
67
- default_value: 60000
68
- required: false
69
- - name: autodetection_retry
70
- description: Sets the job re-check interval in seconds.
71
- default_value: 0
72
- required: false
73
- - name: penalty
74
- description: Indicates whether to apply penalty to update_every in case of failures.
75
- default_value: yes
76
- required: false
77
- - name: name
78
- description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works.
79
- default_value: ""
80
- required: false
81
- - name: path
82
- description: Use a different path than the default, where the lightspeed stats files reside.
83
- default_value: "/tmp/lshttpd/"
84
- required: false
85
- examples:
86
- folding:
87
- enabled: false
88
- title: "Config"
89
- list:
90
- - name: Set the path to statistics
91
- description: Change the path for the litespeed stats files
92
- config: |
93
- localhost:
94
- name: 'local'
95
- path: '/tmp/lshttpd'
96
- troubleshooting:
97
- problems:
98
- list: []
99
- alerts: []
100
- metrics:
101
- folding:
102
- title: Metrics
103
- enabled: false
104
- description: ""
105
- availability: []
106
- scopes:
107
- - name: global
108
- description: "These metrics refer to the entire monitored application."
109
- labels: []
110
- metrics:
111
- - name: litespeed.net_throughput
112
- description: Network Throughput HTTP
113
- unit: "kilobits/s"
114
- chart_type: area
115
- dimensions:
116
- - name: in
117
- - name: out
118
- - name: litespeed.net_ssl_throughput
119
- description: Network Throughput HTTPS
120
- unit: "kilobits/s"
121
- chart_type: area
122
- dimensions:
123
- - name: in
124
- - name: out
125
- - name: litespeed.connections
126
- description: Connections HTTP
127
- unit: "conns"
128
- chart_type: stacked
129
- dimensions:
130
- - name: free
131
- - name: used
132
- - name: litespeed.ssl_connections
133
- description: Connections HTTPS
134
- unit: "conns"
135
- chart_type: stacked
136
- dimensions:
137
- - name: free
138
- - name: used
139
- - name: litespeed.requests
140
- description: Requests
141
- unit: "requests/s"
142
- chart_type: line
143
- dimensions:
144
- - name: requests
145
- - name: litespeed.requests_processing
146
- description: Requests In Processing
147
- unit: "requests"
148
- chart_type: line
149
- dimensions:
150
- - name: processing
151
- - name: litespeed.public_cache
152
- description: Public Cache Hits
153
- unit: "hits/s"
154
- chart_type: line
155
- dimensions:
156
- - name: hits
157
- - name: litespeed.private_cache
158
- description: Private Cache Hits
159
- unit: "hits/s"
160
- chart_type: line
161
- dimensions:
162
- - name: hits
163
- - name: litespeed.static
164
- description: Static Hits
165
- unit: "hits/s"
166
- chart_type: line
167
- dimensions:
168
- - name: hits
src/collectors/python.d.plugin/python.d.conf
+1
-1
@@ -48,7 +48,7 @@ hddtemp: no # Removed (replaced with go.d/hddtemp). Disabled for existing insta
48
hpssa: no
49
# icecast: yes
50
# ipfs: yes
51
-# litespeed: yes
51
+litespeed: no # Removed (replaced with go.d/litespeed). Disabled for existing installations.
52
# memcached: yes
53
# mongodb: yes
54
# monit: yes