-
Notifications
You must be signed in to change notification settings - Fork 10
/
oss-diff.yml
6534 lines (6371 loc) · 275 KB
/
oss-diff.yml
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: InfluxDB OSS API Service
version: 2.0.0
description: |
The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
license:
name: MIT
url: 'https://opensource.org/licenses/MIT'
servers:
- url: /api/v2
paths:
/debug/pprof/all:
get:
operationId: GetDebugPprofAllProfiles
tags:
- Debug
- System information endpoints
summary: Retrieve all runtime profiles
description: |
Collects samples and returns reports for the following [Go runtime profiles](https://pkg.go.dev/runtime/pprof):
- **allocs**: All past memory allocations
- **block**: Stack traces that led to blocking on synchronization primitives
- **cpu**: (Optional) Program counters sampled from the executing stack.
Include by passing the `cpu` query parameter with a [duration]({{% INFLUXDB_DOCS_URL %}}/reference/glossary/#duration) value.
Equivalent to the report from [`GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS`](#operation/GetDebugPprofProfile).
- **goroutine**: All current goroutines
- **heap**: Memory allocations for live objects
- **mutex**: Holders of contended mutexes
- **threadcreate**: Stack traces that led to the creation of new OS threads
x-codeSamples:
- lang: Shell
label: 'Shell: Get all profiles'
source: |
# Download and extract a `tar.gz` of all profiles after 10 seconds of CPU sampling.
curl "http://localhost:8086/debug/pprof/all?cpu=10s" | tar -xz
# x profiles/cpu.pb.gz
# x profiles/goroutine.pb.gz
# x profiles/block.pb.gz
# x profiles/mutex.pb.gz
# x profiles/heap.pb.gz
# x profiles/allocs.pb.gz
# x profiles/threadcreate.pb.gz
# Analyze a profile.
go tool pprof profiles/heap.pb.gz
- lang: Shell
label: 'Shell: Get all profiles except CPU'
source: |
# Download and extract a `tar.gz` of all profiles except CPU.
curl http://localhost:8086/debug/pprof/all | tar -xz
# x profiles/goroutine.pb.gz
# x profiles/block.pb.gz
# x profiles/mutex.pb.gz
# x profiles/heap.pb.gz
# x profiles/allocs.pb.gz
# x profiles/threadcreate.pb.gz
# Analyze a profile.
go tool pprof profiles/heap.pb.gz
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: cpu
description: |
Collects and returns CPU profiling data for the specified [duration]({{% INFLUXDB_DOCS_URL %}}/reference/glossary/#duration).
schema:
type: string
format: duration
externalDocs:
description: InfluxDB duration
url: 'https://docs.influxdata.com/influxdb/latest/reference/glossary/#duration'
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.
content:
application/octet-stream:
schema:
description: |
GZIP compressed TAR file (`.tar.gz`) that contains
[Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/allocs:
get:
operationId: GetDebugPprofAllocs
tags:
- Debug
- System information endpoints
summary: Retrieve the memory allocations runtime profile
description: |
Returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of
all past memory allocations.
**allocs** is the same as the **heap** profile,
but changes the default [pprof](https://pkg.go.dev/runtime/pprof)
display to __-alloc_space__,
the total number of bytes allocated since the program began (including garbage-collected bytes).
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Analyze the profile in interactive mode.
go tool pprof http://localhost:8086/debug/pprof/allocs
# `pprof` returns the following prompt:
# Entering interactive mode (type "help" for commands, "o" for options)
# (pprof)
# At the prompt, get the top N memory allocations.
(pprof) top10
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: debug
description: |
- `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- `1`: Return a response body with the report formatted as human-readable text.
The report contains comments that translate addresses to function names and line numbers for debugging.
`debug=1` is mutually exclusive with the `seconds` query parameter.
schema:
type: integer
format: int64
enum:
- 0
- 1
- in: query
name: seconds
description: |
Number of seconds to collect statistics.
`seconds` is mutually exclusive with `debug=1`.
schema:
type: string
format: int64
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
If debug is enabled (`?debug=1`), response body contains a human-readable profile.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
text/plain:
schema:
description: |
Response body contains a report formatted in plain text.
The report contains comments that translate addresses to
function names and line numbers for debugging.
type: string
format: Go runtime profile
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/block:
get:
operationId: GetDebugPprofBlock
tags:
- Debug
- System information endpoints
summary: Retrieve the block runtime profile
description: |
Collects samples and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
report of stack traces that led to blocking on synchronization primitives.
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Analyze the profile in interactive mode.
go tool pprof http://localhost:8086/debug/pprof/block
# `pprof` returns the following prompt:
# Entering interactive mode (type "help" for commands, "o" for options)
# (pprof)
# At the prompt, get the top N entries.
(pprof) top10
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: debug
description: |
- `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- `1`: Return a response body with the report formatted as human-readable text.
The report contains comments that translate addresses to function names and line numbers for debugging.
`debug=1` is mutually exclusive with the `seconds` query parameter.
schema:
type: integer
format: int64
enum:
- 0
- 1
- in: query
name: seconds
description: |
Number of seconds to collect statistics.
`seconds` is mutually exclusive with `debug=1`.
schema:
type: string
format: int64
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
If debug is enabled (`?debug=1`), response body contains a human-readable profile.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
text/plain:
schema:
description: |
Response body contains a report formatted in plain text.
The report contains comments that translate addresses to
function names and line numbers for debugging.
type: string
format: Go runtime profile
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/cmdline:
get:
operationId: GetDebugPprofCmdline
tags:
- Debug
- System information endpoints
summary: Retrieve the command line invocation
description: |
Returns the command line that invoked InfluxDB.
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
responses:
'200':
description: Command line invocation.
content:
text/plain:
schema:
type: string
format: Command line
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/goroutine:
get:
operationId: GetDebugPprofGoroutine
tags:
- Debug
- System information endpoints
summary: Retrieve the goroutines runtime profile
description: |
Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
report of all current goroutines.
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Analyze the profile in interactive mode.
go tool pprof http://localhost:8086/debug/pprof/goroutine
# `pprof` returns the following prompt:
# Entering interactive mode (type "help" for commands, "o" for options)
# (pprof)
# At the prompt, get the top N entries.
(pprof) top10
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: debug
description: |
- `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- `1`: Return a response body with the report formatted as
human-readable text with comments that translate addresses to
function names and line numbers for debugging.
`debug=1` is mutually exclusive with the `seconds` query parameter.
schema:
type: integer
format: int64
enum:
- 0
- 1
- in: query
name: seconds
description: |
Number of seconds to collect statistics.
`seconds` is mutually exclusive with `debug=1`.
schema:
type: string
format: int64
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
If debug is enabled (`?debug=1`), response body contains a human-readable profile.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
text/plain:
schema:
description: |
Response body contains a report formatted in plain text.
The report contains comments that translate addresses to
function names and line numbers for debugging.
type: string
format: Go runtime profile
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/heap:
get:
operationId: GetDebugPprofHeap
tags:
- Debug
- System information endpoints
summary: Retrieve the heap runtime profile
description: |
Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
report of memory allocations for live objects.
To run **garbage collection** before sampling,
pass the `gc` query parameter with a value of `1`.
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Analyze the profile in interactive mode.
go tool pprof http://localhost:8086/debug/pprof/heap
# `pprof` returns the following prompt:
# Entering interactive mode (type "help" for commands, "o" for options)
# (pprof)
# At the prompt, get the top N memory-intensive nodes.
(pprof) top10
# pprof displays the list:
# Showing nodes accounting for 142.46MB, 85.43% of 166.75MB total
# Dropped 895 nodes (cum <= 0.83MB)
# Showing top 10 nodes out of 143
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: debug
description: |
- `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- `1`: Return a response body with the report formatted as human-readable text.
The report contains comments that translate addresses to function names and line numbers for debugging.
`debug=1` is mutually exclusive with the `seconds` query parameter.
schema:
type: integer
format: int64
enum:
- 0
- 1
- in: query
name: seconds
description: |
Number of seconds to collect statistics.
`seconds` is mutually exclusive with `debug=1`.
schema:
type: string
format: int64
- in: query
name: gc
description: |
- `0`: (Default) don't force garbage collection before sampling.
- `1`: Force garbage collection before sampling.
schema:
type: integer
format: int64
enum:
- 0
- 1
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
If debug is enabled (`?debug=1`), response body contains a human-readable profile.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
text/plain:
schema:
description: |
Response body contains a report formatted in plain text.
The report contains comments that translate addresses to
function names and line numbers for debugging.
type: string
format: Go runtime profile
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
examples:
profileDebugResponse:
summary: Profile in plain text
value: "heap profile: 12431: 137356528 [149885081: 846795139976] @ heap/8192\n23: 17711104 [46: 35422208] @ 0x4c6df65 0x4ce03ec 0x4cdf3c5 0x4c6f4db 0x4c9edbc 0x4bdefb3 0x4bf822a 0x567d158 0x567ced9 0x406c0a1\n#\t0x4c6df64\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*entry).add+0x1a4\t\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/cache.go:97\n#\t0x4ce03eb\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*partition).write+0x2ab\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/ring.go:229\n#\t0x4cdf3c4\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*ring).write+0xa4\t\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/ring.go:95\n#\t0x4c6f4da\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*Cache).WriteMulti+0x31a\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/cache.go:343\n"
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/mutex:
get:
operationId: GetDebugPprofMutex
tags:
- Debug
- System information endpoints
summary: Retrieve the mutual exclusion (mutex) runtime profile
description: |
Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of
lock contentions.
The profile contains stack traces of holders of contended mutual exclusions (mutexes).
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Analyze the profile in interactive mode.
go tool pprof http://localhost:8086/debug/pprof/mutex
# `pprof` returns the following prompt:
# Entering interactive mode (type "help" for commands, "o" for options)
# (pprof)
# At the prompt, get the top N entries.
(pprof) top10
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: debug
description: |
- `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- `1`: Return a response body with the report formatted as human-readable text.
The report contains comments that translate addresses to function names and line numbers for debugging.
`debug=1` is mutually exclusive with the `seconds` query parameter.
schema:
type: integer
format: int64
enum:
- 0
- 1
- in: query
name: seconds
description: |
Number of seconds to collect statistics.
`seconds` is mutually exclusive with `debug=1`.
schema:
type: string
format: int64
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
If debug is enabled (`?debug=1`), response body contains a human-readable profile.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
text/plain:
schema:
description: |
Response body contains a report formatted in plain text.
The report contains comments that translate addresses to
function names and line numbers for debugging.
type: string
format: Go runtime profile
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/profile:
get:
operationId: GetDebugPprofProfile
tags:
- Debug
- System information endpoints
summary: Retrieve the CPU runtime profile
description: |
Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
report of program counters on the executing stack.
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Download the profile report.
curl http://localhost:8086/debug/pprof/profile -o cpu
# Analyze the profile in interactive mode.
go tool pprof ./cpu
# At the prompt, get the top N functions most often running
# or waiting during the sample period.
(pprof) top10
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: seconds
description: Number of seconds to collect profile data. Default is `30` seconds.
schema:
type: string
format: int64
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/threadcreate:
get:
operationId: GetDebugPprofThreadCreate
tags:
- Debug
- System information endpoints
summary: Retrieve the threadcreate runtime profile
description: |
Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
report of stack traces that led to the creation of new OS threads.
x-codeSamples:
- lang: Shell
label: 'Shell: go tool pprof'
source: |
# Analyze the profile in interactive mode.
go tool pprof http://localhost:8086/debug/pprof/threadcreate
# `pprof` returns the following prompt:
# Entering interactive mode (type "help" for commands, "o" for options)
# (pprof)
# At the prompt, get the top N entries.
(pprof) top10
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: debug
description: |
- `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- `1`: Return a response body with the report formatted as human-readable text.
The report contains comments that translate addresses to function names and line numbers for debugging.
`debug=1` is mutually exclusive with the `seconds` query parameter.
schema:
type: integer
format: int64
enum:
- 0
- 1
- in: query
name: seconds
description: |
Number of seconds to collect statistics.
`seconds` is mutually exclusive with `debug=1`.
schema:
type: string
format: int64
responses:
'200':
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
with [pprof](https://github.com/google/pprof) analysis and visualization tools.
If debug is enabled (`?debug=1`), response body contains a human-readable profile.
content:
application/octet-stream:
schema:
description: |
[Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
type: string
format: binary
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
text/plain:
schema:
description: |
Response body contains a report formatted in plain text.
The report contains comments that translate addresses to
function names and line numbers for debugging.
type: string
format: Go runtime profile
externalDocs:
description: Golang pprof package
url: 'https://pkg.go.dev/net/http/pprof'
examples:
profileDebugResponse:
summary: Profile in plain text
value: "threadcreate profile: total 26\n25 @\n#\t0x0\n\n1 @ 0x403dda8 0x403e54b 0x403e810 0x403a90c 0x406c0a1\n#\t0x403dda7\truntime.allocm+0xc7\t\t\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:1877\n#\t0x403e54a\truntime.newm+0x2a\t\t\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:2201\n#\t0x403e80f\truntime.startTemplateThread+0x8f\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:2271\n#\t0x403a90b\truntime.main+0x1cb\t\t\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:234\n"
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/debug/pprof/trace:
get:
operationId: GetDebugPprofTrace
tags:
- Debug
- System information endpoints
summary: Retrieve the runtime execution trace
description: |
Collects profile data and returns trace execution events for the current program.
x-codeSamples:
- lang: Shell
label: 'Shell: go tool trace'
source: |
# Download the trace file.
curl http://localhost:8086/debug/pprof/trace -o trace
# Analyze the trace.
go tool trace ./trace
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: seconds
description: Number of seconds to collect profile data.
schema:
type: string
format: int64
responses:
'200':
description: |
[Trace file](https://pkg.go.dev/runtime/trace) compatible
with the [Golang `trace` command](https://pkg.go.dev/cmd/trace).
content:
application/octet-stream:
schema:
type: string
format: binary
externalDocs:
description: Golang trace package
url: 'https://pkg.go.dev/runtime/trace'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/health:
get:
operationId: GetHealth
tags:
- Health
- System information endpoints
summary: Retrieve the health of the instance
description: Returns the health of the instance.
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
responses:
'200':
description: |
The instance is healthy.
The response body contains the health check items and status.
content:
application/json:
schema:
type: object
required:
- name
- status
properties:
name:
type: string
message:
type: string
checks:
type: array
items:
$ref: '#/paths/~1health/get/responses/200/content/application~1json/schema'
status:
type: string
enum:
- pass
- fail
version:
type: string
commit:
type: string
'503':
description: The instance is unhealthy.
content:
application/json:
schema:
$ref: '#/paths/~1health/get/responses/200/content/application~1json/schema'
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/metrics:
get:
operationId: GetMetrics
tags:
- Metrics
- System information endpoints
summary: Retrieve workload performance metrics
description: |
Returns metrics about the workload performance of an InfluxDB instance.
Use this endpoint to get performance, resource, and usage metrics.
#### Related guides
- For the list of metrics categories, see [InfluxDB OSS metrics]({{% INFLUXDB_DOCS_URL %}}/reference/internals/metrics/).
- Learn how to use InfluxDB to [scrape Prometheus metrics]({{% INFLUXDB_DOCS_URL %}}/write-data/developer-tools/scrape-prometheus-metrics/).
- Learn how InfluxDB [parses the Prometheus exposition format]({{% INFLUXDB_DOCS_URL %}}/reference/prometheus-metrics/).
servers:
- url: ''
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
responses:
'200':
description: |
Success. The response body contains metrics in
[Prometheus plain-text exposition format](https://prometheus.io/docs/instrumenting/exposition_formats)
Metrics contain a name, an optional set of key-value pairs, and a value.
The following descriptors precede each metric:
- `HELP`: description of the metric
- `TYPE`: [Prometheus metric type](https://prometheus.io/docs/concepts/metric_types/) (`counter`, `gauge`, `histogram`, or `summary`)
content:
text/plain:
schema:
type: string
format: Prometheus text-based exposition
externalDocs:
description: Prometheus exposition formats
url: 'https://prometheus.io/docs/instrumenting/exposition_formats'
examples:
expositionResponse:
summary: Metrics in plain text
value: |
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 19
# HELP http_api_request_duration_seconds Time taken to respond to HTTP request
# TYPE http_api_request_duration_seconds histogram
http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.005"} 4
http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.01"} 4
http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.025"} 5
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/ready:
get:
operationId: GetReady
tags:
- Ready
- System information endpoints
summary: Get the readiness of an instance at startup
servers:
- url: ''
parameters:
- in: header
name: Zap-Trace-Span
description: OpenTracing span context
example:
trace_id: '1'
span_id: '1'
baggage:
key: value
required: false
schema:
type: string
responses:
'200':
description: The instance is ready
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- ready
started:
type: string
format: date-time
example: '2019-03-13T10:09:33.891196-04:00'
up:
type: string
example: 14m45.911966424s
default:
description: Unexpected error
$ref: '#/paths/~1config/get/responses/401'
/users:
get:
operationId: GetUsers
tags:
- Security and access endpoints
- Users
summary: List users
description: |
Lists [users]({{% INFLUXDB_DOCS_URL %}}/reference/glossary/#user).
Default limit is `20`.
To limit which users are returned, pass query parameters in your request.
#### Required permissions for InfluxDB OSS
| Action | Permission required | Restriction |
|:-------|:--------------------|:------------|
| List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | |
| List a specific user | `read-users` or `read-user USER_ID` | |
*`USER_ID`* is the ID of the user that you want to retrieve.
#### Related guides
- [View users](https://docs.influxdata.com/influxdb/latest/users/view-users/).
parameters:
- $ref: '#/paths/~1ready/get/parameters/0'
- in: query
name: offset
required: false
description: |
The offset for pagination.
The number of records to skip.
For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination).
schema:
type: integer
minimum: 0
- in: query
name: limit
required: false
description: |
Limits the number of records returned. Default is `20`.
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- in: query
name: after
required: false
schema:
type: string
description: |
A resource ID to seek from.
Returns records created after the specified record;
results don't include the specified record.
Use `after` instead of the `offset` parameter.
For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination).
- in: query
name: name
schema:
type: string
description: |
A user name.
Only lists the specified [user]({{% INFLUXDB_DOCS_URL %}}/reference/glossary/#user).
- in: query
name: id
schema:
type: string
description: |
A user ID.
Only lists the specified [user]({{% INFLUXDB_DOCS_URL %}}/reference/glossary/#user).
responses:
'200':
description: Success. The response contains a list of `users`.
content:
application/json:
schema:
$ref: '#/components/schemas/Users'
'401':
description: |
Unauthorized.
content:
application/json:
schema:
properties:
code:
description: code is the machine-readable error code.
readOnly: true
type: string
enum:
- internal error
- not implemented
- not found
- conflict
- invalid
- unprocessable entity
- empty value
- unavailable
- forbidden
- too many requests