prometheus

Форк
0
324 строки · 9.9 Кб
1
import { ScrapePools, Target } from '../target';
2

3
export const targetGroups: ScrapePools = Object.freeze({
4
  blackbox: {
5
    upCount: 2,
6
    targets: [
7
      {
8
        discoveredLabels: {
9
          __address__: 'http://prometheus.io',
10
          __metrics_path__: '/probe',
11
          __param_module: 'http_2xx',
12
          __scheme__: 'http',
13
          job: 'blackbox',
14
        },
15
        labels: {
16
          instance: 'http://prometheus.io',
17
          job: 'blackbox',
18
        },
19
        scrapePool: 'blackbox',
20
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=http%3A%2F%2Fprometheus.io',
21
        globalUrl: 'http://localhost.localdomain:9115/probe?module=http_2xx&target=http%3A%2F%2Fprometheus.io',
22
        lastError: '',
23
        lastScrape: '2019-11-04T11:52:14.759299-07:00',
24
        lastScrapeDuration: 36560147,
25
        health: 'up',
26
        scrapeInterval: '15s',
27
        scrapeTimeout: '500ms',
28
      },
29
      {
30
        discoveredLabels: {
31
          __address__: 'https://prometheus.io',
32
          __metrics_path__: '/probe',
33
          __param_module: 'http_2xx',
34
          __scheme__: 'http',
35
          job: 'blackbox',
36
        },
37
        labels: {
38
          instance: 'https://prometheus.io',
39
          job: 'blackbox',
40
        },
41
        scrapePool: 'blackbox',
42
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=https%3A%2F%2Fprometheus.io',
43
        globalUrl: 'http://localhost.localdomain:9115/probe?module=http_2xx&target=https%3A%2F%2Fprometheus.io',
44
        lastError: '',
45
        lastScrape: '2019-11-04T11:52:24.731096-07:00',
46
        lastScrapeDuration: 49448763,
47
        health: 'up',
48
        scrapeInterval: '15s',
49
        scrapeTimeout: '500ms',
50
      },
51
      {
52
        discoveredLabels: {
53
          __address__: 'http://example.com:8080',
54
          __metrics_path__: '/probe',
55
          __param_module: 'http_2xx',
56
          __scheme__: 'http',
57
          job: 'blackbox',
58
        },
59
        labels: {
60
          instance: 'http://example.com:8080',
61
          job: 'blackbox',
62
        },
63
        scrapePool: 'blackbox',
64
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=http%3A%2F%2Fexample.com%3A8080',
65
        globalUrl: 'http://localhost.localdomain:9115/probe?module=http_2xx&target=http%3A%2F%2Fexample.com%3A8080',
66
        lastError: '',
67
        lastScrape: '2019-11-04T11:52:13.516654-07:00',
68
        lastScrapeDuration: 120916592,
69
        health: 'down',
70
        scrapeInterval: '15s',
71
        scrapeTimeout: '500ms',
72
      },
73
    ] as Target[],
74
  },
75
  node_exporter: {
76
    upCount: 1,
77
    targets: [
78
      {
79
        discoveredLabels: {
80
          __address__: 'localhost:9100',
81
          __metrics_path__: '/metrics',
82
          __scheme__: 'http',
83
          job: 'node_exporter',
84
        },
85
        labels: {
86
          instance: 'localhost:9100',
87
          job: 'node_exporter',
88
        },
89
        scrapePool: 'node_exporter',
90
        scrapeUrl: 'http://localhost:9100/metrics',
91
        globalUrl: 'http://localhost.localdomain:9100/metrics',
92
        lastError: '',
93
        lastScrape: '2019-11-04T11:52:14.145703-07:00',
94
        lastScrapeDuration: 3842307,
95
        health: 'up',
96
        scrapeInterval: '15s',
97
        scrapeTimeout: '500ms',
98
      },
99
    ] as Target[],
100
  },
101
  prometheus: {
102
    upCount: 1,
103
    targets: [
104
      {
105
        discoveredLabels: {
106
          __address__: 'localhost:9090',
107
          __metrics_path__: '/metrics',
108
          __scheme__: 'http',
109
          job: 'prometheus',
110
        },
111
        labels: {
112
          instance: 'localhost:9090',
113
          job: 'prometheus',
114
        },
115
        scrapePool: 'prometheus',
116
        scrapeUrl: 'http://localhost:9090/metrics',
117
        globalUrl: 'http://localhost.localdomain:9000/metrics',
118
        lastError: '',
119
        lastScrape: '2019-11-04T11:52:18.479731-07:00',
120
        lastScrapeDuration: 4050976,
121
        health: 'up',
122
        scrapeInterval: '15s',
123
        scrapeTimeout: '500ms',
124
      },
125
    ] as Target[],
126
  },
127
});
128

