summaryrefslogtreecommitdiffstats
path: root/src/go/plugin/go.d/modules/litespeed/charts.go
blob: b7309f287da4535f0c939d939c0359dd01deeb29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// SPDX-License-Identifier: GPL-3.0-or-later

package litespeed

import "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"

const (
	prioRequests = module.Priority + iota
	prioRequestsProcessing
	prioNetThroughputHttp
	prioNetThroughputHttps
	prioConnectionsHttp
	prioConnectionsHttps
	prioPublicCacheHits
	prioPrivateCacheHits
	prioStaticHits
)

var charts = module.Charts{
	requestsChart.Copy(),
	requestsProcessingChart.Copy(),

	netThroughputHttpChart.Copy(),
	netThroughputHttpsChart.Copy(),

	connectionsHttpChart.Copy(),
	connectionsHttpsChart.Copy(),

	publicCacheHitsChart.Copy(),
	privateCacheHitsChart.Copy(),
	staticCacheHitsChart.Copy(),
}

var (
	requestsChart = module.Chart{
		ID:       "requests",
		Title:    "Requests",
		Units:    "requests/s",
		Fam:      "requests",
		Ctx:      "litespeed.requests",
		Priority: prioRequests,
		Dims: module.Dims{
			{ID: "req_per_sec", Name: "requests", Div: precision},
		},
	}
	requestsProcessingChart = module.Chart{
		ID:       "requests_processing",
		Title:    "Processing requests",
		Units:    "requests",
		Fam:      "requests",
		Ctx:      "litespeed.requests_processing",
		Priority: prioRequestsProcessing,
		Dims: module.Dims{
			{ID: "req_processing", Name: "processing"},
		},
	}
)

var (
	netThroughputHttpChart = module.Chart{
		ID:       "net_throughput_http",
		Title:    "HTTP throughput",
		Units:    "kilobits/s",
		Fam:      "throughput",
		Ctx:      "litespeed.net_throughput",
		Type:     module.Area,
		Priority: prioNetThroughputHttp,
		Dims: module.Dims{
			{ID: "bps_in", Name: "in"},
			{ID: "bps_out", Name: "out", Div: -1},
		},
	}
	netThroughputHttpsChart = module.Chart{
		ID:       "net_throughput_https",
		Title:    "HTTPs throughput",
		Units:    "kilobits/s",
		Fam:      "throughput",
		Ctx:      "litespeed.net_ssl_throughput",
		Type:     module.Area,
		Priority: prioNetThroughputHttps,
		Dims: module.Dims{
			{ID: "ssl_bps_in", Name: "in"},
			{ID: "ssl_bps_out", Name: "out", Div: -1},
		},
	}
)

var (
	connectionsHttpChart = module.Chart{
		ID:       "connections_http",
		Title:    "HTTP connections",
		Units:    "connections",
		Fam:      "connections",
		Ctx:      "litespeed.connections",
		Type:     module.Stacked,
		Priority: prioConnectionsHttp,
		Dims: module.Dims{
			{ID: "availconn", Name: "free"},
			{ID: "plainconn", Name: "used"},
		},
	}
	connectionsHttpsChart = module.Chart{
		ID:       "connections_https",
		Title:    "HTTPs connections",
		Units:    "connections",
		Fam:      "connections",
		Ctx:      "litespeed.ssl_connections",
		Type:     module.Stacked,
		Priority: prioConnectionsHttps,
		Dims: module.Dims{
			{ID: "availssl", Name: "free"},
			{ID: "sslconn", Name: "used"},
		},
	}
)

var (
	publicCacheHitsChart = module.Chart{
		ID:       "pub_cache_hits",
		Title:    "Public cache hits",
		Units:    "hits/s",
		Fam:      "cache",
		Ctx:      "litespeed.public_cache",
		Priority: prioPublicCacheHits,
		Dims: module.Dims{
			{ID: "pub_cache_hits_per_sec", Name: "hits", Div: precision},
		},
	}
	privateCacheHitsChart = module.Chart{
		ID:       "private_cache_hits",
		Title:    "Private cache hits",
		Units:    "hits/s",
		Fam:      "cache",
		Ctx:      "litespeed.private_cache",
		Priority: prioPrivateCacheHits,
		Dims: module.Dims{
			{ID: "private_cache_hits_per_sec", Name: "hits", Div: precision},
		},
	}

	staticCacheHitsChart = module.Chart{
		ID:       "static_hits",
		Title:    "Static hits",
		Units:    "hits/s",
		Fam:      "static",
		Ctx:      "litespeed.static",
		Priority: prioStaticHits,
		Dims: module.Dims{
			{ID: "static_hits_per_sec", Name: "hits", Div: precision},
		},
	}
)