trisulrp 3.2.16 → 3.2.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.rdoc +6 -2
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/trisulrp/protocol.rb +31 -0
- data/lib/trisulrp/trp.pb.rb +77 -1
- data/lib/trisulrp/trp.proto +102 -16
- data/trisulrp.gemspec +28 -28
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eb09a377482ac86a919b19eb3d9c4829be91bbfe0fcbd77429597df8047dc9ae
|
4
|
+
data.tar.gz: 8c144bd549894c64879dd6d8ba24916cf627eb6024c939e9b705909a46e28072
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75249f736dc5b485c70598f77387abd5bbe410600d311f88e09dda5142b478f6a7a9ac3291d1167d46c9eccbcf308a6b0bbfae440fa8d91ab0bd3ec637beeb2e
|
7
|
+
data.tar.gz: 8ef04692441ccbebedb2e43f06d8d9fb540b21524e12d4f1beb681560f3361a88d5d6777a74e49afbdbbbe224051f5debed7627749e289abd3a5e99341056250
|
data/README.rdoc
CHANGED
@@ -16,9 +16,12 @@ Key Features :
|
|
16
16
|
|
17
17
|
* TRP Documentation and Tutorials http://trisul.org/docs/trp/index.html
|
18
18
|
* Getting started tutorial http://trisul.org/docs/trp/trpgemsteps.html
|
19
|
-
* Github repo of sample scripts https://github.com/
|
19
|
+
* Github repo of sample scripts https://github.com/trisulnsm/trisul-scripts/trp
|
20
20
|
|
21
21
|
|
22
|
+
== Generating the ruby protobuf definitions
|
23
|
+
protoc --ruby_out=. trp.proto
|
24
|
+
|
22
25
|
== Contributing to trisulrp
|
23
26
|
|
24
27
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
@@ -31,5 +34,6 @@ Key Features :
|
|
31
34
|
|
32
35
|
== Copyright
|
33
36
|
|
34
|
-
|
37
|
+
License MIT
|
38
|
+
Copyright (c) 2010-2021 Unleash Networks. See LICENSE.txt for further details.
|
35
39
|
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.31
|
data/lib/trisulrp/protocol.rb
CHANGED
@@ -335,6 +335,32 @@ module TrisulRP::Protocol
|
|
335
335
|
return tint
|
336
336
|
end
|
337
337
|
|
338
|
+
|
339
|
+
# Helper iterate through each time interval in reverse order
|
340
|
+
#
|
341
|
+
# [endpoint] - the ZMQ endpoint
|
342
|
+
#
|
343
|
+
# ==== Returns
|
344
|
+
# ==== Yields
|
345
|
+
# [time_interval, id, total_intervals] A TRP::TimeInterval object which can be attached to any :time_interval field of a TRP request
|
346
|
+
#
|
347
|
+
#
|
348
|
+
def each_time_interval(zmq_endpt)
|
349
|
+
|
350
|
+
req=mk_request(TRP::Message::Command::TIMESLICES_REQUEST )
|
351
|
+
get_response_zmq(zmq_endpt,req) do |resp|
|
352
|
+
|
353
|
+
slice_id = 0
|
354
|
+
total_slices = resp.slices.size
|
355
|
+
|
356
|
+
resp.slices.reverse_each do | slc |
|
357
|
+
yield slc.time_interval, slice_id, total_slices
|
358
|
+
slice_id=slice_id+1
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
|
338
364
|
# Helper to allow assinging string to KeyT field
|
339
365
|
#
|
340
366
|
# instead of
|
@@ -523,6 +549,9 @@ module TrisulRP::Protocol
|
|
523
549
|
when TRP::Message::Command::RUNTOOL_REQUEST
|
524
550
|
fix_TRP_Fields( TRP::RunToolRequest, params)
|
525
551
|
req.run_tool_request = TRP::RunToolRequest.new(params)
|
552
|
+
when TRP::Message::Command::TOOL_INFO_REQUEST
|
553
|
+
fix_TRP_Fields( TRP::ToolInfoRequest, params)
|
554
|
+
req.tool_info_request = TRP::ToolInfoRequest.new(params)
|
526
555
|
else
|
527
556
|
raise "Unknown TRP command ID"
|
528
557
|
end
|
@@ -624,6 +653,8 @@ module TrisulRP::Protocol
|
|
624
653
|
resp.graph_response
|
625
654
|
when TRP::Message::Command::RUNTOOL_RESPONSE
|
626
655
|
resp.run_tool_response
|
656
|
+
when TRP::Message::Command::TOOL_INFO_RESPONSE
|
657
|
+
resp.tool_info_response
|
627
658
|
else
|
628
659
|
raise "#{resp.trp_command.to_i} Unknown TRP command ID"
|
629
660
|
end
|
data/lib/trisulrp/trp.pb.rb
CHANGED
@@ -167,6 +167,11 @@ module TRP
|
|
167
167
|
define :AGGREGATE_SESSIONS_RESPONSE, 133
|
168
168
|
define :RUNTOOL_REQUEST, 134
|
169
169
|
define :RUNTOOL_RESPONSE, 135
|
170
|
+
define :HA_CONTROL_REQUEST, 140
|
171
|
+
define :HA_CONTROL_RESPONSE, 141
|
172
|
+
define :DOMAIN_PING, 142
|
173
|
+
define :TOOL_INFO_REQUEST, 143
|
174
|
+
define :TOOL_INFO_RESPONSE, 144
|
170
175
|
end
|
171
176
|
|
172
177
|
end
|
@@ -188,6 +193,7 @@ module TRP
|
|
188
193
|
class AggregateSessionsRequest < ::Protobuf::Message; end
|
189
194
|
class AggregateSessionsResponse < ::Protobuf::Message
|
190
195
|
class KeyTCount < ::Protobuf::Message; end
|
196
|
+
class TagGroup < ::Protobuf::Message; end
|
191
197
|
|
192
198
|
end
|
193
199
|
|
@@ -247,6 +253,18 @@ module TRP
|
|
247
253
|
|
248
254
|
end
|
249
255
|
|
256
|
+
class HAControlRequest < ::Protobuf::Message
|
257
|
+
class HAOperation < ::Protobuf::Enum
|
258
|
+
define :HA_TEST_REACHABILITY, 0
|
259
|
+
define :HA_SWITCH_BACKUP, 1
|
260
|
+
define :HA_SWITCH_PRIMARY, 2
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
class HAControlResponse < ::Protobuf::Message; end
|
266
|
+
class ToolInfoRequest < ::Protobuf::Message; end
|
267
|
+
class ToolInfoResponse < ::Protobuf::Message; end
|
250
268
|
class NodeConfigRequest < ::Protobuf::Message
|
251
269
|
class IntelFeed < ::Protobuf::Message; end
|
252
270
|
|
@@ -291,6 +309,7 @@ module TRP
|
|
291
309
|
define :DF, 2
|
292
310
|
define :GEOQUERY, 3
|
293
311
|
define :TOP, 4
|
312
|
+
define :BGPQUERY, 5
|
294
313
|
end
|
295
314
|
|
296
315
|
end
|
@@ -361,6 +380,9 @@ module TRP
|
|
361
380
|
optional :string, :description, 4
|
362
381
|
optional :int64, :metric, 5
|
363
382
|
repeated ::TRP::KeyT::NameValueT, :attributes, 6
|
383
|
+
optional :int64, :metric_max, 7
|
384
|
+
optional :int64, :metric_min, 8
|
385
|
+
optional :int64, :metric_avg, 9
|
364
386
|
end
|
365
387
|
|
366
388
|
class CounterGroupT
|
@@ -535,6 +557,10 @@ module TRP
|
|
535
557
|
optional ::TRP::AggregateResourcesResponse, :aggregate_resources_response, 143
|
536
558
|
optional ::TRP::RunToolRequest, :run_tool_request, 144
|
537
559
|
optional ::TRP::RunToolResponse, :run_tool_response, 145
|
560
|
+
optional ::TRP::HAControlRequest, :ha_control_request, 150
|
561
|
+
optional ::TRP::HAControlResponse, :ha_control_response, 151
|
562
|
+
optional ::TRP::ToolInfoRequest, :tool_info_request, 152
|
563
|
+
optional ::TRP::ToolInfoResponse, :tool_info_response, 153
|
538
564
|
optional :string, :destination_node, 200
|
539
565
|
optional :string, :probe_id, 201
|
540
566
|
optional :bool, :run_async, 202
|
@@ -550,6 +576,8 @@ module TRP
|
|
550
576
|
optional :string, :station_id_request, 2
|
551
577
|
optional :string, :message, 3
|
552
578
|
optional :int64, :local_timestamp, 4
|
579
|
+
optional :string, :local_timestamp_string, 5
|
580
|
+
optional :bool, :is_primary, 6
|
553
581
|
end
|
554
582
|
|
555
583
|
class ErrorResponse
|
@@ -569,6 +597,8 @@ module TRP
|
|
569
597
|
required ::TRP::KeyT, :key, 4
|
570
598
|
required ::TRP::TimeInterval, :time_interval, 5
|
571
599
|
optional :int64, :volumes_only, 6, :default => 0
|
600
|
+
optional :bool, :get_key_attributes, 7, :default => false
|
601
|
+
optional :int64, :get_percentile, 8, :default => 0
|
572
602
|
end
|
573
603
|
|
574
604
|
class CounterItemResponse
|
@@ -576,6 +606,10 @@ module TRP
|
|
576
606
|
required ::TRP::KeyT, :key, 2
|
577
607
|
optional ::TRP::StatsArray, :totals, 3
|
578
608
|
repeated ::TRP::StatsArray, :stats, 4
|
609
|
+
optional ::TRP::StatsArray, :maximums, 5
|
610
|
+
optional ::TRP::StatsArray, :minimums, 6
|
611
|
+
optional ::TRP::StatsArray, :samples, 8
|
612
|
+
optional ::TRP::StatsArray, :percentiles, 9
|
579
613
|
end
|
580
614
|
|
581
615
|
class CounterGroupTopperRequest
|
@@ -588,6 +622,7 @@ module TRP
|
|
588
622
|
optional :bool, :resolve_keys, 8, :default => true
|
589
623
|
optional :string, :key_filter, 9
|
590
624
|
optional :string, :inverse_key_filter, 10
|
625
|
+
optional :bool, :get_key_attributes, 11, :default => false
|
591
626
|
end
|
592
627
|
|
593
628
|
class CounterGroupTopperResponse
|
@@ -646,6 +681,7 @@ module TRP
|
|
646
681
|
optional :bool, :resolve_keys, 21, :default => true
|
647
682
|
optional :string, :outputpath, 22
|
648
683
|
repeated :string, :idlist, 23
|
684
|
+
optional ::TRP::KeyT, :any_nf_ifindex, 24
|
649
685
|
end
|
650
686
|
|
651
687
|
class QuerySessionsResponse
|
@@ -672,7 +708,8 @@ module TRP
|
|
672
708
|
optional :string, :subnet_24, 17
|
673
709
|
optional :string, :subnet_16, 18
|
674
710
|
optional :int64, :aggregate_topcount, 19, :default => 100
|
675
|
-
|
711
|
+
repeated :string, :group_by_fields, 20
|
712
|
+
optional ::TRP::KeyT, :any_nf_ifindex, 21
|
676
713
|
end
|
677
714
|
|
678
715
|
class AggregateSessionsResponse
|
@@ -682,6 +719,11 @@ module TRP
|
|
682
719
|
required :int64, :metric, 3
|
683
720
|
end
|
684
721
|
|
722
|
+
class TagGroup
|
723
|
+
required :string, :group_name, 1
|
724
|
+
repeated ::TRP::AggregateSessionsResponse::KeyTCount, :tag_metrics, 2
|
725
|
+
end
|
726
|
+
|
685
727
|
required :string, :session_group, 2
|
686
728
|
optional ::TRP::TimeInterval, :time_interval, 3
|
687
729
|
repeated ::TRP::AggregateSessionsResponse::KeyTCount, :source_ip, 5
|
@@ -700,11 +742,14 @@ module TRP
|
|
700
742
|
repeated ::TRP::AggregateSessionsResponse::KeyTCount, :internal_port, 18
|
701
743
|
repeated ::TRP::AggregateSessionsResponse::KeyTCount, :internal_ip, 19
|
702
744
|
repeated ::TRP::AggregateSessionsResponse::KeyTCount, :external_ip, 20
|
745
|
+
repeated ::TRP::AggregateSessionsResponse::TagGroup, :tag_group, 21
|
703
746
|
end
|
704
747
|
|
705
748
|
class UpdateKeyRequest
|
706
749
|
required :string, :counter_group, 2
|
707
750
|
repeated ::TRP::KeyT, :keys, 4
|
751
|
+
optional :bool, :remove_all_attributes, 5
|
752
|
+
repeated :string, :remove_attributes, 6
|
708
753
|
end
|
709
754
|
|
710
755
|
class SessionTrackerRequest
|
@@ -822,6 +867,8 @@ module TRP
|
|
822
867
|
optional :int64, :meter, 3, :default => 0
|
823
868
|
optional :int64, :maxitems, 4, :default => 100
|
824
869
|
optional ::TRP::TimeInterval, :time_interval, 5
|
870
|
+
optional :string, :key_filter, 6
|
871
|
+
optional :string, :inverse_key_filter, 7
|
825
872
|
end
|
826
873
|
|
827
874
|
class TopperTrendResponse
|
@@ -937,6 +984,7 @@ module TRP
|
|
937
984
|
optional :string, :extra_info, 4
|
938
985
|
optional ::TRP::Timestamp, :register_time, 5
|
939
986
|
optional ::TRP::Timestamp, :heartbeat_time, 6
|
987
|
+
optional :bool, :is_primary, 7, :default => true
|
940
988
|
end
|
941
989
|
|
942
990
|
required ::TRP::DomainOperation, :cmd, 1
|
@@ -946,6 +994,30 @@ module TRP
|
|
946
994
|
optional :bool, :need_reconnect, 5, :default => false
|
947
995
|
end
|
948
996
|
|
997
|
+
class HAControlRequest
|
998
|
+
required ::TRP::HAControlRequest::HAOperation, :cmd, 1
|
999
|
+
optional :string, :station_id, 2
|
1000
|
+
optional :string, :params, 3
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
class HAControlResponse
|
1004
|
+
optional :bool, :control_success, 1
|
1005
|
+
optional :string, :station_id, 2
|
1006
|
+
optional :string, :status_message, 3
|
1007
|
+
optional :bool, :primary_reachable, 4
|
1008
|
+
optional :bool, :backup_reachable, 5
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
class ToolInfoRequest
|
1012
|
+
optional :string, :context_name, 1
|
1013
|
+
optional :string, :tool_name, 2
|
1014
|
+
repeated :string, :tool_info_requested, 3
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
class ToolInfoResponse
|
1018
|
+
repeated ::TRP::NameValue, :tool_info, 1
|
1019
|
+
end
|
1020
|
+
|
949
1021
|
class NodeConfigRequest
|
950
1022
|
class IntelFeed
|
951
1023
|
required :string, :guid, 1
|
@@ -953,6 +1025,8 @@ module TRP
|
|
953
1025
|
optional :string, :download_rules, 3
|
954
1026
|
repeated :string, :uri, 4
|
955
1027
|
repeated :string, :usernodes, 5
|
1028
|
+
optional :int64, :sub_feed_id, 6, :default => -1
|
1029
|
+
optional :bool, :restore_mode, 7, :default => false
|
956
1030
|
end
|
957
1031
|
|
958
1032
|
optional :string, :message, 1
|
@@ -986,6 +1060,7 @@ module TRP
|
|
986
1060
|
class ContextInfoRequest
|
987
1061
|
optional :string, :context_name, 1
|
988
1062
|
optional :bool, :get_size_on_disk, 2, :default => false
|
1063
|
+
optional :string, :tool_name, 3
|
989
1064
|
end
|
990
1065
|
|
991
1066
|
class ContextInfoResponse
|
@@ -1167,6 +1242,7 @@ module TRP
|
|
1167
1242
|
required :string, :context_name, 1
|
1168
1243
|
required ::TRP::RunToolRequest::NodeTool, :tool, 2
|
1169
1244
|
optional :string, :tool_input, 3
|
1245
|
+
optional :string, :tool_input_file_data, 4
|
1170
1246
|
end
|
1171
1247
|
|
1172
1248
|
class RunToolResponse
|
data/lib/trisulrp/trp.proto
CHANGED
@@ -107,6 +107,9 @@ message KeyT {
|
|
107
107
|
required string attr_value=2;
|
108
108
|
}
|
109
109
|
repeated NameValueT attributes=6; /// New: Attributes are NVP for keys
|
110
|
+
optional int64 metric_max=7; /// optional : max observed value for metric in context
|
111
|
+
optional int64 metric_min=8; /// optional : max observed value for metric
|
112
|
+
optional int64 metric_avg=9; /// optional : max observed value for metric
|
110
113
|
}
|
111
114
|
|
112
115
|
|
@@ -352,6 +355,12 @@ message Message {
|
|
352
355
|
AGGREGATE_SESSIONS_RESPONSE=133;
|
353
356
|
RUNTOOL_REQUEST=134;
|
354
357
|
RUNTOOL_RESPONSE=135;
|
358
|
+
HA_CONTROL_REQUEST=140;
|
359
|
+
HA_CONTROL_RESPONSE=141;
|
360
|
+
DOMAIN_PING=142;
|
361
|
+
TOOL_INFO_REQUEST=143;
|
362
|
+
TOOL_INFO_RESPONSE=144;
|
363
|
+
|
355
364
|
}
|
356
365
|
|
357
366
|
required Command trp_command=1;
|
@@ -421,6 +430,10 @@ message Message {
|
|
421
430
|
optional AggregateResourcesResponse aggregate_resources_response=143;
|
422
431
|
optional RunToolRequest run_tool_request=144;
|
423
432
|
optional RunToolResponse run_tool_response=145;
|
433
|
+
optional HAControlRequest ha_control_request=150;
|
434
|
+
optional HAControlResponse ha_control_response=151;
|
435
|
+
optional ToolInfoRequest tool_info_request=152;
|
436
|
+
optional ToolInfoResponse tool_info_response=153;
|
424
437
|
optional string destination_node=200; // todo move 2nd
|
425
438
|
optional string probe_id=201; // todo move 3rd
|
426
439
|
optional bool run_async=202; /// if run_async = true, then you will immediately get a AsynResponse with a token you can poll
|
@@ -447,6 +460,8 @@ message HelloResponse{
|
|
447
460
|
optional string station_id_request=2; /// station id found in the request
|
448
461
|
optional string message=3; /// message found in the request
|
449
462
|
optional int64 local_timestamp=4; /// local timestamp at server, used to detect drifts
|
463
|
+
optional string local_timestamp_string=5; /// on server with time zone, use this
|
464
|
+
optional bool is_primary=6; /// is this a primary or HA node
|
450
465
|
}
|
451
466
|
|
452
467
|
/// ErrorResponse
|
@@ -473,6 +488,8 @@ message CounterItemRequest{
|
|
473
488
|
required KeyT key=4; /// key (can specify key.key, key.label, etc too
|
474
489
|
required TimeInterval time_interval=5; /// Time interval for query
|
475
490
|
optional int64 volumes_only=6 [default=0]; /// if '1' ; then only retrieves totals for each meter
|
491
|
+
optional bool get_key_attributes=7 [default=false]; /// if true, response keys get key_attributes as well
|
492
|
+
optional int64 get_percentile=8[default=0]; /// enter 95 here if you want 95th percentile (using streaming)
|
476
493
|
}
|
477
494
|
|
478
495
|
/// CounterItemResponse -
|
@@ -481,6 +498,10 @@ message CounterItemResponse{
|
|
481
498
|
required KeyT key=2; /// key : filled up with readable,label automatically
|
482
499
|
optional StatsArray totals=3; /// if volumes_only = 1 in request, this contains totals for each metric
|
483
500
|
repeated StatsArray stats=4; /// time series stats - can use to draw charts etc
|
501
|
+
optional StatsArray maximums=5; /// if volumes_only = 1 this contains MAX(..)
|
502
|
+
optional StatsArray minimums=6; /// if volumes_only = 1 this contains MIN(..)
|
503
|
+
optional StatsArray samples=8; /// if volumes_only = 1 this contains SAMPLES(..)
|
504
|
+
optional StatsArray percentiles=9; /// if volumes_only = 1 this contains SAMPLES(..)
|
484
505
|
}
|
485
506
|
|
486
507
|
|
@@ -495,6 +516,9 @@ message CounterGroupTopperRequest{
|
|
495
516
|
optional bool resolve_keys=8 [default=true]; /// retrieve labels as set in the response for each key
|
496
517
|
optional string key_filter=9; /// only get keys with this pattern and SYS:GROUP
|
497
518
|
optional string inverse_key_filter=10; /// only get keys without this pattern NOT
|
519
|
+
optional bool get_key_attributes=11 [default=false];
|
520
|
+
/// if true, response keys get key_attributes as well
|
521
|
+
|
498
522
|
}
|
499
523
|
|
500
524
|
/// CounterGroupTopperResponse
|
@@ -549,7 +573,7 @@ message QuerySessionsRequest {
|
|
549
573
|
optional KeyT dest_ip=7;
|
550
574
|
optional KeyT dest_port=8;
|
551
575
|
optional KeyT any_ip=9; /// source or dest match
|
552
|
-
optional KeyT any_port=10;
|
576
|
+
optional KeyT any_port=10; /// source or dest match
|
553
577
|
repeated KeyT ip_pair=11; /// array of 2 ips
|
554
578
|
optional KeyT protocol=12;
|
555
579
|
optional string flowtag=13; /// string flow tagger text
|
@@ -563,6 +587,7 @@ message QuerySessionsRequest {
|
|
563
587
|
optional bool resolve_keys=21[default=true];
|
564
588
|
optional string outputpath=22; /// write results to a file (CSV) on trisul-hub (for very large dumps)
|
565
589
|
repeated string idlist=23; /// array of flow ids , usually from SessionTracker response
|
590
|
+
optional KeyT any_nf_ifindex=24; /// composite query for both ifindex
|
566
591
|
}
|
567
592
|
|
568
593
|
|
@@ -596,7 +621,8 @@ message AggregateSessionsRequest {
|
|
596
621
|
optional string subnet_24=17; /// ip /24 subnet matching
|
597
622
|
optional string subnet_16=18; /// ip /16 subnet
|
598
623
|
optional int64 aggregate_topcount=19[default=100]; /// number of count-star per field
|
599
|
-
|
624
|
+
repeated string group_by_fields=20; /// list of field names
|
625
|
+
optional KeyT any_nf_ifindex=21; /// matches either gen2 or gen3
|
600
626
|
}
|
601
627
|
|
602
628
|
/// AggregateSessionsResponse
|
@@ -609,6 +635,11 @@ message AggregateSessionsResponse {
|
|
609
635
|
required int64 metric=3; /// aggregated metrics, eg total bytes
|
610
636
|
}
|
611
637
|
|
638
|
+
message TagGroup {
|
639
|
+
required string group_name=1;
|
640
|
+
repeated KeyTCount tag_metrics=2;
|
641
|
+
}
|
642
|
+
|
612
643
|
required string session_group=2;
|
613
644
|
optional TimeInterval time_interval=3;
|
614
645
|
repeated KeyTCount source_ip=5; /// top IPs
|
@@ -627,13 +658,17 @@ message AggregateSessionsResponse {
|
|
627
658
|
repeated KeyTCount internal_port=18; /// internal IP ports
|
628
659
|
repeated KeyTCount internal_ip=19; /// internal IPs
|
629
660
|
repeated KeyTCount external_ip=20; /// external IPs
|
661
|
+
repeated TagGroup tag_group=21; /// tag groups
|
630
662
|
}
|
631
663
|
|
664
|
+
|
632
665
|
/// UpdatekeysRequest
|
633
666
|
/// Response = OKResponse or ErrorResponse
|
634
667
|
message UpdateKeyRequest{
|
635
668
|
required string counter_group=2;
|
636
|
-
repeated KeyT keys=4;
|
669
|
+
repeated KeyT keys=4; /// key : if you set both key and label, the DB label will be updated
|
670
|
+
optional bool remove_all_attributes=5; /// remove all key attributes from keys
|
671
|
+
repeated string remove_attributes=6; /// remove these attributes only from keys
|
637
672
|
}
|
638
673
|
|
639
674
|
/// SessionTrackerRequest - query session trackers
|
@@ -781,6 +816,8 @@ message TopperTrendRequest {
|
|
781
816
|
optional int64 meter=3 [default=0];
|
782
817
|
optional int64 maxitems=4 [default=100];
|
783
818
|
optional TimeInterval time_interval=5;
|
819
|
+
optional string key_filter=6; /// only get keys with this pattern and SYS:GROUP
|
820
|
+
optional string inverse_key_filter=7; /// only get keys without this pattern NOT
|
784
821
|
}
|
785
822
|
|
786
823
|
/// TopperTrendResponse
|
@@ -847,9 +884,16 @@ message QueryFTSResponse {
|
|
847
884
|
/// get the METERS METASLICE info
|
848
885
|
/// .. response = TimeSlicesResponse
|
849
886
|
message TimeSlicesRequest {
|
850
|
-
optional bool get_disk_usage=1[default=false];
|
851
|
-
|
852
|
-
optional bool
|
887
|
+
optional bool get_disk_usage=1[default=false]; /// get disk usage per SLICE
|
888
|
+
|
889
|
+
optional bool get_all_engines=2[default=false]; /// by default (set to false) we only get instance-0
|
890
|
+
/// because are interested in iterating over
|
891
|
+
/// the time interval rather then each slice
|
892
|
+
/// inside the time interval. set this to true
|
893
|
+
/// if you want each slice to be reported
|
894
|
+
|
895
|
+
optional bool get_total_window=3[default=false]; /// just get the total time window in the
|
896
|
+
/// trisul database
|
853
897
|
}
|
854
898
|
|
855
899
|
/// .. response = TimeSlicesResponse
|
@@ -949,6 +993,7 @@ message DomainResponse {
|
|
949
993
|
optional string extra_info=4;
|
950
994
|
optional Timestamp register_time=5;
|
951
995
|
optional Timestamp heartbeat_time=6;
|
996
|
+
optional bool is_primary=7[default=true]; /// primary or backup HA mode
|
952
997
|
|
953
998
|
}
|
954
999
|
|
@@ -959,24 +1004,62 @@ message DomainResponse {
|
|
959
1004
|
optional bool need_reconnect=5[default=false];
|
960
1005
|
}
|
961
1006
|
|
1007
|
+
/// messages to HAControl
|
1008
|
+
message HAControlRequest {
|
1009
|
+
enum HAOperation
|
1010
|
+
{
|
1011
|
+
HA_TEST_REACHABILITY=0; /// test if primary or backup is reachable (test the other side)
|
1012
|
+
HA_SWITCH_BACKUP=1; /// switch all nodes to backup HA
|
1013
|
+
HA_SWITCH_PRIMARY=2; /// switch to primary HA
|
1014
|
+
}
|
1015
|
+
|
1016
|
+
|
1017
|
+
required HAOperation cmd=1;
|
1018
|
+
optional string station_id=2;
|
1019
|
+
optional string params=3;
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
message HAControlResponse {
|
1023
|
+
optional bool control_success=1;
|
1024
|
+
optional string station_id=2;
|
1025
|
+
optional string status_message=3;
|
1026
|
+
optional bool primary_reachable=4;
|
1027
|
+
optional bool backup_reachable=5;
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
/// tool info
|
1031
|
+
/// general purpose probe information gathering tool
|
1032
|
+
/// use cases : get BGP route receiver peer status
|
1033
|
+
message ToolInfoRequest {
|
1034
|
+
optional string context_name=1;
|
1035
|
+
optional string tool_name=2;
|
1036
|
+
repeated string tool_info_requested=3; /// array of information elements requested
|
1037
|
+
}
|
1038
|
+
|
1039
|
+
message ToolInfoResponse {
|
1040
|
+
repeated NameValue tool_info=1; /// info elements Name=Value
|
1041
|
+
}
|
1042
|
+
|
962
1043
|
|
963
1044
|
message NodeConfigRequest {
|
964
1045
|
optional string message=1;
|
965
1046
|
|
966
1047
|
message IntelFeed {
|
967
|
-
required string guid=1;
|
968
|
-
optional string name=2;
|
969
|
-
optional string download_rules=3;
|
970
|
-
repeated string uri=4;
|
971
|
-
repeated string usernodes=5;
|
1048
|
+
required string guid=1; /// identifying feed group (eg Geo, Badfellas)
|
1049
|
+
optional string name=2; /// feed name (eg badfellas)
|
1050
|
+
optional string download_rules=3; /// xml file with feed update instructions
|
1051
|
+
repeated string uri=4; /// individual files in config//.. for FileRequest download
|
1052
|
+
repeated string usernodes=5; /// user requesting the feed, the probe0, probe1, etc
|
1053
|
+
optional int64 sub_feed_id=6[default=-1];/// sub feed ID, when a feed consists of several sub-feeds
|
1054
|
+
optional bool restore_mode=7[default=false]; /// restore mode will backup and restore, used with add,remove
|
1055
|
+
|
972
1056
|
}
|
973
1057
|
|
974
1058
|
optional IntelFeed add_feed=2;
|
975
1059
|
optional IntelFeed process_new_feed=3;
|
976
1060
|
optional bool get_all_nodes=4[default=true];
|
977
1061
|
repeated NameValue query_config=5;
|
978
|
-
optional IntelFeed remove_feed=6;
|
979
|
-
|
1062
|
+
optional IntelFeed remove_feed=6;
|
980
1063
|
}
|
981
1064
|
|
982
1065
|
message NodeConfigResponse {
|
@@ -1007,8 +1090,9 @@ message ContextCreateRequest {
|
|
1007
1090
|
/// ContextInfo : one or all contexts
|
1008
1091
|
/// use is_init to prime with config
|
1009
1092
|
message ContextInfoRequest {
|
1010
|
-
optional string context_name=1;
|
1093
|
+
optional string context_name=1; /// if not set all context get in
|
1011
1094
|
optional bool get_size_on_disk=2[default=false]; /// get size on disk (expensive)
|
1095
|
+
optional string tool_name=3; /// get status of this tool, freeform bgp, suricata, snort, udpsink etc..
|
1012
1096
|
}
|
1013
1097
|
|
1014
1098
|
message ContextInfoResponse {
|
@@ -1018,11 +1102,11 @@ message ContextInfoResponse {
|
|
1018
1102
|
{
|
1019
1103
|
required string context_name=1;
|
1020
1104
|
required bool is_initialized=2;
|
1021
|
-
required bool is_running=3;
|
1105
|
+
required bool is_running=3; /// trisul processes runs
|
1022
1106
|
optional int64 size_on_disk=4;
|
1023
1107
|
optional TimeInterval time_interval=5;
|
1024
1108
|
optional bool is_clean=6;
|
1025
|
-
optional string extrainfo=7;
|
1109
|
+
optional string extrainfo=7; /// freeform text output when tool is specified , can be long string
|
1026
1110
|
repeated TimeInterval run_history=8;
|
1027
1111
|
optional string profile=9;
|
1028
1112
|
optional string runmode=10;
|
@@ -1247,9 +1331,11 @@ message RunToolRequest {
|
|
1247
1331
|
DF=2;
|
1248
1332
|
GEOQUERY=3;
|
1249
1333
|
TOP=4;
|
1334
|
+
BGPQUERY=5;
|
1250
1335
|
}
|
1251
1336
|
required NodeTool tool=2; /// which of these tools you want to run on node
|
1252
1337
|
optional string tool_input=3; /// input
|
1338
|
+
optional string tool_input_file_data=4;/// data that goes into a tool input file
|
1253
1339
|
}
|
1254
1340
|
|
1255
1341
|
/// RunToolResponse : ouput
|
data/trisulrp.gemspec
CHANGED
@@ -2,18 +2,18 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: trisulrp 3.2.
|
5
|
+
# stub: trisulrp 3.2.31 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
|
-
s.name = "trisulrp"
|
9
|
-
s.version = "3.2.
|
8
|
+
s.name = "trisulrp".freeze
|
9
|
+
s.version = "3.2.31"
|
10
10
|
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib"]
|
13
|
-
s.authors = ["vivek"]
|
14
|
-
s.date = "
|
15
|
-
s.description = "This gem deals about the trisul remote protocol"
|
16
|
-
s.email = "vivek_rajagopal@yahoo.com"
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["vivek".freeze]
|
14
|
+
s.date = "2022-04-05"
|
15
|
+
s.description = "This gem deals about the trisul remote protocol".freeze
|
16
|
+
s.email = "vivek_rajagopal@yahoo.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE.txt",
|
19
19
|
"README.rdoc"
|
@@ -47,33 +47,33 @@ Gem::Specification.new do |s|
|
|
47
47
|
"test/test_trisulrp.rb",
|
48
48
|
"trisulrp.gemspec"
|
49
49
|
]
|
50
|
-
s.homepage = "http://github.com/vivekrajan/trisulrp"
|
51
|
-
s.licenses = ["MIT"]
|
52
|
-
s.rubygems_version = "
|
53
|
-
s.summary = "trisul trp"
|
50
|
+
s.homepage = "http://github.com/vivekrajan/trisulrp".freeze
|
51
|
+
s.licenses = ["MIT".freeze]
|
52
|
+
s.rubygems_version = "3.0.3".freeze
|
53
|
+
s.summary = "trisul trp".freeze
|
54
54
|
|
55
55
|
if s.respond_to? :specification_version then
|
56
56
|
s.specification_version = 4
|
57
57
|
|
58
58
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
|
-
s.add_runtime_dependency(%q<protobuf
|
60
|
-
s.add_development_dependency(%q<shoulda
|
61
|
-
s.add_development_dependency(%q<bundler
|
62
|
-
s.add_development_dependency(%q<juwelier
|
63
|
-
s.add_development_dependency(%q<simplecov
|
59
|
+
s.add_runtime_dependency(%q<protobuf>.freeze, [">= 0"])
|
60
|
+
s.add_development_dependency(%q<shoulda>.freeze, [">= 0"])
|
61
|
+
s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
|
62
|
+
s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
|
63
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
64
64
|
else
|
65
|
-
s.add_dependency(%q<protobuf
|
66
|
-
s.add_dependency(%q<shoulda
|
67
|
-
s.add_dependency(%q<bundler
|
68
|
-
s.add_dependency(%q<juwelier
|
69
|
-
s.add_dependency(%q<simplecov
|
65
|
+
s.add_dependency(%q<protobuf>.freeze, [">= 0"])
|
66
|
+
s.add_dependency(%q<shoulda>.freeze, [">= 0"])
|
67
|
+
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
68
|
+
s.add_dependency(%q<juwelier>.freeze, [">= 0"])
|
69
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
70
70
|
end
|
71
71
|
else
|
72
|
-
s.add_dependency(%q<protobuf
|
73
|
-
s.add_dependency(%q<shoulda
|
74
|
-
s.add_dependency(%q<bundler
|
75
|
-
s.add_dependency(%q<juwelier
|
76
|
-
s.add_dependency(%q<simplecov
|
72
|
+
s.add_dependency(%q<protobuf>.freeze, [">= 0"])
|
73
|
+
s.add_dependency(%q<shoulda>.freeze, [">= 0"])
|
74
|
+
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
75
|
+
s.add_dependency(%q<juwelier>.freeze, [">= 0"])
|
76
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trisulrp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: protobuf
|
@@ -134,8 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
|
-
|
138
|
-
rubygems_version: 2.5.1
|
137
|
+
rubygems_version: 3.0.3
|
139
138
|
signing_key:
|
140
139
|
specification_version: 4
|
141
140
|
summary: trisul trp
|