129
export const sampleApiResponse = Object.freeze({
130
  status: 'success',
131
  data: {
132
    activeTargets: [
133
      {
134
        discoveredLabels: {
135
          __address__: 'http://prometheus.io',
136
          __metrics_path__: '/probe',
137
          __param_module: 'http_2xx',
138
          __scheme__: 'http',
139
          job: 'blackbox',
140
        },
141
        labels: {
142
          instance: 'http://prometheus.io',
143
          job: 'blackbox',
144
        },
145
        scrapePool: 'blackbox',
146
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=http%3A%2F%2Fprometheus.io',
147
        lastError: '',
148
        lastScrape: '2019-11-04T11:52:14.759299-07:00',
149
        lastScrapeDuration: 36560147,
150
        health: 'up',
151
        globalUrl: 'http://localhost.localdomain:9000/metrics',
152
        scrapeInterval: '15s',
153
        scrapeTimeout: '500ms',
154
      },
155
      {
156
        discoveredLabels: {
157
          __address__: 'https://prometheus.io',
158
          __metrics_path__: '/probe',
159
          __param_module: 'http_2xx',
160
          __scheme__: 'http',
161
          job: 'blackbox',
162
        },
163
        labels: {
164
          instance: 'https://prometheus.io',
165
          job: 'blackbox',
166
        },
167
        scrapePool: 'blackbox',
168
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=https%3A%2F%2Fprometheus.io',
169
        lastError: '',
170
        lastScrape: '2019-11-04T11:52:24.731096-07:00',
171
        lastScrapeDuration: 49448763,
172
        health: 'up',
173
        globalUrl: 'http://localhost.localdomain:9000/metrics',
174
        scrapeInterval: '15s',
175
        scrapeTimeout: '500ms',
176
      },
177
      {
178
        discoveredLabels: {
179
          __address__: 'http://example.com:8080',
180
          __metrics_path__: '/probe',
181
          __param_module: 'http_2xx',
182
          __scheme__: 'http',
183
          job: 'blackbox',
184
        },
185
        labels: {
186
          instance: 'http://example.com:8080',
187
          job: 'blackbox',
188
        },
189
        scrapePool: 'blackbox',
190
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=http%3A%2F%2Fexample.com%3A8080',
191
        lastError: '',
192
        lastScrape: '2019-11-04T11:52:13.516654-07:00',
193
        lastScrapeDuration: 120916592,
194
        health: 'up',
195
        globalUrl: 'http://localhost.localdomain:9000/metrics',
196
        scrapeInterval: '15s',
197
        scrapeTimeout: '500ms',
198
      },
199
      {
200
        discoveredLabels: {
201
          __address__: 'localhost:9100',
202
          __metrics_path__: '/metrics',
203
          __scheme__: 'http',
204
          job: 'node_exporter',
205
        },
206
        labels: {
207
          instance: 'localhost:9100',
208
          job: 'node_exporter',
209
        },
210
        scrapePool: 'node_exporter',
211
        scrapeUrl: 'http://localhost:9100/metrics',
212
        lastError: '',
213
        lastScrape: '2019-11-04T11:52:14.145703-07:00',
214
        lastScrapeDuration: 3842307,
215
        health: 'up',
216
        globalUrl: 'http://localhost.localdomain:9000/metrics',
217
        scrapeInterval: '15s',
218
        scrapeTimeout: '500ms',
219
      },
220
      {
221
        discoveredLabels: {
222
          __address__: 'localhost:9090',
223
          __metrics_path__: '/metrics',
224
          __scheme__: 'http',
225
          job: 'prometheus/test',
226
        },
227
        labels: {
228
          instance: 'localhost:9090',
229
          job: 'prometheus/test',
230
        },
231
        scrapePool: 'prometheus/test',
232
        scrapeUrl: 'http://localhost:9090/metrics',
233
        lastError: '',
234
        lastScrape: '2019-11-04T11:52:18.479731-07:00',
235
        lastScrapeDuration: 4050976,
236
        health: 'up',
237
        globalUrl: 'http://localhost.localdomain:9000/metrics',
238
        scrapeInterval: '15s',
239
        scrapeTimeout: '500ms',
240
      },
241
    ] as Target[],
242
  },
243
});
244

