-
Notifications
You must be signed in to change notification settings - Fork 477
/
Copy pathngx_http_vhost_traffic_status_display_json.h
265 lines (246 loc) · 16.8 KB
/
ngx_http_vhost_traffic_status_display_json.h
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
/*
* Copyright (C) YoungJoo Kim (vozlt)
*/
#ifndef _NGX_HTTP_VTS_DISPLAY_JSON_H_INCLUDED_
#define _NGX_HTTP_VTS_DISPLAY_JSON_H_INCLUDED_
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_S "{"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_OBJECT_S "\"%V\":{"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_ARRAY_S "\"%V\":["
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_ARRAY_E "]"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_OBJECT_E "}"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_E "}"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_NEXT ","
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_MAIN "\"hostName\":\"%V\"," \
"\"moduleVersion\":\"%s\"," \
"\"nginxVersion\":\"%s\"," \
"\"loadMsec\":%M," \
"\"nowMsec\":%M," \
"\"connections\":{" \
"\"active\":%uA," \
"\"reading\":%uA," \
"\"writing\":%uA," \
"\"waiting\":%uA," \
"\"accepted\":%uA," \
"\"handled\":%uA," \
"\"requests\":%uA" \
"}," \
"\"sharedZones\":{" \
"\"name\":\"%V\"," \
"\"maxSize\":%ui," \
"\"usedSize\":%ui," \
"\"usedNode\":%ui" \
"},"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_SERVER_S "\"serverZones\":{"
#if (NGX_HTTP_CACHE)
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_SERVER "\"%V\":{" \
"\"requestCounter\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"responses\":{" \
"\"1xx\":%uA," \
"\"2xx\":%uA," \
"\"3xx\":%uA," \
"\"4xx\":%uA," \
"\"5xx\":%uA," \
"\"miss\":%uA," \
"\"bypass\":%uA," \
"\"expired\":%uA," \
"\"stale\":%uA," \
"\"updating\":%uA," \
"\"revalidated\":%uA," \
"\"hit\":%uA," \
"\"scarce\":%uA" \
"}," \
"\"requestMsecCounter\":%uA," \
"\"requestMsec\":%M," \
"\"requestMsecs\":{" \
"\"times\":[%s]," \
"\"msecs\":[%s]" \
"}," \
"\"requestBuckets\":{" \
"\"msecs\":[%s]," \
"\"counters\":[%s]" \
"}," \
"\"overCounts\":{" \
"\"maxIntegerSize\":%s," \
"\"requestCounter\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"1xx\":%uA," \
"\"2xx\":%uA," \
"\"3xx\":%uA," \
"\"4xx\":%uA," \
"\"5xx\":%uA," \
"\"miss\":%uA," \
"\"bypass\":%uA," \
"\"expired\":%uA," \
"\"stale\":%uA," \
"\"updating\":%uA," \
"\"revalidated\":%uA," \
"\"hit\":%uA," \
"\"scarce\":%uA," \
"\"requestMsecCounter\":%uA" \
"}" \
"},"
#else
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_SERVER "\"%V\":{" \
"\"requestCounter\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"responses\":{" \
"\"1xx\":%uA," \
"\"2xx\":%uA," \
"\"3xx\":%uA," \
"\"4xx\":%uA," \
"\"5xx\":%uA" \
"}," \
"\"requestMsecCounter\":%uA," \
"\"requestMsec\":%M," \
"\"requestMsecs\":{" \
"\"times\":[%s]," \
"\"msecs\":[%s]" \
"}," \
"\"requestBuckets\":{" \
"\"msecs\":[%s]," \
"\"counters\":[%s]" \
"}," \
"\"overCounts\":{" \
"\"maxIntegerSize\":%s," \
"\"requestCounter\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"1xx\":%uA," \
"\"2xx\":%uA," \
"\"3xx\":%uA," \
"\"4xx\":%uA," \
"\"5xx\":%uA," \
"\"requestMsecCounter\":%uA" \
"}" \
"},"
#endif
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_FILTER_S "\"filterZones\":{"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_UPSTREAM_S "\"upstreamZones\":{"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_UPSTREAM "{\"server\":\"%V\"," \
"\"requestCounter\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"responses\":{" \
"\"1xx\":%uA," \
"\"2xx\":%uA," \
"\"3xx\":%uA," \
"\"4xx\":%uA," \
"\"5xx\":%uA" \
"}," \
"\"requestMsecCounter\":%uA," \
"\"requestMsec\":%M," \
"\"requestMsecs\":{" \
"\"times\":[%s]," \
"\"msecs\":[%s]" \
"}," \
"\"requestBuckets\":{" \
"\"msecs\":[%s]," \
"\"counters\":[%s]" \
"}," \
"\"responseMsecCounter\":%uA," \
"\"responseMsec\":%M," \
"\"responseMsecs\":{" \
"\"times\":[%s]," \
"\"msecs\":[%s]" \
"}," \
"\"responseBuckets\":{" \
"\"msecs\":[%s]," \
"\"counters\":[%s]" \
"}," \
"\"weight\":%ui," \
"\"maxFails\":%ui," \
"\"failTimeout\":%T," \
"\"backup\":%s," \
"\"down\":%s," \
"\"overCounts\":{" \
"\"maxIntegerSize\":%s," \
"\"requestCounter\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"1xx\":%uA," \
"\"2xx\":%uA," \
"\"3xx\":%uA," \
"\"4xx\":%uA," \
"\"5xx\":%uA," \
"\"requestMsecCounter\":%uA," \
"\"responseMsecCounter\":%uA" \
"}" \
"},"
#if (NGX_HTTP_CACHE)
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_CACHE_S "\"cacheZones\":{"
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_CACHE "\"%V\":{" \
"\"maxSize\":%uA," \
"\"usedSize\":%uA," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"responses\":{" \
"\"miss\":%uA," \
"\"bypass\":%uA," \
"\"expired\":%uA," \
"\"stale\":%uA," \
"\"updating\":%uA," \
"\"revalidated\":%uA," \
"\"hit\":%uA," \
"\"scarce\":%uA" \
"}," \
"\"overCounts\":{" \
"\"maxIntegerSize\":%s," \
"\"inBytes\":%uA," \
"\"outBytes\":%uA," \
"\"miss\":%uA," \
"\"bypass\":%uA," \
"\"expired\":%uA," \
"\"stale\":%uA," \
"\"updating\":%uA," \
"\"revalidated\":%uA," \
"\"hit\":%uA," \
"\"scarce\":%uA" \
"}" \
"},"
#endif
u_char *ngx_http_vhost_traffic_status_display_set_main(
ngx_http_request_t *r, u_char *buf);
u_char *ngx_http_vhost_traffic_status_display_set_server_node(
ngx_http_request_t *r,
u_char *buf, ngx_str_t *key,
ngx_http_vhost_traffic_status_node_t *vtsn);
u_char *ngx_http_vhost_traffic_status_display_set_server(
ngx_http_request_t *r, u_char *buf,
ngx_rbtree_node_t *node);
u_char *ngx_http_vhost_traffic_status_display_set_filter_node(
ngx_http_request_t *r, u_char *buf,
ngx_http_vhost_traffic_status_node_t *vtsn);
u_char *ngx_http_vhost_traffic_status_display_set_filter(
ngx_http_request_t *r, u_char *buf,
ngx_rbtree_node_t *node);
u_char *ngx_http_vhost_traffic_status_display_set_upstream_node(
ngx_http_request_t *r, u_char *buf,
ngx_http_upstream_server_t *us,
#if nginx_version > 1007001
ngx_http_vhost_traffic_status_node_t *vtsn
#else
ngx_http_vhost_traffic_status_node_t *vtsn, ngx_str_t *name
#endif
);
u_char *ngx_http_vhost_traffic_status_display_set_upstream_alone(
ngx_http_request_t *r, u_char *buf, ngx_rbtree_node_t *node);
u_char *ngx_http_vhost_traffic_status_display_set_upstream_group(
ngx_http_request_t *r, u_char *buf);
#if (NGX_HTTP_CACHE)
u_char *ngx_http_vhost_traffic_status_display_set_cache_node(
ngx_http_request_t *r, u_char *buf,
ngx_http_vhost_traffic_status_node_t *vtsn);
u_char *ngx_http_vhost_traffic_status_display_set_cache(
ngx_http_request_t *r, u_char *buf,
ngx_rbtree_node_t *node);
#endif
u_char *ngx_http_vhost_traffic_status_display_set(ngx_http_request_t *r,
u_char *buf);
void ngx_http_vhost_traffic_status_display_encode_uri(
ngx_http_request_t *r, ngx_str_t *uri);
#endif /* _NGX_HTTP_VTS_DISPLAY_JSON_H_INCLUDED_ */
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */