forked from leptonai/gpud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.yaml
More file actions
1237 lines (1230 loc) · 38.8 KB
/
Copy pathswagger.yaml
File metadata and controls
1237 lines (1230 loc) · 38.8 KB
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
basePath: /
definitions:
github_com_leptonai_gpud_api_v1.ComponentEvents:
properties:
component:
type: string
endTime:
type: string
events:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.Event'
type: array
startTime:
type: string
type: object
github_com_leptonai_gpud_api_v1.ComponentHealthStates:
properties:
component:
type: string
states:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.HealthState'
type: array
type: object
github_com_leptonai_gpud_api_v1.ComponentInfo:
properties:
component:
type: string
endTime:
type: string
info:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.Info'
startTime:
type: string
type: object
github_com_leptonai_gpud_api_v1.ComponentMetrics:
properties:
component:
type: string
metrics:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.Metric'
type: array
type: object
github_com_leptonai_gpud_api_v1.ComponentType:
enum:
- custom-plugin
type: string
x-enum-varnames:
- ComponentTypeCustomPlugin
github_com_leptonai_gpud_api_v1.Event:
properties:
component:
description: Component represents which component generated the event.
type: string
message:
description: Message represents the detailed message of the event.
type: string
name:
description: Name represents the name of the event.
type: string
time:
description: Time represents when the event happened.
type: string
type:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.EventType'
description: Type represents the type of the event.
type: object
github_com_leptonai_gpud_api_v1.EventType:
enum:
- Unknown
- Info
- Warning
- Critical
- Fatal
type: string
x-enum-varnames:
- EventTypeUnknown
- EventTypeInfo
- EventTypeWarning
- EventTypeCritical
- EventTypeFatal
github_com_leptonai_gpud_api_v1.HealthState:
properties:
component:
description: Component represents the component name.
type: string
component_type:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.ComponentType'
description: |-
ComponentType represents the type of the component.
It is either "" (just 'component') or "custom-plugin".
error:
description: |-
Error represents the detailed error information, which will be shown
as More Information to help analyze why it isn’t healthy.
type: string
extra_info:
additionalProperties:
type: string
description: ExtraInfo represents the extra information of the state.
type: object
health:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.HealthStateType'
description: |-
Health represents the health level of the state,
including StateHealthy, StateUnhealthy and StateDegraded.
StateDegraded is similar to Unhealthy which also can trigger alerts
for users or operators, but what StateDegraded means is that the
issue detected does not affect users’ workload.
name:
description: |-
Name is the name of the state,
can be different from the component name.
type: string
raw_output:
description: |-
RawOutput represents the raw output of the health checker.
e.g., If a custom plugin runs a Python script, the raw output
is the stdout/stderr of the script.
The maximum length of the raw output is 4096 bytes.
type: string
reason:
description: Reason represents what happened or detected by GPUd if it isn’t
healthy.
type: string
run_mode:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.RunModeType'
description: |-
RunMode is the run mode of the state.
It can be "manual" that requires manual trigger to run the check.
Or it can be empty that runs the check periodically.
suggested_actions:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.SuggestedActions'
description: SuggestedActions represents the suggested actions to mitigate
the issue.
time:
description: Time represents when the event happened.
type: string
type: object
github_com_leptonai_gpud_api_v1.HealthStateType:
enum:
- Healthy
- Unhealthy
- Degraded
- Initializing
type: string
x-enum-varnames:
- HealthStateTypeHealthy
- HealthStateTypeUnhealthy
- HealthStateTypeDegraded
- HealthStateTypeInitializing
github_com_leptonai_gpud_api_v1.Info:
properties:
events:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.Event'
type: array
metrics:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.Metric'
type: array
states:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.HealthState'
type: array
type: object
github_com_leptonai_gpud_api_v1.MachineCPUInfo:
properties:
architecture:
type: string
logicalCores:
type: integer
manufacturer:
type: string
type:
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineDiskDevice:
properties:
children:
items:
type: string
type: array
fsType:
type: string
model:
type: string
mountPoint:
type: string
name:
type: string
parents:
items:
type: string
type: array
partUUID:
type: string
rev:
type: string
rota:
type: boolean
serial:
type: string
size:
type: integer
type:
type: string
used:
type: integer
vendor:
type: string
wwn:
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineDiskInfo:
properties:
blockDevices:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineDiskDevice'
type: array
containerRootDisk:
description: ContainerRootDisk is the disk device name that mounts the container
root (such as "/var/lib/kubelet" mount point).
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineGPUInfo:
properties:
architecture:
description: Architecture is "blackwell" for NVIDIA GB200.
type: string
gpus:
description: GPUs is the GPU info of the machine.
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineGPUInstance'
type: array
manufacturer:
description: Manufacturer is "NVIDIA" for NVIDIA GPUs (same as Brand).
type: string
memory:
type: string
product:
description: Product may be "NVIDIA-Graphics-Device" for NVIDIA GB200.
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineGPUInstance:
properties:
boardID:
type: integer
busID:
description: |-
BusID is the GPU bus ID from the nvml API.
e.g., "0000:0f:00.0"
type: string
minorID:
type: string
sn:
type: string
uuid:
description: |-
UUID is the GPU UUID from the nvml API.
e.g., "GPU-46a3bbe2-3e87-3dde-b464-a03eba0c21d7"
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineInfo:
properties:
bootID:
description: BootID is collected by GPUd.
type: string
containerRuntimeVersion:
description: ContainerRuntime Version reported by the node through runtime
remote API (e.g. containerd://1.4.2).
type: string
cpuInfo:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineCPUInfo'
description: CPUInfo is the CPU info of the machine.
cudaVersion:
description: CUDAVersion represents the current version of cuda library.
type: string
diskInfo:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineDiskInfo'
description: DiskInfo is the Disk info of the machine.
gpuDriverVersion:
description: GPUDriverVersion represents the current version of GPU driver
installed
type: string
gpuInfo:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineGPUInfo'
description: GPUInfo is the GPU info of the machine.
gpudVersion:
description: GPUdVersion represents the current version of GPUd
type: string
hostname:
description: Hostname is the current host of machine
type: string
kernelVersion:
description: Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
type: string
machineID:
description: MachineID is collected by GPUd. It comes from /etc/machine-id
or /var/lib/dbus/machine-id
type: string
memoryInfo:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineMemoryInfo'
description: MemoryInfo is the memory info of the machine.
nicInfo:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineNICInfo'
description: NICInfo is the network info of the machine.
operatingSystem:
description: The Operating System reported by the node
type: string
osImage:
description: OS Image reported by the node from /etc/os-release (e.g. Debian
GNU/Linux 7 (wheezy)).
type: string
systemUUID:
description: SystemUUID comes from https://github.com/google/cadvisor/blob/master/utils/sysfs/sysfs.go#L442
type: string
tailscaleVersion:
description: TailscaleVersion represents the version of the tailscale client
binary (e.g. 1.76.6).
type: string
uptime:
description: Uptime represents when the machine up
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineMemoryInfo:
properties:
totalBytes:
type: integer
type: object
github_com_leptonai_gpud_api_v1.MachineNICInfo:
properties:
privateIPInterfaces:
description: PrivateIPInterfaces is the private network interface info of
the machine.
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineNetworkInterface'
type: array
type: object
github_com_leptonai_gpud_api_v1.MachineNetworkInterface:
properties:
interface:
description: Interface is the network interface name of the machine.
type: string
ip:
description: IP is the string representation of the netip.Addr of the machine.
type: string
mac:
description: MAC is the MAC address of the machine.
type: string
type: object
github_com_leptonai_gpud_api_v1.Metric:
properties:
labels:
additionalProperties:
type: string
type: object
name:
type: string
unix_seconds:
type: integer
value:
type: number
type: object
github_com_leptonai_gpud_api_v1.RepairActionType:
enum:
- IGNORE_NO_ACTION_REQUIRED
- REBOOT_SYSTEM
- HARDWARE_INSPECTION
- CHECK_USER_APP_AND_GPU
type: string
x-enum-varnames:
- RepairActionTypeIgnoreNoActionRequired
- RepairActionTypeRebootSystem
- RepairActionTypeHardwareInspection
- RepairActionTypeCheckUserAppAndGPU
github_com_leptonai_gpud_api_v1.RunModeType:
enum:
- auto
- manual
type: string
x-enum-varnames:
- RunModeTypeAuto
- RunModeTypeManual
github_com_leptonai_gpud_api_v1.SuggestedActions:
properties:
description:
description: Description describes the issue in detail.
type: string
repair_actions:
description: A list of repair actions to mitigate the issue.
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.RepairActionType'
type: array
type: object
github_com_leptonai_gpud_pkg_custom-plugins.JSONPath:
properties:
expect:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.MatchRule'
description: |-
Expect defines the expected field "value" match rule.
It not set, the field value is not checked,
which means "missing field" for this query does not
make the health state to be "Unhealthy".
If set, the field value must be matched for this rule.
In such case, the "missing field" or "mismatch" make
the health state to be "Unhealthy".
field:
description: |-
Field defines the field name to use in the extra_info data
for this JSON path query output.
type: string
query:
description: |-
Query defines the JSONPath query path to extract with.
ref. https://pkg.go.dev/github.com/PaesslerAG/jsonpath#section-readme
ref. https://en.wikipedia.org/wiki/JSONPath
ref. https://goessner.net/articles/JsonPath/
type: string
suggested_actions:
additionalProperties:
$ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.MatchRule'
description: |-
SuggestedActions maps from the suggested action name,
to the match rule for the field value.
If the field value matches the rule,
the health state reports the corresponding
suggested action (the key of the matching rule).
type: object
type: object
github_com_leptonai_gpud_pkg_custom-plugins.MatchRule:
properties:
regex:
description: Regex is the regex to match the output.
type: string
type: object
github_com_leptonai_gpud_pkg_custom-plugins.Plugin:
properties:
parser:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.PluginOutputParseConfig'
description: |-
Parser is the parser for the plugin output.
If not set, the default prefix parser is used.
steps:
description: |-
Steps is a sequence of steps to run for this plugin.
Multiple steps are executed in order.
If a step fails, the execution stops and the error is returned.
Which means, the final success requires all steps to succeed.
items:
$ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.Step'
type: array
type: object
github_com_leptonai_gpud_pkg_custom-plugins.PluginOutputParseConfig:
properties:
json_paths:
description: |-
JSONPaths is a list of JSON paths to the output fields.
Each entry has a FieldName (the output field name you want to assign e.g. "name")
and a QueryPath (the JSON path you want to extract with e.g. "$.name").
items:
$ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.JSONPath'
type: array
log_path:
description: |-
LogPath is an optional path to a file where the plugin output will be logged.
If set, the raw plugin output will be appended to this file.
type: string
type: object
github_com_leptonai_gpud_pkg_custom-plugins.RunBashScript:
properties:
content_type:
description: |-
ContentType is the content encode type of the script.
Possible values: "plaintext", "base64".
type: string
script:
description: |-
Script is the script to run for this job.
Assumed to be base64 encoded.
type: string
type: object
github_com_leptonai_gpud_pkg_custom-plugins.Spec:
properties:
component_list:
description: |-
ComponentList is a list of component names for SpecTypeComponentList.
Each item can be a simple name or "name:param" format.
For component list, tags can be specified in the format "name#run_mode[tag1,tag2]:param"
items:
type: string
type: array
component_list_file:
description: |-
ComponentListFile is a path to a file containing component names for SpecTypeComponentList.
Each line can be a simple name or "name:param" format.
For component list file, tags can be specified in the format "name#run_mode[tag1,tag2]:param"
type: string
health_state_plugin:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.Plugin'
description: |-
HealthStatePlugin defines the plugin instructions
to evaluate the health state of this plugin,
which is translated into an GPUd /states API response.
interval:
allOf:
- $ref: '#/definitions/v1.Duration'
description: |-
Interval is the interval for the script execution.
For init plugin that only runs once at the server start,
this value is ignored.
Similarly, if set to zero, it runs only once.
plugin_name:
description: |-
PluginName describes the plugin.
It is used for generating the component name.
type: string
plugin_type:
description: |-
PluginType defines the plugin type.
Possible values: "init", "component".
type: string
run_mode:
description: |-
RunMode defines the run mode of the plugin.
Possible values: "auto", "manual".
RunMode is set to "auto" to run the plugin periodically, with the specified interval.
RunMode is set to "manual" to run the plugin only when explicitly triggered.
The manual mode plugin is only registered but not run periodically.
- GPUd does not run this even once.
- GPUd does not run this periodically.
This "auto" mode is only applicable to "component" type plugins.
This "auto" mode is not applicable to "init" type plugins.
The "init" type plugins are always run only once.
This "manual" mode is only applicable to "component" type plugins.
This "manual" mode is not applicable to "init" type plugins.
type: string
tags:
description: |-
Tags is a list of tags associated with this component.
Tags can be used to group and trigger components together.
For component list type, tags can also be specified in the run mode format.
items:
type: string
type: array
timeout:
allOf:
- $ref: '#/definitions/v1.Duration'
description: |-
Timeout is the timeout for the script execution.
If zero, it uses the default timeout (1-minute).
type: object
github_com_leptonai_gpud_pkg_custom-plugins.Step:
properties:
name:
description: Name is the name of the step.
type: string
run_bash_script:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_custom-plugins.RunBashScript'
description: RunBashScript is the bash script to run for this step.
type: object
github_com_leptonai_gpud_pkg_fault-injector.Request:
properties:
kernel_message:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_kmsg_writer.KernelMessage'
description: KernelMessage is the kernel message to inject.
xid:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_fault-injector.XIDToInject'
description: XID is the XID to inject.
type: object
github_com_leptonai_gpud_pkg_fault-injector.XIDToInject:
properties:
id:
type: integer
type: object
github_com_leptonai_gpud_pkg_kmsg_writer.KernelMessage:
properties:
message:
description: Message is the message of the kernel message.
type: string
priority:
allOf:
- $ref: '#/definitions/github_com_leptonai_gpud_pkg_kmsg_writer.KernelMessagePriority'
description: |-
Priority is the priority of the kernel message.
ref. https://github.com/torvalds/linux/blob/master/tools/include/linux/kern_levels.h#L8-L15
type: object
github_com_leptonai_gpud_pkg_kmsg_writer.KernelMessagePriority:
enum:
- KERN_EMERG
- KERN_ALERT
- KERN_CRIT
- KERN_ERR
- KERN_WARNING
- KERN_NOTICE
- KERN_INFO
- KERN_DEBUG
- KERN_DEFAULT
type: string
x-enum-varnames:
- KernelMessagePriorityEmerg
- KernelMessagePriorityAlert
- KernelMessagePriorityCrit
- KernelMessagePriorityError
- KernelMessagePriorityWarning
- KernelMessagePriorityNotice
- KernelMessagePriorityInfo
- KernelMessagePriorityDebug
- KernelMessagePriorityDefault
pkg_server.Healthz:
properties:
status:
type: string
version:
type: string
type: object
pkg_server.SetHealthyStatesResponse:
properties:
code:
type: integer
failed:
additionalProperties:
type: string
type: object
message:
type: string
successful:
items:
type: string
type: array
type: object
v1.Duration:
properties:
time.Duration:
enum:
- -9223372036854775808
- 9223372036854775807
- 1
- 1000
- 1000000
- 1000000000
- 60000000000
- 3600000000000
format: int64
type: integer
x-enum-varnames:
- minDuration
- maxDuration
- Nanosecond
- Microsecond
- Millisecond
- Second
- Minute
- Hour
type: object
host: localhost:15132
info:
contact:
email: support@swagger.io
name: API Support
url: http://www.swagger.io/support
description: GPU monitoring and management daemon API
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: GPUd API
version: "1.0"
paths:
/healthz:
get:
consumes:
- application/json
description: Returns the health status of the gpud service
operationId: healthz
produces:
- application/json
responses:
"200":
description: Health status
schema:
$ref: '#/definitions/pkg_server.Healthz'
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Health check endpoint
tags:
- health
/inject-fault:
post:
consumes:
- application/json
description: Injects a fault (such as kernel messages) into the system for testing
purposes
operationId: injectFault
parameters:
- description: Fault injection request
in: body
name: request
required: true
schema:
$ref: '#/definitions/github_com_leptonai_gpud_pkg_fault-injector.Request'
produces:
- application/json
responses:
"200":
description: Fault injected successfully
schema:
additionalProperties:
type: string
type: object
"400":
description: Bad request - invalid request body or validation error
schema:
additionalProperties: true
type: object
"404":
description: Fault injector not set up
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Inject fault into the system
tags:
- fault-injection
/machine-info:
get:
description: Returns detailed information about the machine including hardware
specifications
operationId: getMachineInfo
produces:
- application/json
responses:
"200":
description: Machine information
schema:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.MachineInfo'
"404":
description: GPUd instance not found
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Get machine information
tags:
- machine
/v1/components:
delete:
consumes:
- application/json
description: Deregisters a component from the system if it supports deregistration.
Only components that implement the Deregisterable interface can be deregistered.
operationId: deregisterComponent
parameters:
- description: Name of the component to deregister
in: query
name: componentName
required: true
type: string
produces:
- application/json
responses:
"200":
description: Component deregistered successfully
schema:
additionalProperties: true
type: object
"400":
description: Bad request - component name required or component not deregisterable
schema:
additionalProperties: true
type: object
"404":
description: Component not found
schema:
additionalProperties: true
type: object
"500":
description: Internal server error - failed to close component
schema:
additionalProperties: true
type: object
summary: Deregister a component
tags:
- components
get:
consumes:
- application/json
description: Returns a list of all currently registered gpud components in the
system
operationId: getComponents
parameters:
- description: Content type preference
enum:
- application/json
- application/yaml
in: header
name: Accept
type: string
- description: Set to 'true' for indented JSON output
in: header
name: json-indent
type: string
produces:
- application/json
responses:
"200":
description: List of component names
schema:
items:
type: string
type: array
"400":
description: Bad request - invalid content type
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Get list of registered components
tags:
- components
/v1/components/trigger-check:
get:
consumes:
- application/json
description: Triggers a health check for a specific component or all components
with a specific tag. Either componentName or tagName must be provided, but
not both.
operationId: triggerComponentCheck
parameters:
- description: Name of the specific component to check (mutually exclusive with
tagName)
in: query
name: componentName
type: string
- description: Tag name to check all components with this tag (mutually exclusive
with componentName)
in: query
name: tagName
type: string
produces:
- application/json
responses:
"200":
description: Health check results with component states
schema:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.ComponentHealthStates'
type: array
"400":
description: Bad request - component or tag name required (but not both)
schema:
additionalProperties: true
type: object
"404":
description: Component not found
schema:
additionalProperties: true
type: object
summary: Trigger component health check
tags:
- components
/v1/components/trigger-tag:
get:
consumes:
- application/json
description: Triggers health checks for all components that have the specified
tag. Returns a summary of triggered components and their overall status.
operationId: triggerComponentsByTag
parameters:
- description: Tag name to trigger all components with this tag
in: query
name: tagName
required: true
type: string
produces:
- application/json
responses:
"200":
description: Trigger results with components list, exit status, and success
flag
schema:
additionalProperties: true
type: object
"400":
description: Bad request - tag name required
schema:
additionalProperties: true
type: object
summary: Trigger components by tag
tags:
- components
/v1/events:
get:
consumes:
- application/json
description: Returns events from specified components within a time range. If
no components specified, returns events from all components. Only supported
components are queried.
operationId: getEvents
parameters:
- description: Content type preference
enum:
- application/json
- application/yaml
in: header
name: Accept
type: string
- description: Comma-separated list of component names to query (if empty, queries
all components)
in: query
name: components
type: string
- description: Start time for event query (RFC3339 format, defaults to current
time)
in: query
name: startTime
type: string
- description: End time for event query (RFC3339 format, defaults to current
time)
in: query
name: endTime
type: string
- description: Set to 'true' for indented JSON output
in: header
name: json-indent
type: string
produces:
- application/json
responses:
"200":
description: Component events within the specified time range
schema:
items:
$ref: '#/definitions/github_com_leptonai_gpud_api_v1.ComponentEvents'
type: array
"400":
description: Bad request - invalid content type, component parsing error,
or time parsing error
schema:
additionalProperties: true
type: object
"404":
description: Component not found
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Get component events
tags:
- components
/v1/health-states/set-healthy:
post:
consumes:
- application/json
description: Sets specified components to healthy state if they implement the
HealthSettable interface. If no components specified, attempts to set all
components to healthy.