245
export const scrapePoolTargetsSampleAPI = Object.freeze({
246
  status: 'success',
247
  data: {
248
    targets: [
249
      {
250
        discoveredLabels: {
251
          __address__: 'http://prometheus.io',
252
          __metrics_path__: '/probe',
253
          __param_module: 'http_2xx',
254
          __scheme__: 'http',
255
          job: 'blackbox',
256
        },
257
        labels: {
258
          instance: 'http://prometheus.io',
259
          job: 'blackbox',
260
        },
261
        scrapePool: 'blackbox',
262
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=http%3A%2F%2Fprometheus.io',
263
        lastError: '',
264
        lastScrape: '2019-11-04T11:52:14.759299-07:00',
265
        lastScrapeDuration: 36560147,
266
        health: 'up',
267
        globalUrl: 'http://localhost.localdomain:9000/metrics',
268
        scrapeInterval: '15s',
269
        scrapeTimeout: '500ms',
270
      },
271
      {
272
        discoveredLabels: {
273
          __address__: 'https://prometheus.io',
274
          __metrics_path__: '/probe',
275
          __param_module: 'http_2xx',
276
          __scheme__: 'http',
277
          job: 'blackbox',
278
        },
279
        labels: {
280
          instance: 'https://prometheus.io',
281
          job: 'blackbox',
282
        },
283
        scrapePool: 'blackbox',
284
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=https%3A%2F%2Fprometheus.io',
285
        lastError: '',
286
        lastScrape: '2019-11-04T11:52:24.731096-07:00',
287
        lastScrapeDuration: 49448763,
288
        health: 'up',
289
        globalUrl: 'http://localhost.localdomain:9000/metrics',
290
        scrapeInterval: '15s',
291
        scrapeTimeout: '500ms',
292
      },
293
      {
294
        discoveredLabels: {
295
          __address__: 'http://example.com:8080',
296
          __metrics_path__: '/probe',
297
          __param_module: 'http_2xx',
298
          __scheme__: 'http',
299
          job: 'blackbox',
300
        },
301
        labels: {
302
          instance: 'http://example.com:8080',
303
          job: 'blackbox',
304
        },
305
        scrapePool: 'blackbox',
306
        scrapeUrl: 'http://127.0.0.1:9115/probe?module=http_2xx&target=http%3A%2F%2Fexample.com%3A8080',
307
        lastError: '',
308
        lastScrape: '2019-11-04T11:52:13.516654-07:00',
309
        lastScrapeDuration: 120916592,
310
        health: 'up',
311
        globalUrl: 'http://localhost.localdomain:9000/metrics',
312
        scrapeInterval: '15s',
313
        scrapeTimeout: '500ms',
314
      },
315
    ] as Target[],
316
  },
317
});
318

319
export const scrapePoolsSampleAPI = Object.freeze({
320
  status: 'success',
321
  data: {
322
    scrapePools: ['blackbox'],
323
  },
324
});
325

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.