forked from siderolabs/talos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
machine.proto
1344 lines (1169 loc) · 31.7 KB
/
machine.proto
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
syntax = "proto3";
package machine;
option go_package = "github.com/siderolabs/talos/pkg/machinery/api/machine";
import "common/common.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
// The machine service definition.
service MachineService {
rpc ApplyConfiguration(ApplyConfigurationRequest) returns (ApplyConfigurationResponse);
// Bootstrap method makes control plane node enter etcd bootstrap mode.
// Node aborts etcd join sequence and creates single-node etcd cluster.
// If recover_etcd argument is specified, etcd is recovered from a snapshot
// uploaded with EtcdRecover.
rpc Bootstrap(BootstrapRequest) returns (BootstrapResponse);
rpc Containers(ContainersRequest) returns (ContainersResponse);
rpc Copy(CopyRequest) returns (stream common.Data);
rpc CPUInfo(google.protobuf.Empty) returns (CPUInfoResponse);
rpc DiskStats(google.protobuf.Empty) returns (DiskStatsResponse);
rpc Dmesg(DmesgRequest) returns (stream common.Data);
rpc Events(EventsRequest) returns (stream Event);
rpc EtcdMemberList(EtcdMemberListRequest) returns (EtcdMemberListResponse);
// EtcdRemoveMemberByID removes a member from the etcd cluster identified by member ID.
// This API should be used to remove members which don't have an associated Talos node anymore.
// To remove a member with a running Talos node, use EtcdLeaveCluster API on the node to be removed.
rpc EtcdRemoveMemberByID(EtcdRemoveMemberByIDRequest) returns (EtcdRemoveMemberByIDResponse);
rpc EtcdLeaveCluster(EtcdLeaveClusterRequest) returns (EtcdLeaveClusterResponse);
rpc EtcdForfeitLeadership(EtcdForfeitLeadershipRequest) returns (EtcdForfeitLeadershipResponse);
// EtcdRecover method uploads etcd data snapshot created with EtcdSnapshot
// to the node.
// Snapshot can be later used to recover the cluster via Bootstrap method.
rpc EtcdRecover(stream common.Data) returns (EtcdRecoverResponse);
// EtcdSnapshot method creates etcd data snapshot (backup) from the local etcd instance
// and streams it back to the client.
// This method is available only on control plane nodes (which run etcd).
rpc EtcdSnapshot(EtcdSnapshotRequest) returns (stream common.Data);
// EtcdAlarmList lists etcd alarms for the current node.
// This method is available only on control plane nodes (which run etcd).
rpc EtcdAlarmList(google.protobuf.Empty) returns (EtcdAlarmListResponse);
// EtcdAlarmDisarm disarms etcd alarms for the current node.
// This method is available only on control plane nodes (which run etcd).
rpc EtcdAlarmDisarm(google.protobuf.Empty) returns (EtcdAlarmDisarmResponse);
// EtcdDefragment defragments etcd data directory for the current node.
// Defragmentation is a resource-heavy operation, so it should only run on a specific
// node.
// This method is available only on control plane nodes (which run etcd).
rpc EtcdDefragment(google.protobuf.Empty) returns (EtcdDefragmentResponse);
// EtcdStatus returns etcd status for the current member.
// This method is available only on control plane nodes (which run etcd).
rpc EtcdStatus(google.protobuf.Empty) returns (EtcdStatusResponse);
rpc GenerateConfiguration(GenerateConfigurationRequest) returns (GenerateConfigurationResponse);
rpc Hostname(google.protobuf.Empty) returns (HostnameResponse);
rpc Kubeconfig(google.protobuf.Empty) returns (stream common.Data);
rpc List(ListRequest) returns (stream FileInfo);
rpc DiskUsage(DiskUsageRequest) returns (stream DiskUsageInfo);
rpc LoadAvg(google.protobuf.Empty) returns (LoadAvgResponse);
rpc Logs(LogsRequest) returns (stream common.Data);
rpc LogsContainers(google.protobuf.Empty) returns (LogsContainersResponse);
rpc Memory(google.protobuf.Empty) returns (MemoryResponse);
rpc Mounts(google.protobuf.Empty) returns (MountsResponse);
rpc NetworkDeviceStats(google.protobuf.Empty) returns (NetworkDeviceStatsResponse);
rpc Processes(google.protobuf.Empty) returns (ProcessesResponse);
rpc Read(ReadRequest) returns (stream common.Data);
rpc Reboot(RebootRequest) returns (RebootResponse);
rpc Restart(RestartRequest) returns (RestartResponse);
rpc Rollback(RollbackRequest) returns (RollbackResponse);
rpc Reset(ResetRequest) returns (ResetResponse);
rpc ServiceList(google.protobuf.Empty) returns (ServiceListResponse);
rpc ServiceRestart(ServiceRestartRequest) returns (ServiceRestartResponse);
rpc ServiceStart(ServiceStartRequest) returns (ServiceStartResponse);
rpc ServiceStop(ServiceStopRequest) returns (ServiceStopResponse);
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
rpc Stats(StatsRequest) returns (StatsResponse);
rpc SystemStat(google.protobuf.Empty) returns (SystemStatResponse);
rpc Upgrade(UpgradeRequest) returns (UpgradeResponse);
rpc Version(google.protobuf.Empty) returns (VersionResponse);
// GenerateClientConfiguration generates talosctl client configuration (talosconfig).
rpc GenerateClientConfiguration(GenerateClientConfigurationRequest) returns (GenerateClientConfigurationResponse);
// PacketCapture performs packet capture and streams back pcap file.
rpc PacketCapture(PacketCaptureRequest) returns (stream common.Data);
// Netstat provides information about network connections.
rpc Netstat(NetstatRequest) returns (NetstatResponse);
// MetaWrite writes a META key-value pair.
rpc MetaWrite(MetaWriteRequest) returns (MetaWriteResponse);
// MetaDelete deletes a META key.
rpc MetaDelete(MetaDeleteRequest) returns (MetaDeleteResponse);
// ImageList lists images in the CRI.
rpc ImageList(ImageListRequest) returns (stream ImageListResponse);
// ImagePull pulls an image into the CRI.
rpc ImagePull(ImagePullRequest) returns (ImagePullResponse);
}
// rpc applyConfiguration
// ApplyConfiguration describes a request to assert a new configuration upon a
// node.
message ApplyConfigurationRequest {
enum Mode {
REBOOT = 0;
AUTO = 1;
NO_REBOOT = 2;
STAGED = 3;
TRY = 4;
}
bytes data = 1;
Mode mode = 4;
bool dry_run = 5;
google.protobuf.Duration try_mode_timeout = 6;
}
// ApplyConfigurationResponse describes the response to a configuration request.
message ApplyConfiguration {
common.Metadata metadata = 1;
// Configuration validation warnings.
repeated string warnings = 2;
// States which mode was actually chosen.
ApplyConfigurationRequest.Mode mode = 3;
// Human-readable message explaining the result of the apply configuration call.
string mode_details = 4;
}
message ApplyConfigurationResponse {
repeated ApplyConfiguration messages = 1;
}
// rpc reboot
message RebootRequest {
enum Mode {
DEFAULT = 0;
POWERCYCLE = 1;
}
Mode mode = 1;
}
// The reboot message containing the reboot status.
message Reboot {
common.Metadata metadata = 1;
string actor_id = 2;
}
message RebootResponse {
repeated Reboot messages = 1;
}
// rpc Bootstrap
message BootstrapRequest {
// Enable etcd recovery from the snapshot.
// Snapshot should be uploaded before this call via EtcdRecover RPC.
bool recover_etcd = 1;
// Skip hash check on the snapshot (etcd).
// Enable this when recovering from data directory copy to skip integrity check.
bool recover_skip_hash_check = 2;
}
// The bootstrap message containing the bootstrap status.
message Bootstrap {
common.Metadata metadata = 1;
}
message BootstrapResponse {
repeated Bootstrap messages = 1;
}
// rpc events
message SequenceEvent {
string sequence = 1;
enum Action {
NOOP = 0;
START = 1;
STOP = 2;
}
Action action = 2;
common.Error error = 3;
}
message PhaseEvent {
string phase = 1;
enum Action {
START = 0;
STOP = 1;
}
Action action = 2;
}
message TaskEvent {
string task = 1;
enum Action {
START = 0;
STOP = 1;
}
Action action = 2;
}
message ServiceStateEvent {
string service = 1;
enum Action {
INITIALIZED = 0;
PREPARING = 1;
WAITING = 2;
RUNNING = 3;
STOPPING = 4;
FINISHED = 5;
FAILED = 6;
SKIPPED = 7;
STARTING = 8;
}
Action action = 2;
string message = 3;
ServiceHealth health = 4;
}
message RestartEvent {
int64 cmd = 1;
}
// ConfigLoadErrorEvent is reported when the config loading has failed.
message ConfigLoadErrorEvent {
string error = 1;
}
// ConfigValidationErrorEvent is reported when config validation has failed.
message ConfigValidationErrorEvent {
string error = 1;
}
// AddressEvent reports node endpoints aggregated from k8s.Endpoints and network.Hostname.
message AddressEvent {
string hostname = 1;
repeated string addresses = 2;
}
// MachineStatusEvent reports changes to the MachineStatus resource.
message MachineStatusEvent {
message MachineStatus {
message UnmetCondition {
string name = 1;
string reason = 2;
}
bool ready = 1;
repeated UnmetCondition unmet_conditions = 2;
}
enum MachineStage {
UNKNOWN = 0;
BOOTING = 1;
INSTALLING = 2;
MAINTENANCE = 3;
RUNNING = 4;
REBOOTING = 5;
SHUTTING_DOWN = 6;
RESETTING = 7;
UPGRADING = 8;
}
MachineStage stage = 1;
MachineStatus status = 2;
}
message EventsRequest {
int32 tail_events = 1;
string tail_id = 2;
int32 tail_seconds = 3;
string with_actor_id = 4;
}
message Event {
common.Metadata metadata = 1;
google.protobuf.Any data = 2;
string id = 3;
string actor_id = 4;
}
// rpc reset
message ResetPartitionSpec {
string label = 1;
bool wipe = 2;
}
message ResetRequest {
enum WipeMode {
ALL = 0;
SYSTEM_DISK = 1;
USER_DISKS = 2;
}
// Graceful indicates whether node should leave etcd before the upgrade, it also
// enforces etcd checks before leaving.
bool graceful = 1;
// Reboot indicates whether node should reboot or halt after resetting.
bool reboot = 2;
// System_partitions_to_wipe lists specific system disk partitions to be reset (wiped).
// If system_partitions_to_wipe is empty, all the partitions are erased.
repeated ResetPartitionSpec system_partitions_to_wipe = 3;
// UserDisksToWipe lists specific connected block devices to be reset (wiped).
repeated string user_disks_to_wipe = 4;
// WipeMode defines which devices should be wiped.
WipeMode mode = 5;
}
// The reset message containing the restart status.
message Reset {
common.Metadata metadata = 1;
string actor_id = 2;
}
message ResetResponse {
repeated Reset messages = 1;
}
// rpc shutdown
// The messages message containing the shutdown status.
message Shutdown {
common.Metadata metadata = 1;
string actor_id = 2;
}
message ShutdownRequest {
// Force indicates whether node should shutdown without first cordening and draining
bool force = 1;
}
message ShutdownResponse {
repeated Shutdown messages = 1;
}
// rpc upgrade
message UpgradeRequest {
enum RebootMode {
DEFAULT = 0;
POWERCYCLE = 1;
}
string image = 1;
bool preserve = 2;
bool stage = 3;
bool force = 4;
RebootMode reboot_mode = 5;
}
message Upgrade {
common.Metadata metadata = 1;
string ack = 2;
string actor_id = 3;
}
message UpgradeResponse {
repeated Upgrade messages = 1;
}
// rpc servicelist
message ServiceList {
common.Metadata metadata = 1;
repeated ServiceInfo services = 2;
}
message ServiceListResponse {
repeated ServiceList messages = 1;
}
message ServiceInfo {
string id = 1;
string state = 2;
ServiceEvents events = 3;
ServiceHealth health = 4;
}
message ServiceEvents {
repeated ServiceEvent events = 1;
}
message ServiceEvent {
string msg = 1;
string state = 2;
google.protobuf.Timestamp ts = 3;
}
message ServiceHealth {
bool unknown = 1;
bool healthy = 2;
string last_message = 3;
google.protobuf.Timestamp last_change = 4;
}
// rpc servicestart
message ServiceStartRequest {
string id = 1;
}
message ServiceStart {
common.Metadata metadata = 1;
string resp = 2;
}
message ServiceStartResponse {
repeated ServiceStart messages = 1;
}
message ServiceStopRequest {
string id = 1;
}
message ServiceStop {
common.Metadata metadata = 1;
string resp = 2;
}
message ServiceStopResponse {
repeated ServiceStop messages = 1;
}
message ServiceRestartRequest {
string id = 1;
}
message ServiceRestart {
common.Metadata metadata = 1;
string resp = 2;
}
message ServiceRestartResponse {
repeated ServiceRestart messages = 1;
}
// CopyRequest describes a request to copy data out of Talos node
//
// Copy produces .tar.gz archive which is streamed back to the caller
message CopyRequest {
// Root path to start copying data out, it might be either a file or directory
string root_path = 1;
}
// ListRequest describes a request to list the contents of a directory.
message ListRequest {
// Root indicates the root directory for the list. If not indicated, '/' is
// presumed.
string root = 1;
// Recurse indicates that subdirectories should be recursed.
bool recurse = 2;
// RecursionDepth indicates how many levels of subdirectories should be
// recursed. The default (0) indicates that no limit should be enforced.
int32 recursion_depth = 3;
// File type.
enum Type {
// Regular file (not directory, symlink, etc).
REGULAR = 0;
// Directory.
DIRECTORY = 1;
// Symbolic link.
SYMLINK = 2;
}
// Types indicates what file type should be returned. If not indicated,
// all files will be returned.
repeated Type types = 4;
}
// DiskUsageRequest describes a request to list disk usage of directories and regular files
message DiskUsageRequest {
// RecursionDepth indicates how many levels of subdirectories should be
// recursed. The default (0) indicates that no limit should be enforced.
int32 recursion_depth = 1;
// All write sizes for all files, not just directories.
bool all = 2;
// Threshold exclude entries smaller than SIZE if positive,
// or entries greater than SIZE if negative.
int64 threshold = 3;
// DiskUsagePaths is the list of directories to calculate disk usage for.
repeated string paths = 4;
}
// FileInfo describes a file or directory's information
message FileInfo {
common.Metadata metadata = 1;
// Name is the name (including prefixed path) of the file or directory
string name = 2;
// Size indicates the number of bytes contained within the file
int64 size = 3;
// Mode is the bitmap of UNIX mode/permission flags of the file
uint32 mode = 4;
// Modified indicates the UNIX timestamp at which the file was last modified
int64 modified = 5;
// IsDir indicates that the file is a directory
bool is_dir = 6;
// Error describes any error encountered while trying to read the file
// information.
string error = 7;
// Link is filled with symlink target
string link = 8;
// RelativeName is the name of the file or directory relative to the RootPath
string relative_name = 9;
// Owner uid
uint32 uid = 10;
// Owner gid
uint32 gid = 11;
}
// DiskUsageInfo describes a file or directory's information for du command
message DiskUsageInfo {
common.Metadata metadata = 1;
// Name is the name (including prefixed path) of the file or directory
string name = 2;
// Size indicates the number of bytes contained within the file
int64 size = 3;
// Error describes any error encountered while trying to read the file
// information.
string error = 4;
// RelativeName is the name of the file or directory relative to the RootPath
string relative_name = 5;
}
// The messages message containing the requested df stats.
message Mounts {
common.Metadata metadata = 1;
repeated MountStat stats = 2;
}
message MountsResponse {
repeated Mounts messages = 1;
}
// The messages message containing the requested processes.
message MountStat {
string filesystem = 1;
uint64 size = 2;
uint64 available = 3;
string mounted_on = 4;
}
message Version {
common.Metadata metadata = 1;
VersionInfo version = 2;
PlatformInfo platform = 3;
// Features describe individual Talos features that can be switched on or off.
FeaturesInfo features = 4;
}
message VersionResponse {
repeated Version messages = 1;
}
message VersionInfo {
string tag = 1;
string sha = 2;
string built = 3;
string go_version = 4;
string os = 5;
string arch = 6;
}
message PlatformInfo {
string name = 1;
string mode = 2;
}
// FeaturesInfo describes individual Talos features that can be switched on or off.
message FeaturesInfo {
// RBAC is true if role-based access control is enabled.
bool rbac = 1;
}
// rpc logs
// The request message containing the process name.
message LogsRequest {
string namespace = 1;
string id = 2;
// driver might be default "containerd" or "cri"
common.ContainerDriver driver = 3;
bool follow = 4;
int32 tail_lines = 5;
}
message ReadRequest {
string path = 1;
}
// LogsContainer desribes all avalaible registered log containers.
message LogsContainer {
common.Metadata metadata = 1;
repeated string ids = 2;
}
message LogsContainersResponse {
repeated LogsContainer messages = 1;
}
// rpc rollback
message RollbackRequest {}
message Rollback {
common.Metadata metadata = 1;
}
message RollbackResponse {
repeated Rollback messages = 1;
}
// rpc Containers
message ContainersRequest {
string namespace = 1;
// driver might be default "containerd" or "cri"
common.ContainerDriver driver = 2;
}
// The messages message containing the requested containers.
message ContainerInfo {
string namespace = 1;
string id = 2;
string image = 3;
uint32 pid = 4;
string status = 5;
string pod_id = 6;
string name = 7;
string network_namespace = 8;
}
// The messages message containing the requested containers.
message Container {
common.Metadata metadata = 1;
repeated ContainerInfo containers = 2;
}
message ContainersResponse {
repeated Container messages = 1;
}
// dmesg
message DmesgRequest {
bool follow = 1;
bool tail = 2;
}
// rpc processes
message ProcessesResponse {
repeated Process messages = 1;
}
message Process {
common.Metadata metadata = 1;
repeated ProcessInfo processes = 2;
}
message ProcessInfo {
int32 pid = 1;
int32 ppid = 2;
string state = 3;
int32 threads = 4;
double cpu_time = 5;
uint64 virtual_memory = 6;
uint64 resident_memory = 7;
string command = 8;
string executable = 9;
string args = 10;
string label = 11;
}
// rpc restart
// The request message containing the process to restart.
message RestartRequest {
string namespace = 1;
string id = 2;
// driver might be default "containerd" or "cri"
common.ContainerDriver driver = 3;
}
message Restart {
common.Metadata metadata = 1;
}
// The messages message containing the restart status.
message RestartResponse {
repeated Restart messages = 1;
}
// rpc stats
// The request message containing the containerd namespace.
message StatsRequest {
string namespace = 1;
// driver might be default "containerd" or "cri"
common.ContainerDriver driver = 2;
}
// The messages message containing the requested stats.
message Stats {
common.Metadata metadata = 1;
repeated Stat stats = 2;
}
message StatsResponse {
repeated Stats messages = 1;
}
// The messages message containing the requested stat.
message Stat {
string namespace = 1;
string id = 2;
uint64 memory_usage = 4;
uint64 cpu_usage = 5;
string pod_id = 6;
string name = 7;
}
message Memory {
common.Metadata metadata = 1;
MemInfo meminfo = 2;
}
message MemoryResponse {
repeated Memory messages = 1;
}
message MemInfo {
uint64 memtotal = 1;
uint64 memfree = 2;
uint64 memavailable = 3;
uint64 buffers = 4;
uint64 cached = 5;
uint64 swapcached = 6;
uint64 active = 7;
uint64 inactive = 8;
uint64 activeanon = 9;
uint64 inactiveanon = 10;
uint64 activefile = 11;
uint64 inactivefile = 12;
uint64 unevictable = 13;
uint64 mlocked = 14;
uint64 swaptotal = 15;
uint64 swapfree = 16;
uint64 dirty = 17;
uint64 writeback = 18;
uint64 anonpages = 19;
uint64 mapped = 20;
uint64 shmem = 21;
uint64 slab = 22;
uint64 sreclaimable = 23;
uint64 sunreclaim = 24;
uint64 kernelstack = 25;
uint64 pagetables = 26;
uint64 nfsunstable = 27;
uint64 bounce = 28;
uint64 writebacktmp = 29;
uint64 commitlimit = 30;
uint64 committedas = 31;
uint64 vmalloctotal = 32;
uint64 vmallocused = 33;
uint64 vmallocchunk = 34;
uint64 hardwarecorrupted = 35;
uint64 anonhugepages = 36;
uint64 shmemhugepages = 37;
uint64 shmempmdmapped = 38;
uint64 cmatotal = 39;
uint64 cmafree = 40;
uint64 hugepagestotal = 41;
uint64 hugepagesfree = 42;
uint64 hugepagesrsvd = 43;
uint64 hugepagessurp = 44;
uint64 hugepagesize = 45;
uint64 directmap4k = 46;
uint64 directmap2m = 47;
uint64 directmap1g = 48;
}
// rpc Hostname
message HostnameResponse {
repeated Hostname messages = 1;
}
message Hostname {
common.Metadata metadata = 1;
string hostname = 2;
}
// rpc LoadAvg
message LoadAvgResponse {
repeated LoadAvg messages = 1;
}
message LoadAvg {
common.Metadata metadata = 1;
double load1 = 2;
double load5 = 3;
double load15 = 4;
}
// rpc SystemStat
message SystemStatResponse {
repeated SystemStat messages = 1;
}
message SystemStat {
common.Metadata metadata = 1;
uint64 boot_time = 2;
CPUStat cpu_total = 3;
repeated CPUStat cpu = 4;
uint64 irq_total = 5;
repeated uint64 irq = 6;
uint64 context_switches = 7;
uint64 process_created = 8;
uint64 process_running = 9;
uint64 process_blocked = 10;
uint64 soft_irq_total = 11;
SoftIRQStat soft_irq = 12;
}
message CPUStat {
double user = 1;
double nice = 2;
double system = 3;
double idle = 4;
double iowait = 5;
double irq = 6;
double soft_irq = 7;
double steal = 8;
double guest = 9;
double guest_nice = 10;
}
message SoftIRQStat {
uint64 hi = 1;
uint64 timer = 2;
uint64 net_tx = 3;
uint64 net_rx = 4;
uint64 block = 5;
uint64 block_io_poll = 6;
uint64 tasklet = 7;
uint64 sched = 8;
uint64 hrtimer = 9;
uint64 rcu = 10;
}
// rpc CPUInfo
message CPUInfoResponse {
repeated CPUsInfo messages = 1;
}
message CPUsInfo {
common.Metadata metadata = 1;
repeated CPUInfo cpu_info = 2;
}
message CPUInfo {
uint32 processor = 1;
string vendor_id = 2;
string cpu_family = 3;
string model = 4;
string model_name = 5;
string stepping = 6;
string microcode = 7;
double cpu_mhz = 8;
string cache_size = 9;
string physical_id = 10;
uint32 siblings = 11;
string core_id = 12;
uint32 cpu_cores = 13;
string apic_id = 14;
string initial_apic_id = 15;
string fpu = 16;
string fpu_exception = 17;
uint32 cpu_id_level = 18;
string wp = 19;
repeated string flags = 20;
repeated string bugs = 21;
double bogo_mips = 22;
uint32 cl_flush_size = 23;
uint32 cache_alignment = 24;
string address_sizes = 25;
string power_management = 26;
}
// rpc NetworkDeviceStats
message NetworkDeviceStatsResponse {
repeated NetworkDeviceStats messages = 1;
}
message NetworkDeviceStats {
common.Metadata metadata = 1;
NetDev total = 2;
repeated NetDev devices = 3;
}
message NetDev {
string name = 1;
uint64 rx_bytes = 2;
uint64 rx_packets = 3;
uint64 rx_errors = 4;
uint64 rx_dropped = 5;
uint64 rx_fifo = 6;
uint64 rx_frame = 7;
uint64 rx_compressed = 8;
uint64 rx_multicast = 9;
uint64 tx_bytes = 10;
uint64 tx_packets = 11;
uint64 tx_errors = 12;
uint64 tx_dropped = 13;
uint64 tx_fifo = 14;
uint64 tx_collisions = 15;
uint64 tx_carrier = 16;
uint64 tx_compressed = 17;
}
// rpc DiskStats
message DiskStatsResponse {
repeated DiskStats messages = 1;
}
message DiskStats {
common.Metadata metadata = 1;
DiskStat total = 2;
repeated DiskStat devices = 3;
}
message DiskStat {
string name = 1;
uint64 read_completed = 2;
uint64 read_merged = 3;
uint64 read_sectors = 4;
uint64 read_time_ms = 5;
uint64 write_completed = 6;
uint64 write_merged = 7;
uint64 write_sectors = 8;
uint64 write_time_ms = 9;
uint64 io_in_progress = 10;
uint64 io_time_ms = 11;
uint64 io_time_weighted_ms = 12;
uint64 discard_completed = 13;
uint64 discard_merged = 14;
uint64 discard_sectors = 15;
uint64 discard_time_ms = 16;
}
message EtcdLeaveClusterRequest {}
message EtcdLeaveCluster {
common.Metadata metadata = 1;
}
message EtcdLeaveClusterResponse {
repeated EtcdLeaveCluster messages = 1;
}
message EtcdRemoveMemberRequest {
string member = 1;
}
message EtcdRemoveMember {
common.Metadata metadata = 1;
}
message EtcdRemoveMemberResponse {
repeated EtcdRemoveMember messages = 1;
}
message EtcdRemoveMemberByIDRequest {
uint64 member_id = 1;
}
message EtcdRemoveMemberByID {
common.Metadata metadata = 1;
}
message EtcdRemoveMemberByIDResponse {
repeated EtcdRemoveMemberByID messages = 1;
}
message EtcdForfeitLeadershipRequest {}
message EtcdForfeitLeadership {
common.Metadata metadata = 1;
string member = 2;
}
message EtcdForfeitLeadershipResponse {
repeated EtcdForfeitLeadership messages = 1;
}
message EtcdMemberListRequest {
bool query_local = 1;
}
// EtcdMember describes a single etcd member.
message EtcdMember {
// member ID.
uint64 id = 2;
// human-readable name of the member.
string hostname = 3;
// the list of URLs the member exposes to clients for communication.
repeated string peer_urls = 4;
// the list of URLs the member exposes to the cluster for communication.
repeated string client_urls = 5;
// learner flag
bool is_learner = 6;
}
// EtcdMembers contains the list of members registered on the host.