Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions plugins/Zscaler/v1/dataStreams/cloudComponentHistory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"name": "cloudComponentHistory",
"displayName": "Cloud Component History",
"description": "Hour-by-hour state of each data center or core service in one Zscaler cloud over the last 7 days, as shown on the Trust portal's Cloud Status page",
"tags": [
"Status",
"Incidents"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api/cloud-status",
"getArgs": [
{
"key": "cloud",
"value": "{{ (function (v) { v = Array.isArray(v) ? v[0] : v; v = v && typeof v === 'object' ? v.value : v; return v ? String(v).split('|')[0] : null; })(typeof cloud !== 'undefined' ? cloud : undefined) }}"
},
{
"key": "requestType",
"value": "{{ (function (v) { v = Array.isArray(v) ? v[0] : v; v = v && typeof v === 'object' ? v.value : v; return v || 'datacenter'; })(typeof componentType !== 'undefined' ? componentType : undefined) }}"
},
{
"key": "dateOffset",
"value": "0"
}
],
"paging": {
"mode": "none"
},
"errorHandling": {
"type": "script",
"script": "errorHandling/cloudStatusApi.js"
},
"postRequestScript": "cloudComponentHistory.js"
},
"matches": "none",
"ui": [
{
"type": "autocomplete",
"name": "cloud",
"label": "Cloud",
"isMulti": false,
"allowCustomValues": false,
"data": {
"source": "dataStream",
"dataStreamName": "clouds",
"dataSourceConfig": {}
},
"validation": {
"required": true
}
},
{
"type": "autocomplete",
"name": "componentType",
"label": "Component type",
"isMulti": false,
"isClearable": true,
"allowCustomValues": false,
"help": "Lists only the types the selected cloud publishes on the Trust portal. Leave it empty for data centers.",
"data": {
"source": "dataStream",
"dataStreamName": "componentTypes",
"dataSourceConfig": {
"cloud": {
"fieldName": "cloud",
"required": true
}
}
}
}
],
"metadata": [
{
"name": "name",
"displayName": "Name",
"shape": "string",
"role": "label"
},
{
"name": "region",
"displayName": "Region",
"shape": "string"
},
{
"name": "time",
"displayName": "Hour",
"shape": "date",
"role": "timestamp"
},
{
"name": "state",
"displayName": "State",
"shape": "state"
},
{
"name": "event",
"displayName": "Event",
"shape": "string"
},
{
"name": "eventType",
"displayName": "Event Type",
"shape": "string"
},
{
"name": "link",
"displayName": "Link",
"shape": [
"url",
{
"label": "View on Trust portal"
}
],
"role": "link"
},
{
"name": "cloud",
"displayName": "Cloud Code",
"shape": "string",
"visible": false
}
],
"timeframes": [
"last24hours",
"last7days"
]
}
170 changes: 170 additions & 0 deletions plugins/Zscaler/v1/dataStreams/cloudComponentStatus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
{
"name": "cloudComponentStatus",
"displayName": "Cloud Component Status",
"description": "Current status of each data center or core service in one Zscaler cloud, as shown on the Trust portal's Cloud Status page",
"tags": [
"Status",
"Incidents"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api/cloud-status",
"getArgs": [
{
"key": "cloud",
"value": "{{ (function (v) { v = Array.isArray(v) ? v[0] : v; v = v && typeof v === 'object' ? v.value : v; return v ? String(v).split('|')[0] : null; })(typeof cloud !== 'undefined' ? cloud : undefined) }}"
},
{
"key": "requestType",
"value": "{{ (function (v) { v = Array.isArray(v) ? v[0] : v; v = v && typeof v === 'object' ? v.value : v; return v || 'datacenter'; })(typeof componentType !== 'undefined' ? componentType : undefined) }}"
},
{
"key": "dateOffset",
"value": "0"
}
],
"paging": {
"mode": "none"
},
"errorHandling": {
"type": "script",
"script": "errorHandling/cloudStatusApi.js"
},
"postRequestScript": "cloudComponentStatus.js"
},
"matches": "none",
"ui": [
{
"type": "autocomplete",
"name": "cloud",
"label": "Cloud",
"isMulti": false,
"allowCustomValues": false,
"data": {
"source": "dataStream",
"dataStreamName": "clouds",
"dataSourceConfig": {}
},
"validation": {
"required": true
}
},
{
"type": "autocomplete",
"name": "componentType",
"label": "Component type",
"isMulti": false,
"isClearable": true,
"allowCustomValues": false,
"help": "Lists only the types the selected cloud publishes on the Trust portal. Leave it empty for data centers.",
"data": {
"source": "dataStream",
"dataStreamName": "componentTypes",
"dataSourceConfig": {
"cloud": {
"fieldName": "cloud",
"required": true
}
}
}
}
],
"metadata": [
{
"name": "name",
"displayName": "Name",
"shape": "string",
"role": "label"
},
{
"name": "region",
"displayName": "Region",
"shape": "string"
},
{
"name": "severity",
"displayName": "Severity",
"shape": "number",
"visible": false
},
{
"name": "state",
"displayName": "State",
"shape": "state"
},
{
"name": "statusText",
"displayName": "Status",
"shape": "string",
"role": "description"
},
{
"name": "activeEvents",
"displayName": "Active Events",
"shape": [
"number",
{
"decimalPlaces": 0
}
]
},
{
"name": "eventTitle",
"displayName": "Event",
"shape": "string"
},
{
"name": "eventType",
"displayName": "Event Type",
"shape": "string"
},
{
"name": "eventStatus",
"displayName": "Event Status",
"shape": "string"
},
{
"name": "eventStart",
"displayName": "Event Start",
"shape": "date"
},
{
"name": "eventSummary",
"displayName": "Event Summary",
"shape": "string"
},
{
"name": "link",
"displayName": "Link",
"shape": [
"url",
{
"label": "View on Trust portal"
}
],
"role": "link"
},
{
"name": "cloud",
"displayName": "Cloud Code",
"shape": "string",
"visible": false
}
],
"defaultShaping": {
"sort": {
"by": [
[
"severity",
"desc"
],
[
"name",
"asc"
]
]
}
},
"timeframes": false
}
4 changes: 2 additions & 2 deletions plugins/Zscaler/v1/dataStreams/cloudStatus.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
},
{
"name": "currentEventLink",
"displayName": "Current Event",
"shape": ["url", { "label": "View post" }]
"displayName": "Link",
"shape": ["url", { "label": "View on Trust portal" }]
}
],
"defaultShaping": {
Expand Down
54 changes: 54 additions & 0 deletions plugins/Zscaler/v1/dataStreams/clouds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "clouds",
"displayName": "Clouds",
"description": "Zscaler clouds listed on the selected Trust portal",
"tags": [
"Status"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api/global",
"pathToData": "data.clouds",
"paging": {
"mode": "none"
}
},
"matches": "none",
"visibility": {
"type": "hidden"
},
"metadata": [
{
"name": "title",
"displayName": "Cloud",
"shape": "string",
"role": "label"
},
{
"name": "machine_name",
"displayName": "Cloud Code",
"shape": "string"
},
{
"name": "domain",
"displayName": "Domain",
"shape": "string"
},
{
"name": "value",
"displayName": "Value",
"computed": true,
"valueExpression": "{{ $['machine_name'] + '|' + $['domain'] }}",
"shape": "string",
"role": "value",
"visible": false
},
{
"name": "type",
"displayName": "Product",
"shape": "string"
}
],
"timeframes": false
}
Loading
Loading