catocli 3.0.18__py3-none-any.whl → 3.0.22__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 +206 -65
- 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-3.0.18.dist-info → catocli-3.0.22.dist-info}/METADATA +1 -1
- {catocli-3.0.18.dist-info → catocli-3.0.22.dist-info}/RECORD +179 -177
- {catocli-3.0.18.dist-info → catocli-3.0.22.dist-info}/top_level.txt +0 -1
- models/mutation.policy.antiMalwareFileHash.addRule.json +20 -0
- models/mutation.policy.antiMalwareFileHash.addSection.json +103 -0
- models/mutation.policy.antiMalwareFileHash.createPolicyRevision.json +123 -0
- models/mutation.policy.antiMalwareFileHash.discardPolicyRevision.json +123 -0
- models/mutation.policy.antiMalwareFileHash.moveRule.json +20 -0
- models/mutation.policy.antiMalwareFileHash.moveSection.json +103 -0
- models/mutation.policy.antiMalwareFileHash.publishPolicyRevision.json +123 -0
- models/mutation.policy.antiMalwareFileHash.removeRule.json +20 -0
- models/mutation.policy.antiMalwareFileHash.removeSection.json +103 -0
- models/mutation.policy.antiMalwareFileHash.updatePolicy.json +123 -0
- models/mutation.policy.antiMalwareFileHash.updateRule.json +20 -0
- models/mutation.policy.antiMalwareFileHash.updateSection.json +103 -0
- models/mutation.policy.appTenantRestriction.addRule.json +20 -0
- models/mutation.policy.appTenantRestriction.addSection.json +103 -0
- models/mutation.policy.appTenantRestriction.createPolicyRevision.json +123 -0
- models/mutation.policy.appTenantRestriction.discardPolicyRevision.json +123 -0
- models/mutation.policy.appTenantRestriction.moveRule.json +20 -0
- models/mutation.policy.appTenantRestriction.moveSection.json +103 -0
- models/mutation.policy.appTenantRestriction.publishPolicyRevision.json +123 -0
- models/mutation.policy.appTenantRestriction.removeRule.json +20 -0
- models/mutation.policy.appTenantRestriction.removeSection.json +103 -0
- models/mutation.policy.appTenantRestriction.updatePolicy.json +123 -0
- models/mutation.policy.appTenantRestriction.updateRule.json +20 -0
- models/mutation.policy.appTenantRestriction.updateSection.json +103 -0
- models/mutation.policy.applicationControl.addRule.json +20 -0
- models/mutation.policy.applicationControl.addSection.json +103 -0
- models/mutation.policy.applicationControl.createPolicyRevision.json +123 -0
- models/mutation.policy.applicationControl.discardPolicyRevision.json +123 -0
- models/mutation.policy.applicationControl.moveRule.json +20 -0
- models/mutation.policy.applicationControl.moveSection.json +103 -0
- models/mutation.policy.applicationControl.publishPolicyRevision.json +123 -0
- models/mutation.policy.applicationControl.removeRule.json +20 -0
- models/mutation.policy.applicationControl.removeSection.json +103 -0
- models/mutation.policy.applicationControl.updatePolicy.json +123 -0
- models/mutation.policy.applicationControl.updateRule.json +20 -0
- models/mutation.policy.applicationControl.updateSection.json +103 -0
- models/mutation.policy.dynamicIpAllocation.addRule.json +20 -0
- models/mutation.policy.dynamicIpAllocation.addSection.json +103 -0
- models/mutation.policy.dynamicIpAllocation.createPolicyRevision.json +123 -0
- models/mutation.policy.dynamicIpAllocation.discardPolicyRevision.json +123 -0
- models/mutation.policy.dynamicIpAllocation.moveRule.json +20 -0
- models/mutation.policy.dynamicIpAllocation.moveSection.json +103 -0
- models/mutation.policy.dynamicIpAllocation.publishPolicyRevision.json +123 -0
- models/mutation.policy.dynamicIpAllocation.removeRule.json +20 -0
- models/mutation.policy.dynamicIpAllocation.removeSection.json +103 -0
- models/mutation.policy.dynamicIpAllocation.updatePolicy.json +123 -0
- models/mutation.policy.dynamicIpAllocation.updateRule.json +20 -0
- models/mutation.policy.dynamicIpAllocation.updateSection.json +103 -0
- models/mutation.policy.internetFirewall.addRule.json +20 -0
- models/mutation.policy.internetFirewall.addSection.json +103 -0
- models/mutation.policy.internetFirewall.createPolicyRevision.json +123 -0
- models/mutation.policy.internetFirewall.discardPolicyRevision.json +123 -0
- models/mutation.policy.internetFirewall.moveRule.json +20 -0
- models/mutation.policy.internetFirewall.moveSection.json +103 -0
- models/mutation.policy.internetFirewall.publishPolicyRevision.json +123 -0
- models/mutation.policy.internetFirewall.removeRule.json +20 -0
- models/mutation.policy.internetFirewall.removeSection.json +103 -0
- models/mutation.policy.internetFirewall.updatePolicy.json +123 -0
- models/mutation.policy.internetFirewall.updateRule.json +20 -0
- models/mutation.policy.internetFirewall.updateSection.json +103 -0
- models/mutation.policy.remotePortFwd.addRule.json +20 -0
- models/mutation.policy.remotePortFwd.addSection.json +103 -0
- models/mutation.policy.remotePortFwd.createPolicyRevision.json +123 -0
- models/mutation.policy.remotePortFwd.discardPolicyRevision.json +123 -0
- models/mutation.policy.remotePortFwd.moveRule.json +20 -0
- models/mutation.policy.remotePortFwd.moveSection.json +103 -0
- models/mutation.policy.remotePortFwd.publishPolicyRevision.json +123 -0
- models/mutation.policy.remotePortFwd.removeRule.json +20 -0
- models/mutation.policy.remotePortFwd.removeSection.json +103 -0
- models/mutation.policy.remotePortFwd.updatePolicy.json +123 -0
- models/mutation.policy.remotePortFwd.updateRule.json +20 -0
- models/mutation.policy.remotePortFwd.updateSection.json +103 -0
- models/mutation.policy.socketLan.addRule.json +40 -0
- models/mutation.policy.socketLan.addSection.json +103 -0
- models/mutation.policy.socketLan.createPolicyRevision.json +143 -0
- models/mutation.policy.socketLan.discardPolicyRevision.json +143 -0
- models/mutation.policy.socketLan.moveRule.json +40 -0
- models/mutation.policy.socketLan.moveSection.json +103 -0
- models/mutation.policy.socketLan.publishPolicyRevision.json +143 -0
- models/mutation.policy.socketLan.removeRule.json +40 -0
- models/mutation.policy.socketLan.removeSection.json +103 -0
- models/mutation.policy.socketLan.updatePolicy.json +143 -0
- models/mutation.policy.socketLan.updateRule.json +40 -0
- models/mutation.policy.socketLan.updateSection.json +103 -0
- models/mutation.policy.terminalServer.addRule.json +20 -0
- models/mutation.policy.terminalServer.addSection.json +103 -0
- models/mutation.policy.terminalServer.createPolicyRevision.json +123 -0
- models/mutation.policy.terminalServer.discardPolicyRevision.json +123 -0
- models/mutation.policy.terminalServer.moveRule.json +20 -0
- models/mutation.policy.terminalServer.moveSection.json +103 -0
- models/mutation.policy.terminalServer.publishPolicyRevision.json +123 -0
- models/mutation.policy.terminalServer.removeRule.json +20 -0
- models/mutation.policy.terminalServer.removeSection.json +103 -0
- models/mutation.policy.terminalServer.updatePolicy.json +123 -0
- models/mutation.policy.terminalServer.updateRule.json +20 -0
- models/mutation.policy.terminalServer.updateSection.json +103 -0
- models/mutation.policy.tlsInspect.addRule.json +20 -0
- models/mutation.policy.tlsInspect.addSection.json +103 -0
- models/mutation.policy.tlsInspect.createPolicyRevision.json +123 -0
- models/mutation.policy.tlsInspect.discardPolicyRevision.json +123 -0
- models/mutation.policy.tlsInspect.moveRule.json +20 -0
- models/mutation.policy.tlsInspect.moveSection.json +103 -0
- models/mutation.policy.tlsInspect.publishPolicyRevision.json +123 -0
- models/mutation.policy.tlsInspect.removeRule.json +20 -0
- models/mutation.policy.tlsInspect.removeSection.json +103 -0
- models/mutation.policy.tlsInspect.updatePolicy.json +123 -0
- models/mutation.policy.tlsInspect.updateRule.json +20 -0
- models/mutation.policy.tlsInspect.updateSection.json +103 -0
- models/mutation.policy.wanFirewall.addRule.json +20 -0
- models/mutation.policy.wanFirewall.addSection.json +103 -0
- models/mutation.policy.wanFirewall.createPolicyRevision.json +123 -0
- models/mutation.policy.wanFirewall.discardPolicyRevision.json +123 -0
- models/mutation.policy.wanFirewall.moveRule.json +20 -0
- models/mutation.policy.wanFirewall.moveSection.json +103 -0
- models/mutation.policy.wanFirewall.publishPolicyRevision.json +123 -0
- models/mutation.policy.wanFirewall.removeRule.json +20 -0
- models/mutation.policy.wanFirewall.removeSection.json +103 -0
- models/mutation.policy.wanFirewall.updatePolicy.json +123 -0
- models/mutation.policy.wanFirewall.updateRule.json +20 -0
- models/mutation.policy.wanFirewall.updateSection.json +103 -0
- models/mutation.policy.wanNetwork.addRule.json +20 -0
- models/mutation.policy.wanNetwork.addSection.json +103 -0
- models/mutation.policy.wanNetwork.createPolicyRevision.json +123 -0
- models/mutation.policy.wanNetwork.discardPolicyRevision.json +123 -0
- models/mutation.policy.wanNetwork.moveRule.json +20 -0
- models/mutation.policy.wanNetwork.moveSection.json +103 -0
- models/mutation.policy.wanNetwork.publishPolicyRevision.json +123 -0
- models/mutation.policy.wanNetwork.removeRule.json +20 -0
- models/mutation.policy.wanNetwork.removeSection.json +103 -0
- models/mutation.policy.wanNetwork.updatePolicy.json +123 -0
- models/mutation.policy.wanNetwork.updateRule.json +20 -0
- models/mutation.policy.wanNetwork.updateSection.json +103 -0
- models/mutation.xdr.analystFeedback.json +822 -87
- models/query.policy.antiMalwareFileHash.policy.json +123 -0
- models/query.policy.appTenantRestriction.policy.json +123 -0
- models/query.policy.applicationControl.policy.json +123 -0
- models/query.policy.dynamicIpAllocation.policy.json +123 -0
- models/query.policy.internetFirewall.policy.json +123 -0
- models/query.policy.remotePortFwd.policy.json +123 -0
- models/query.policy.socketLan.policy.json +143 -0
- models/query.policy.terminalServer.policy.json +123 -0
- models/query.policy.tlsInspect.policy.json +123 -0
- models/query.policy.wanFirewall.policy.json +123 -0
- models/query.policy.wanNetwork.policy.json +123 -0
- models/query.xdr.stories.json +822 -87
- models/query.xdr.story.json +822 -87
- schema/catolib.py +25 -8
- catocli/Utils/csv_formatter.py +0 -663
- 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.22.dist-info}/WHEEL +0 -0
- {catocli-3.0.18.dist-info → catocli-3.0.22.dist-info}/entry_points.txt +0 -0
- {catocli-3.0.18.dist-info → catocli-3.0.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -40,6 +40,50 @@ catocli query socketPortMetrics '{
|
|
|
40
40
|
}'
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
## Advanced Usage
|
|
44
|
+
### Additional Examples
|
|
45
|
+
- 1 Day sum of traffic by site, socket_interface, device_id
|
|
46
|
+
|
|
47
|
+
# 1 Day sum of traffic by site, socket_interface, device_id
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# 1 Day sum of traffic by site, socket_interface, device_id
|
|
51
|
+
catocli query socketPortMetrics '{
|
|
52
|
+
"socketPortMetricsDimension": [
|
|
53
|
+
{
|
|
54
|
+
"fieldName": "socket_interface"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"fieldName": "device_id"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"fieldName": "site_id"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"fieldName": "site_name"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"socketPortMetricsFilter": [],
|
|
67
|
+
"socketPortMetricsMeasure": [
|
|
68
|
+
{
|
|
69
|
+
"aggType": "sum",
|
|
70
|
+
"fieldName": "bytes_upstream"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"aggType": "sum",
|
|
74
|
+
"fieldName": "bytes_downstream"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"aggType": "sum",
|
|
78
|
+
"fieldName": "bytes_total"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"socketPortMetricsSort": [],
|
|
82
|
+
"timeFrame": "last.P1D"
|
|
83
|
+
}'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
|
|
43
87
|
|
|
44
88
|
#### TimeFrame Parameter Examples
|
|
45
89
|
|
|
@@ -16,4 +16,10 @@ def query_socketPortMetrics_parse(query_subparsers):
|
|
|
16
16
|
query_socketPortMetrics_parser.add_argument('-z', '--sentinel', dest='sentinel', help='Send events to Sentinel customerid:sharedkey')
|
|
17
17
|
query_socketPortMetrics_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_socketPortMetrics_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_socketPortMetrics_parser.add_argument('-f', '--format', choices=['json', 'csv'], help='Output format (default: formatted json, use -raw for original json)')
|
|
22
|
+
query_socketPortMetrics_parser.add_argument('-raw', '--raw', dest='raw_output', action='store_true', help='Return raw/original JSON format (bypasses default formatting)')
|
|
23
|
+
query_socketPortMetrics_parser.add_argument('--csv-filename', dest='csv_filename', help='Override CSV file name (default: socketportmetrics.csv)')
|
|
24
|
+
query_socketPortMetrics_parser.add_argument('--append-timestamp', dest='append_timestamp', action='store_true', help='Append timestamp to the CSV file name')
|
|
19
25
|
query_socketPortMetrics_parser.set_defaults(func=createRequest,operation_name='query.socketPortMetrics')
|
|
@@ -38,6 +38,89 @@ catocli query socketPortMetricsTimeSeries '{
|
|
|
38
38
|
}'
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## Advanced Usage
|
|
42
|
+
### Additional Examples
|
|
43
|
+
- 1 Day sum of traffic by site, socket_interface, device_id
|
|
44
|
+
- 1 Day sum of traffic by site, socket_interface, device_id as csv
|
|
45
|
+
|
|
46
|
+
# 1 Day sum of traffic by site, socket_interface, device_id
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 1 Day sum of traffic by site, socket_interface, device_id as csv
|
|
50
|
+
catocli query socketPortMetricsTimeSeries
|
|
51
|
+
"buckets": 24,
|
|
52
|
+
"socketPortMetricsDimension": [
|
|
53
|
+
{
|
|
54
|
+
"fieldName": "socket_interface"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"fieldName": "device_id"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"fieldName": "site_id"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"fieldName": "site_name"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"socketPortMetricsFilter": [],
|
|
67
|
+
"socketPortMetricsMeasure": [
|
|
68
|
+
{
|
|
69
|
+
"aggType": "sum",
|
|
70
|
+
"fieldName": "bytes_downstream"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"aggType": "sum",
|
|
74
|
+
"fieldName": "bytes_upstream"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"aggType": "sum",
|
|
78
|
+
"fieldName": "bytes_total"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"timeFrame": "last.P1D"
|
|
82
|
+
}' -f csv
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
# 1 Day sum of traffic by site, socket_interface, device_id
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1 Day sum of traffic by site, socket_interface, device_id
|
|
89
|
+
catocli query socketPortMetricsTimeSeries '{
|
|
90
|
+
"buckets": 120,
|
|
91
|
+
"socketPortMetricsDimension": [
|
|
92
|
+
{
|
|
93
|
+
"fieldName": "socket_interface"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"fieldName": "device_id"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"fieldName": "site_id"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"fieldName": "site_name"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"socketPortMetricsFilter": [],
|
|
106
|
+
"socketPortMetricsMeasure": [
|
|
107
|
+
{
|
|
108
|
+
"aggType": "sum",
|
|
109
|
+
"fieldName": "throughput_downstream"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"aggType": "sum",
|
|
113
|
+
"fieldName": "throughput_upstream"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"timeFrame": "last.P2M"
|
|
117
|
+
}'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
41
124
|
|
|
42
125
|
#### TimeFrame Parameter Examples
|
|
43
126
|
|
|
@@ -17,7 +17,9 @@ def query_socketPortMetricsTimeSeries_parse(query_subparsers):
|
|
|
17
17
|
query_socketPortMetricsTimeSeries_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_socketPortMetricsTimeSeries_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_socketPortMetricsTimeSeries_parser.add_argument('
|
|
20
|
+
|
|
21
|
+
query_socketPortMetricsTimeSeries_parser.add_argument('-f', '--format', choices=['json', 'csv'], help='Output format (default: formatted json, use -raw for original json)')
|
|
22
|
+
query_socketPortMetricsTimeSeries_parser.add_argument('-raw', '--raw', dest='raw_output', action='store_true', help='Return raw/original JSON format (bypasses default formatting)')
|
|
23
|
+
query_socketPortMetricsTimeSeries_parser.add_argument('--csv-filename', dest='csv_filename', help='Override CSV file name (default: socketportmetricstimeseries.csv)')
|
|
22
24
|
query_socketPortMetricsTimeSeries_parser.add_argument('--append-timestamp', dest='append_timestamp', action='store_true', help='Append timestamp to the CSV file name')
|
|
23
25
|
query_socketPortMetricsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.socketPortMetricsTimeSeries')
|