catocli 3.0.18__py3-none-any.whl → 3.0.24__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of catocli might be problematic. Click here for more details.
- catocli/Utils/clidriver.py +16 -8
- catocli/Utils/formatter_account_metrics.py +544 -0
- catocli/Utils/formatter_app_stats.py +184 -0
- catocli/Utils/formatter_app_stats_timeseries.py +377 -0
- catocli/Utils/formatter_events_timeseries.py +459 -0
- catocli/Utils/formatter_socket_port_metrics.py +189 -0
- catocli/Utils/formatter_socket_port_metrics_timeseries.py +339 -0
- catocli/Utils/formatter_utils.py +251 -0
- catocli/__init__.py +1 -1
- catocli/clisettings.json +37 -5
- catocli/parsers/customParserApiClient.py +211 -66
- catocli/parsers/mutation_policy/__init__.py +405 -405
- catocli/parsers/mutation_site/__init__.py +15 -15
- catocli/parsers/mutation_sites/__init__.py +15 -15
- catocli/parsers/query_accountMetrics/README.md +90 -0
- catocli/parsers/query_accountMetrics/__init__.py +6 -0
- catocli/parsers/query_appStats/README.md +2 -2
- catocli/parsers/query_appStats/__init__.py +4 -2
- catocli/parsers/query_appStatsTimeSeries/__init__.py +4 -2
- catocli/parsers/query_eventsTimeSeries/README.md +280 -0
- catocli/parsers/query_eventsTimeSeries/__init__.py +6 -0
- catocli/parsers/query_policy/__init__.py +42 -42
- catocli/parsers/query_socketPortMetrics/README.md +44 -0
- catocli/parsers/query_socketPortMetrics/__init__.py +6 -0
- catocli/parsers/query_socketPortMetricsTimeSeries/README.md +83 -0
- catocli/parsers/query_socketPortMetricsTimeSeries/__init__.py +4 -2
- catocli/parsers/utils/export_utils.py +6 -2
- catocli-3.0.24.dist-info/METADATA +184 -0
- {catocli-3.0.18.dist-info → catocli-3.0.24.dist-info}/RECORD +37 -35
- {catocli-3.0.18.dist-info → catocli-3.0.24.dist-info}/top_level.txt +0 -1
- models/mutation.xdr.analystFeedback.json +822 -87
- models/query.xdr.stories.json +822 -87
- models/query.xdr.story.json +822 -87
- schema/catolib.py +89 -64
- catocli/Utils/csv_formatter.py +0 -663
- catocli-3.0.18.dist-info/METADATA +0 -124
- scripts/catolib.py +0 -62
- scripts/export_if_rules_to_json.py +0 -188
- scripts/export_wf_rules_to_json.py +0 -111
- scripts/import_wf_rules_to_tfstate.py +0 -331
- {catocli-3.0.18.dist-info → catocli-3.0.24.dist-info}/WHEEL +0 -0
- {catocli-3.0.18.dist-info → catocli-3.0.24.dist-info}/entry_points.txt +0 -0
- {catocli-3.0.18.dist-info → catocli-3.0.24.dist-info}/licenses/LICENSE +0 -0
|
@@ -114,21 +114,6 @@ def mutation_site_parse(mutation_subparsers):
|
|
|
114
114
|
mutation_site_addSocketSite_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
115
115
|
mutation_site_addSocketSite_parser.set_defaults(func=createRequest,operation_name='mutation.site.addSocketSite')
|
|
116
116
|
|
|
117
|
-
mutation_site_updateSiteGeneralDetails_parser = mutation_site_subparsers.add_parser('updateSiteGeneralDetails',
|
|
118
|
-
help='updateSiteGeneralDetails() site operation',
|
|
119
|
-
usage=get_help("mutation_site_updateSiteGeneralDetails"))
|
|
120
|
-
|
|
121
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
122
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
123
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
124
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
125
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
126
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
127
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
128
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
129
|
-
mutation_site_updateSiteGeneralDetails_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
130
|
-
mutation_site_updateSiteGeneralDetails_parser.set_defaults(func=createRequest,operation_name='mutation.site.updateSiteGeneralDetails')
|
|
131
|
-
|
|
132
117
|
mutation_site_removeSite_parser = mutation_site_subparsers.add_parser('removeSite',
|
|
133
118
|
help='removeSite() site operation',
|
|
134
119
|
usage=get_help("mutation_site_removeSite"))
|
|
@@ -519,6 +504,21 @@ def mutation_site_parse(mutation_subparsers):
|
|
|
519
504
|
mutation_site_removeSiteBwLicense_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
520
505
|
mutation_site_removeSiteBwLicense_parser.set_defaults(func=createRequest,operation_name='mutation.site.removeSiteBwLicense')
|
|
521
506
|
|
|
507
|
+
mutation_site_updateSiteGeneralDetails_parser = mutation_site_subparsers.add_parser('updateSiteGeneralDetails',
|
|
508
|
+
help='updateSiteGeneralDetails() site operation',
|
|
509
|
+
usage=get_help("mutation_site_updateSiteGeneralDetails"))
|
|
510
|
+
|
|
511
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
512
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
513
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
514
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
515
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
516
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
517
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
518
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
519
|
+
mutation_site_updateSiteGeneralDetails_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
520
|
+
mutation_site_updateSiteGeneralDetails_parser.set_defaults(func=createRequest,operation_name='mutation.site.updateSiteGeneralDetails')
|
|
521
|
+
|
|
522
522
|
mutation_site_addSocketAddOnCard_parser = mutation_site_subparsers.add_parser('addSocketAddOnCard',
|
|
523
523
|
help='addSocketAddOnCard() site operation',
|
|
524
524
|
usage=get_help("mutation_site_addSocketAddOnCard"))
|
|
@@ -114,21 +114,6 @@ def mutation_sites_parse(mutation_subparsers):
|
|
|
114
114
|
mutation_sites_addSocketSite_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
115
115
|
mutation_sites_addSocketSite_parser.set_defaults(func=createRequest,operation_name='mutation.sites.addSocketSite')
|
|
116
116
|
|
|
117
|
-
mutation_sites_updateSiteGeneralDetails_parser = mutation_sites_subparsers.add_parser('updateSiteGeneralDetails',
|
|
118
|
-
help='updateSiteGeneralDetails() sites operation',
|
|
119
|
-
usage=get_help("mutation_sites_updateSiteGeneralDetails"))
|
|
120
|
-
|
|
121
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
122
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
123
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
124
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
125
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
126
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
127
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
128
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
129
|
-
mutation_sites_updateSiteGeneralDetails_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
130
|
-
mutation_sites_updateSiteGeneralDetails_parser.set_defaults(func=createRequest,operation_name='mutation.sites.updateSiteGeneralDetails')
|
|
131
|
-
|
|
132
117
|
mutation_sites_removeSite_parser = mutation_sites_subparsers.add_parser('removeSite',
|
|
133
118
|
help='removeSite() sites operation',
|
|
134
119
|
usage=get_help("mutation_sites_removeSite"))
|
|
@@ -519,6 +504,21 @@ def mutation_sites_parse(mutation_subparsers):
|
|
|
519
504
|
mutation_sites_removeSiteBwLicense_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
520
505
|
mutation_sites_removeSiteBwLicense_parser.set_defaults(func=createRequest,operation_name='mutation.sites.removeSiteBwLicense')
|
|
521
506
|
|
|
507
|
+
mutation_sites_updateSiteGeneralDetails_parser = mutation_sites_subparsers.add_parser('updateSiteGeneralDetails',
|
|
508
|
+
help='updateSiteGeneralDetails() sites operation',
|
|
509
|
+
usage=get_help("mutation_sites_updateSiteGeneralDetails"))
|
|
510
|
+
|
|
511
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
512
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
513
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
514
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
515
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
516
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
517
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
518
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
519
|
+
mutation_sites_updateSiteGeneralDetails_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
520
|
+
mutation_sites_updateSiteGeneralDetails_parser.set_defaults(func=createRequest,operation_name='mutation.sites.updateSiteGeneralDetails')
|
|
521
|
+
|
|
522
522
|
mutation_sites_addSocketAddOnCard_parser = mutation_sites_subparsers.add_parser('addSocketAddOnCard',
|
|
523
523
|
help='addSocketAddOnCard() sites operation',
|
|
524
524
|
usage=get_help("mutation_sites_addSocketAddOnCard"))
|
|
@@ -38,6 +38,96 @@ catocli query accountMetrics '{
|
|
|
38
38
|
}'
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## Advanced Usage
|
|
42
|
+
### Additional Examples
|
|
43
|
+
- Example all values and lables
|
|
44
|
+
- Example all values and lables for a single account
|
|
45
|
+
- Example all values and lables for a single user
|
|
46
|
+
- Last hour no filters
|
|
47
|
+
|
|
48
|
+
# Example all values and lables
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Example all values and lables for a single account
|
|
52
|
+
catocli query accountMetrics '{
|
|
53
|
+
"buckets": 24,
|
|
54
|
+
"groupDevices": true,
|
|
55
|
+
"groupInterfaces": true,
|
|
56
|
+
"labels": [
|
|
57
|
+
"bytesDownstream",
|
|
58
|
+
"bytesDownstreamMax",
|
|
59
|
+
"bytesTotal",
|
|
60
|
+
"bytesUpstream",
|
|
61
|
+
"bytesUpstreamMax",
|
|
62
|
+
"health",
|
|
63
|
+
"jitterDownstream",
|
|
64
|
+
"jitterUpstream",
|
|
65
|
+
"lastMileLatency",
|
|
66
|
+
"lastMilePacketLoss",
|
|
67
|
+
"lostDownstream",
|
|
68
|
+
"lostDownstreamPcnt",
|
|
69
|
+
"lostUpstream",
|
|
70
|
+
"lostUpstreamPcnt",
|
|
71
|
+
"packetsDiscardedDownstream",
|
|
72
|
+
"packetsDiscardedDownstreamPcnt",
|
|
73
|
+
"packetsDiscardedUpstream",
|
|
74
|
+
"packetsDiscardedUpstreamPcnt",
|
|
75
|
+
"packetsDownstream",
|
|
76
|
+
"packetsUpstream",
|
|
77
|
+
"rtt",
|
|
78
|
+
"tunnelAge"
|
|
79
|
+
],
|
|
80
|
+
"perSecond": true,
|
|
81
|
+
"siteIDs": [
|
|
82
|
+
"132814"
|
|
83
|
+
],
|
|
84
|
+
"timeFrame": "last.P1D",
|
|
85
|
+
"toRate": true,
|
|
86
|
+
"useDefaultSizeBucket": true,
|
|
87
|
+
"withMissingData": true
|
|
88
|
+
}'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
# Example all values and lables for a single user
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Example all values and lables for a single user
|
|
95
|
+
catocli query accountMetrics '{
|
|
96
|
+
"buckets": 24,
|
|
97
|
+
"labels": [
|
|
98
|
+
"health",
|
|
99
|
+
"jitterDownstream",
|
|
100
|
+
"jitterUpstream",
|
|
101
|
+
"lastMileLatency",
|
|
102
|
+
"lastMilePacketLoss",
|
|
103
|
+
"lostDownstream",
|
|
104
|
+
"lostDownstreamPcnt",
|
|
105
|
+
"lostUpstream",
|
|
106
|
+
"lostUpstreamPcnt",
|
|
107
|
+
"packetsDiscardedDownstream",
|
|
108
|
+
"packetsDiscardedDownstreamPcnt",
|
|
109
|
+
"packetsDiscardedUpstream",
|
|
110
|
+
"packetsDiscardedUpstreamPcnt",
|
|
111
|
+
"packetsDownstream",
|
|
112
|
+
"packetsUpstream"
|
|
113
|
+
],
|
|
114
|
+
"timeFrame": "last.PT1H",
|
|
115
|
+
"userIDs": [
|
|
116
|
+
"0"
|
|
117
|
+
]
|
|
118
|
+
}'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
# Last hour no filters
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Last hour no filters
|
|
125
|
+
catocli query accountMetrics '{
|
|
126
|
+
"timeFrame":"last.PT1H"
|
|
127
|
+
}'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
|
|
41
131
|
|
|
42
132
|
#### TimeFrame Parameter Examples
|
|
43
133
|
|
|
@@ -16,4 +16,10 @@ def query_accountMetrics_parse(query_subparsers):
|
|
|
16
16
|
query_accountMetrics_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
17
17
|
query_accountMetrics_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
18
18
|
query_accountMetrics_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
query_accountMetrics_parser.add_argument('-f', '--format', choices=['json', 'csv'], help='Output format (default: formatted json, use -raw for original json)')
|
|
22
|
+
query_accountMetrics_parser.add_argument('-raw', '--raw', dest='raw_output', action='store_true', help='Return raw/original JSON format (bypasses default formatting)')
|
|
23
|
+
query_accountMetrics_parser.add_argument('--csv-filename', dest='csv_filename', help='Override CSV file name (default: accountmetrics.csv)')
|
|
24
|
+
query_accountMetrics_parser.add_argument('--append-timestamp', dest='append_timestamp', action='store_true', help='Append timestamp to the CSV file name')
|
|
19
25
|
query_accountMetrics_parser.set_defaults(func=createRequest,operation_name='query.accountMetrics')
|
|
@@ -74,7 +74,7 @@ catocli query appStats '{
|
|
|
74
74
|
# Query to export application_name, user_name and risk_score with traffic sum(upstream, downstream, trafffic) for last day
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
## Query to export application_name, user_name and risk_score with traffic sum(upstream, downstream, trafffic) for last day
|
|
77
|
+
## Query to export application_name, user_name and risk_score with traffic sum(upstream, downstream, trafffic) for last day exported to csv format
|
|
78
78
|
catocli query appStats '{
|
|
79
79
|
"appStatsFilter": [],
|
|
80
80
|
"appStatsSort": [],
|
|
@@ -104,7 +104,7 @@ catocli query appStats '{
|
|
|
104
104
|
}
|
|
105
105
|
],
|
|
106
106
|
"timeFrame": "last.P1D"
|
|
107
|
-
}' -f csv
|
|
107
|
+
}' -f csv --csv-filename app_user_account_metrics_report.csv
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
|
|
@@ -17,7 +17,9 @@ def query_appStats_parse(query_subparsers):
|
|
|
17
17
|
query_appStats_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
18
18
|
query_appStats_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
query_appStats_parser.add_argument('
|
|
20
|
+
|
|
21
|
+
query_appStats_parser.add_argument('-f', '--format', choices=['json', 'csv'], help='Output format (default: formatted json, use -raw for original json)')
|
|
22
|
+
query_appStats_parser.add_argument('-raw', '--raw', dest='raw_output', action='store_true', help='Return raw/original JSON format (bypasses default formatting)')
|
|
23
|
+
query_appStats_parser.add_argument('--csv-filename', dest='csv_filename', help='Override CSV file name (default: appstats.csv)')
|
|
22
24
|
query_appStats_parser.add_argument('--append-timestamp', dest='append_timestamp', action='store_true', help='Append timestamp to the CSV file name')
|
|
23
25
|
query_appStats_parser.set_defaults(func=createRequest,operation_name='query.appStats')
|
|
@@ -17,7 +17,9 @@ def query_appStatsTimeSeries_parse(query_subparsers):
|
|
|
17
17
|
query_appStatsTimeSeries_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
18
18
|
query_appStatsTimeSeries_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
query_appStatsTimeSeries_parser.add_argument('
|
|
20
|
+
|
|
21
|
+
query_appStatsTimeSeries_parser.add_argument('-f', '--format', choices=['json', 'csv'], help='Output format (default: formatted json, use -raw for original json)')
|
|
22
|
+
query_appStatsTimeSeries_parser.add_argument('-raw', '--raw', dest='raw_output', action='store_true', help='Return raw/original JSON format (bypasses default formatting)')
|
|
23
|
+
query_appStatsTimeSeries_parser.add_argument('--csv-filename', dest='csv_filename', help='Override CSV file name (default: appstatstimeseries.csv)')
|
|
22
24
|
query_appStatsTimeSeries_parser.add_argument('--append-timestamp', dest='append_timestamp', action='store_true', help='Append timestamp to the CSV file name')
|
|
23
25
|
query_appStatsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.appStatsTimeSeries')
|
|
@@ -38,6 +38,286 @@ catocli query eventsTimeSeries '{
|
|
|
38
38
|
}'
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## Advanced Usage
|
|
42
|
+
### Additional Examples
|
|
43
|
+
- Weekly break down by hour of Internet Firewall events by rule_name
|
|
44
|
+
- Weekly hourly breakdown by hour of sum of site events
|
|
45
|
+
- 1 hour in 5 min increments of sum of site events used for detecting throttling
|
|
46
|
+
- Basic Event Count Query with enhanced formatting
|
|
47
|
+
- Basic Event Count Query - Returns formatted JSON with granularity-adjusted values
|
|
48
|
+
- Security Events Analysis
|
|
49
|
+
- Security Events Analysis - Daily breakdown of security events
|
|
50
|
+
- Connectivity Events by Country
|
|
51
|
+
- Connectivity Events by Country - Weekly breakdown with country dimensions
|
|
52
|
+
- Threat Analysis with Trend
|
|
53
|
+
- Threat Analysis with Trend - Monthly threat score analysis
|
|
54
|
+
- Socket Connectivity Analysis
|
|
55
|
+
- Socket Connectivity Analysis - Connection events by socket interface
|
|
56
|
+
|
|
57
|
+
# Weekly break down by hour of Internet Firewall events by rule_name
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Weekly break down by hour of Internet Firewall events by rule_name
|
|
61
|
+
catocli query eventsTimeSeries '{
|
|
62
|
+
"buckets": 168,
|
|
63
|
+
"eventsDimension": [
|
|
64
|
+
{
|
|
65
|
+
"fieldName": "rule_name"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"eventsFilter": [
|
|
69
|
+
{
|
|
70
|
+
"fieldName": "event_sub_type",
|
|
71
|
+
"operator": "is",
|
|
72
|
+
"values": [
|
|
73
|
+
"Internet Firewall"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"eventsMeasure": [
|
|
78
|
+
{
|
|
79
|
+
"aggType": "sum",
|
|
80
|
+
"fieldName": "event_count"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"timeFrame": "last.P7D"
|
|
84
|
+
}'
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
# Weekly hourly breakdown by hour of sum of site events
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Weekly hourly breakdown by hour of sum of site events
|
|
91
|
+
catocli query eventsTimeSeries -accountID=15412 '{
|
|
92
|
+
"buckets": 168,
|
|
93
|
+
"eventsDimension": [],
|
|
94
|
+
"eventsFilter": [
|
|
95
|
+
{
|
|
96
|
+
"fieldName": "src_is_site_or_vpn",
|
|
97
|
+
"operator": "is",
|
|
98
|
+
"values": [
|
|
99
|
+
"Site"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"eventsMeasure": [
|
|
104
|
+
{
|
|
105
|
+
"aggType": "sum",
|
|
106
|
+
"fieldName": "event_count"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"timeFrame": "last.P7D"
|
|
110
|
+
}'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# 1 hour in 5 min increments of sum of site events used for detecting throttling
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# 1 hour in 5 min increments of sum of site events used for detecting throttling
|
|
118
|
+
catocli query eventsTimeSeries -accountID=15412 '{
|
|
119
|
+
"buckets": 12,
|
|
120
|
+
"eventsDimension": [],
|
|
121
|
+
"eventsFilter": [
|
|
122
|
+
{
|
|
123
|
+
"fieldName": "src_is_site_or_vpn",
|
|
124
|
+
"operator": "is",
|
|
125
|
+
"values": [
|
|
126
|
+
"Site"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"eventsMeasure": [
|
|
131
|
+
{
|
|
132
|
+
"aggType": "sum",
|
|
133
|
+
"fieldName": "event_count"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"timeFrame": "last.P1D"
|
|
137
|
+
}'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# Basic Event Count Query with enhanced formatting
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Basic Event Count Query - Returns formatted JSON with granularity-adjusted values
|
|
147
|
+
catocli query eventsTimeSeries '{
|
|
148
|
+
"buckets": 4,
|
|
149
|
+
"eventsDimension": [],
|
|
150
|
+
"eventsFilter": [],
|
|
151
|
+
"eventsMeasure": [
|
|
152
|
+
{
|
|
153
|
+
"aggType": "sum",
|
|
154
|
+
"fieldName": "event_count"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"timeFrame": "utc.2023-02-{28/00:00:00--28/23:59:59}"
|
|
158
|
+
}'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
# Security Events Analysis
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Security Events Analysis - Daily breakdown of security events
|
|
165
|
+
catocli query eventsTimeSeries '{
|
|
166
|
+
"buckets": 24,
|
|
167
|
+
"eventsDimension": [],
|
|
168
|
+
"eventsFilter": [
|
|
169
|
+
{
|
|
170
|
+
"fieldName": "event_type",
|
|
171
|
+
"operator": "is",
|
|
172
|
+
"values": ["Security"]
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"eventsMeasure": [
|
|
176
|
+
{
|
|
177
|
+
"aggType": "sum",
|
|
178
|
+
"fieldName": "event_count"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"timeFrame": "utc.2023-02-{28/00:00:00--28/23:59:59}"
|
|
182
|
+
}'
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
# Connectivity Events by Country
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Connectivity Events by Country - Weekly breakdown with country dimensions
|
|
189
|
+
catocli query eventsTimeSeries '{
|
|
190
|
+
"buckets": 7,
|
|
191
|
+
"eventsDimension": [
|
|
192
|
+
{
|
|
193
|
+
"fieldName": "src_country"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"eventsFilter": [
|
|
197
|
+
{
|
|
198
|
+
"fieldName": "event_type",
|
|
199
|
+
"operator": "is",
|
|
200
|
+
"values": ["Connectivity"]
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"eventsMeasure": [
|
|
204
|
+
{
|
|
205
|
+
"aggType": "sum",
|
|
206
|
+
"fieldName": "event_count"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"timeFrame": "utc.2023-03-{01/00:00:00--07/23:59:59}"
|
|
210
|
+
}'
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
# Threat Analysis with Trend
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Threat Analysis with Trend - Monthly threat score analysis
|
|
217
|
+
catocli query eventsTimeSeries '{
|
|
218
|
+
"buckets": 31,
|
|
219
|
+
"eventsDimension": [],
|
|
220
|
+
"eventsFilter": [
|
|
221
|
+
{
|
|
222
|
+
"fieldName": "event_type",
|
|
223
|
+
"operator": "is",
|
|
224
|
+
"values": ["Security"]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"fieldName": "threat_score",
|
|
228
|
+
"operator": "gt",
|
|
229
|
+
"values": ["50"]
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"eventsMeasure": [
|
|
233
|
+
{
|
|
234
|
+
"aggType": "avg",
|
|
235
|
+
"fieldName": "threat_score"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"timeFrame": "utc.2023-01-{01/00:00:00--31/23:59:59}"
|
|
239
|
+
}'
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
# Socket Connectivity Analysis
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Socket Connectivity Analysis - Connection events by socket interface
|
|
246
|
+
catocli query eventsTimeSeries '{
|
|
247
|
+
"buckets": 28,
|
|
248
|
+
"eventsDimension": [
|
|
249
|
+
{
|
|
250
|
+
"fieldName": "socket_interface"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"eventsFilter": [
|
|
254
|
+
{
|
|
255
|
+
"fieldName": "event_type",
|
|
256
|
+
"operator": "is",
|
|
257
|
+
"values": ["Connectivity"]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"fieldName": "event_sub_type",
|
|
261
|
+
"operator": "in",
|
|
262
|
+
"values": ["Connected", "Disconnected"]
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"eventsMeasure": [
|
|
266
|
+
{
|
|
267
|
+
"aggType": "sum",
|
|
268
|
+
"fieldName": "event_count"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"timeFrame": "utc.2023-02-{01/00:00:00--28/23:59:59}"
|
|
272
|
+
}'
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Output Format Options
|
|
276
|
+
|
|
277
|
+
The eventsTimeSeries query supports multiple output formats:
|
|
278
|
+
|
|
279
|
+
### Enhanced JSON Format (default)
|
|
280
|
+
Returns formatted JSON with granularity multiplication applied to sum aggregations when appropriate:
|
|
281
|
+
```bash
|
|
282
|
+
catocli query eventsTimeSeries '{...}'
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Raw JSON Format
|
|
286
|
+
Returns the original API response without formatting:
|
|
287
|
+
```bash
|
|
288
|
+
catocli query eventsTimeSeries '{...}' -raw
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### CSV Format
|
|
292
|
+
Exports data to CSV file with granularity-adjusted values:
|
|
293
|
+
```bash
|
|
294
|
+
catocli query eventsTimeSeries '{...}' -f csv
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Custom CSV filename with timestamp
|
|
298
|
+
```bash
|
|
299
|
+
catocli query eventsTimeSeries '{...}' -f csv --csv-filename "my_events" --append-timestamp
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Granularity Multiplication
|
|
303
|
+
|
|
304
|
+
When using sum aggregations on count fields like `event_count`, the formatter automatically multiplies fractional values by the granularity period to provide meaningful totals. This is especially useful for time-series data where the API returns normalized values that need to be scaled to the actual time period.
|
|
305
|
+
|
|
306
|
+
**Example:**
|
|
307
|
+
- Original API value: 0.096 events per period
|
|
308
|
+
- Granularity: 3600 seconds (1 hour)
|
|
309
|
+
- Computed value: 0.096 × 3600 = 345.6 total events
|
|
310
|
+
|
|
311
|
+
Use the `-raw` flag to see the original unprocessed values if needed.
|
|
312
|
+
|
|
313
|
+
## Additional Resources
|
|
314
|
+
|
|
315
|
+
- [Cato API Documentation](https://api.catonetworks.com/documentation/#query-eventsTimeSeries)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
41
321
|
|
|
42
322
|
#### TimeFrame Parameter Examples
|
|
43
323
|
|
|
@@ -16,4 +16,10 @@ def query_eventsTimeSeries_parse(query_subparsers):
|
|
|
16
16
|
query_eventsTimeSeries_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
17
17
|
query_eventsTimeSeries_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
18
18
|
query_eventsTimeSeries_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
query_eventsTimeSeries_parser.add_argument('-f', '--format', choices=['json', 'csv'], help='Output format (default: formatted json, use -raw for original json)')
|
|
22
|
+
query_eventsTimeSeries_parser.add_argument('-raw', '--raw', dest='raw_output', action='store_true', help='Return raw/original JSON format (bypasses default formatting)')
|
|
23
|
+
query_eventsTimeSeries_parser.add_argument('--csv-filename', dest='csv_filename', help='Override CSV file name (default: eventstimeseries.csv)')
|
|
24
|
+
query_eventsTimeSeries_parser.add_argument('--append-timestamp', dest='append_timestamp', action='store_true', help='Append timestamp to the CSV file name')
|
|
19
25
|
query_eventsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.eventsTimeSeries')
|
|
@@ -30,27 +30,6 @@ def query_policy_parse(query_subparsers):
|
|
|
30
30
|
query_policy_antiMalwareFileHash_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
31
31
|
query_policy_antiMalwareFileHash_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.antiMalwareFileHash.policy')
|
|
32
32
|
|
|
33
|
-
query_policy_dynamicIpAllocation_parser = query_policy_subparsers.add_parser('dynamicIpAllocation',
|
|
34
|
-
help='dynamicIpAllocation() policy operation',
|
|
35
|
-
usage=get_help("query_policy_dynamicIpAllocation"))
|
|
36
|
-
|
|
37
|
-
query_policy_dynamicIpAllocation_subparsers = query_policy_dynamicIpAllocation_parser.add_subparsers()
|
|
38
|
-
|
|
39
|
-
query_policy_dynamicIpAllocation_policy_parser = query_policy_dynamicIpAllocation_subparsers.add_parser('policy',
|
|
40
|
-
help='policy() dynamicIpAllocation operation',
|
|
41
|
-
usage=get_help("query_policy_dynamicIpAllocation_policy"))
|
|
42
|
-
|
|
43
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
44
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
45
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
46
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
47
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
48
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
49
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
50
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
51
|
-
query_policy_dynamicIpAllocation_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
52
|
-
query_policy_dynamicIpAllocation_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.dynamicIpAllocation.policy')
|
|
53
|
-
|
|
54
33
|
query_policy_socketLan_parser = query_policy_subparsers.add_parser('socketLan',
|
|
55
34
|
help='socketLan() policy operation',
|
|
56
35
|
usage=get_help("query_policy_socketLan"))
|
|
@@ -72,27 +51,6 @@ def query_policy_parse(query_subparsers):
|
|
|
72
51
|
query_policy_socketLan_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
73
52
|
query_policy_socketLan_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.socketLan.policy')
|
|
74
53
|
|
|
75
|
-
query_policy_terminalServer_parser = query_policy_subparsers.add_parser('terminalServer',
|
|
76
|
-
help='terminalServer() policy operation',
|
|
77
|
-
usage=get_help("query_policy_terminalServer"))
|
|
78
|
-
|
|
79
|
-
query_policy_terminalServer_subparsers = query_policy_terminalServer_parser.add_subparsers()
|
|
80
|
-
|
|
81
|
-
query_policy_terminalServer_policy_parser = query_policy_terminalServer_subparsers.add_parser('policy',
|
|
82
|
-
help='policy() terminalServer operation',
|
|
83
|
-
usage=get_help("query_policy_terminalServer_policy"))
|
|
84
|
-
|
|
85
|
-
query_policy_terminalServer_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
86
|
-
query_policy_terminalServer_policy_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
87
|
-
query_policy_terminalServer_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
88
|
-
query_policy_terminalServer_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
89
|
-
query_policy_terminalServer_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
90
|
-
query_policy_terminalServer_policy_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
91
|
-
query_policy_terminalServer_policy_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
92
|
-
query_policy_terminalServer_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
93
|
-
query_policy_terminalServer_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
94
|
-
query_policy_terminalServer_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.terminalServer.policy')
|
|
95
|
-
|
|
96
54
|
query_policy_wanNetwork_parser = query_policy_subparsers.add_parser('wanNetwork',
|
|
97
55
|
help='wanNetwork() policy operation',
|
|
98
56
|
usage=get_help("query_policy_wanNetwork"))
|
|
@@ -239,3 +197,45 @@ def query_policy_parse(query_subparsers):
|
|
|
239
197
|
query_policy_tlsInspect_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
240
198
|
query_policy_tlsInspect_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
241
199
|
query_policy_tlsInspect_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.tlsInspect.policy')
|
|
200
|
+
|
|
201
|
+
query_policy_dynamicIpAllocation_parser = query_policy_subparsers.add_parser('dynamicIpAllocation',
|
|
202
|
+
help='dynamicIpAllocation() policy operation',
|
|
203
|
+
usage=get_help("query_policy_dynamicIpAllocation"))
|
|
204
|
+
|
|
205
|
+
query_policy_dynamicIpAllocation_subparsers = query_policy_dynamicIpAllocation_parser.add_subparsers()
|
|
206
|
+
|
|
207
|
+
query_policy_dynamicIpAllocation_policy_parser = query_policy_dynamicIpAllocation_subparsers.add_parser('policy',
|
|
208
|
+
help='policy() dynamicIpAllocation operation',
|
|
209
|
+
usage=get_help("query_policy_dynamicIpAllocation_policy"))
|
|
210
|
+
|
|
211
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
212
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
213
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
214
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
215
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
216
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
217
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
218
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
219
|
+
query_policy_dynamicIpAllocation_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
220
|
+
query_policy_dynamicIpAllocation_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.dynamicIpAllocation.policy')
|
|
221
|
+
|
|
222
|
+
query_policy_terminalServer_parser = query_policy_subparsers.add_parser('terminalServer',
|
|
223
|
+
help='terminalServer() policy operation',
|
|
224
|
+
usage=get_help("query_policy_terminalServer"))
|
|
225
|
+
|
|
226
|
+
query_policy_terminalServer_subparsers = query_policy_terminalServer_parser.add_subparsers()
|
|
227
|
+
|
|
228
|
+
query_policy_terminalServer_policy_parser = query_policy_terminalServer_subparsers.add_parser('policy',
|
|
229
|
+
help='policy() terminalServer operation',
|
|
230
|
+
usage=get_help("query_policy_terminalServer_policy"))
|
|
231
|
+
|
|
232
|
+
query_policy_terminalServer_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
233
|
+
query_policy_terminalServer_policy_parser.add_argument('-accountID', help='The cato account ID to use for this operation. Overrides the account_id value in the profile setting. This is use for reseller and MSP accounts to run queries against cato sub accounts from the parent account.')
|
|
234
|
+
query_policy_terminalServer_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
235
|
+
query_policy_terminalServer_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
236
|
+
query_policy_terminalServer_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
237
|
+
query_policy_terminalServer_policy_parser.add_argument('-n', '--stream-events', dest='stream_events', help='Send events over network to host:port TCP')
|
|
238
|
+
query_policy_terminalServer_policy_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
239
|
+
query_policy_terminalServer_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
240
|
+
query_policy_terminalServer_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
241
|
+
query_policy_terminalServer_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.terminalServer.policy')
|