3444 lines
142 KiB
YAML
3444 lines
142 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: c2c162144c2d4c5491c8801193af4945
|
|
name: Templates/Cloud
|
|
templates:
|
|
- uuid: e6b0aada359944d09ee4bd46c1a55587
|
|
template: 'Oracle Cloud Compute by HTTP'
|
|
name: 'Oracle Cloud Compute by HTTP'
|
|
description: |
|
|
This template monitors Oracle Cloud Infrastructure (OCI) single compute instance resources and discovers attached
|
|
virtual network interface cards (VNICs) and monitors their resources.
|
|
|
|
This template is not meant to be used independently, but together with Oracle Cloud by HTTP as a template for
|
|
LLD host prototypes.
|
|
|
|
Read the template documentation prior to using this template.
|
|
|
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
|
|
|
|
Generated by official Zabbix template tool "Templator"
|
|
vendor:
|
|
name: Zabbix
|
|
version: 7.0-4
|
|
groups:
|
|
- name: Templates/Cloud
|
|
items:
|
|
- uuid: 657ad1d54de4454696573418f5f17f11
|
|
name: 'Get instance availability'
|
|
type: SCRIPT
|
|
key: oci.compute.availability.get
|
|
delay: 5m
|
|
params: |
|
|
const CTlsConfig = function (raw_value) {
|
|
raw_value = String(raw_value).trim().toLowerCase();
|
|
|
|
if (['none', 'peer', 'full'].indexOf(raw_value) === -1) {
|
|
raw_value = 'full';
|
|
}
|
|
|
|
this.options = {
|
|
SSLVerifyPeer: (raw_value === 'peer' || raw_value === 'full'),
|
|
SSLVerifyHost: (raw_value === 'full')
|
|
};
|
|
|
|
this.enabled = (raw_value !== 'none');
|
|
|
|
this.checkURL = function (url) {
|
|
if (this.enabled && !/^https:\/\//i.test(url)) {
|
|
throw 'TLS certificate verification is enabled by {$' + 'HTTP.TLS.VERIFY}, but the URL uses plain HTTP: ' + url +
|
|
'. Use an "https://" URL, or set {$' + 'HTTP.TLS.VERIFY} to `none` to disable verification.';
|
|
}
|
|
|
|
return url;
|
|
};
|
|
}
|
|
|
|
|
|
function validateZabbixParams(requiredParams, allParams) {
|
|
requiredParams.forEach(function (field) {
|
|
if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
|
|
throw 'Required param is not set: ' + field + '.';
|
|
}
|
|
});
|
|
}
|
|
|
|
function OCI(service, action, params) {
|
|
this.zabbixLogPrefix = '[ OCI ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.hash = function (string) {
|
|
return sha256(string);
|
|
};
|
|
|
|
this.sign = function (string) {
|
|
return sign('sha256', params['private_key'], string);
|
|
};
|
|
|
|
this.encode = function (hash) {
|
|
const hexArr = hash.match(/.{1,2}/g);
|
|
var uInt8Array = new Uint8Array(hexArr.length);
|
|
hexArr.forEach(function (hex, idx) {
|
|
uInt8Array[idx] = parseInt(hex, 16);
|
|
});
|
|
return btoa(uInt8Array);
|
|
};
|
|
|
|
this.getDate = function () {
|
|
const weekdayShortList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
const monthShortList = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
|
|
const today = new Date();
|
|
return weekdayShortList[today.getUTCDay()] + ', ' + today.getUTCDate() + ' ' + monthShortList[today.getUTCMonth()] + ' ' + today.getUTCFullYear() + ' ' + today.getUTCHours() + ':' + today.getUTCMinutes() + ':' + today.getUTCSeconds() + ' GMT';
|
|
};
|
|
|
|
this.executeRequest = function (httpMethod, apiPath, apiParams, mql, namespace) {
|
|
var headers = '(request-target) date host';
|
|
const contentTypeHeader = 'content-type: application/json';
|
|
const dateHeader = 'date: ' + this.getDate();
|
|
const hostHeader = 'host: ' + params['api_host'];
|
|
const requestTarget = '(request-target): ' + httpMethod + ' ' + apiPath + apiParams;
|
|
var signingString = requestTarget + '\n' + dateHeader + '\n' + hostHeader;
|
|
var reqHeaders = [contentTypeHeader, dateHeader];
|
|
|
|
if (httpMethod === 'post') {
|
|
var body = JSON.stringify({
|
|
'namespace': namespace,
|
|
'query': mql
|
|
});
|
|
headers = headers + ' x-content-sha256 content-type content-length';
|
|
const bodyHeader = 'x-content-sha256: ' + this.encode(this.hash(body));
|
|
const bodyLengthHeader = 'content-length: ' + body.length;
|
|
signingString = signingString + '\n' + bodyHeader + '\n' + contentTypeHeader + '\n' + bodyLengthHeader;
|
|
reqHeaders.push(bodyHeader, bodyLengthHeader);
|
|
}
|
|
|
|
const signature = this.encode(this.sign(signingString));
|
|
|
|
reqHeaders.push('Authorization: Signature version="1",keyId="' + params['tenancy_ocid'] + '/' + params['user_ocid'] + '/' + params['fingerprint'] + '",algorithm="rsa-sha256",headers="' + headers + '",signature="' + signature + '"');
|
|
for (var header = 0, headerLength = reqHeaders.length; header < headerLength; header++) {
|
|
this.request.addHeader(reqHeaders[header]);
|
|
}
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
if (httpMethod === 'post') {
|
|
var apiRateLimitExceeded = false;
|
|
do {
|
|
const response = this.request.post('https://' + params['api_host'] + apiPath + apiParams, body);
|
|
|
|
try {
|
|
if (JSON.parse(response)['code'] === 'TooManyRequests') {
|
|
|
|
apiRateLimitExceeded = true;
|
|
Zabbix.sleep(1000);
|
|
} else {
|
|
apiRateLimitExceeded = false;
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the response: ' + JSON.stringify(response));
|
|
throw 'Could not parse the response. See logs for more information.';
|
|
}
|
|
} while (apiRateLimitExceeded);
|
|
} else {
|
|
const response = this.request.get('https://' + params['api_host'] + apiPath + apiParams);
|
|
}
|
|
|
|
this.request.clearHeader();
|
|
|
|
if (this.request.getStatus() === parseInt(params['http_status_code'])) {
|
|
return response;
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
|
|
throw 'Unexpected HTTP response code: ' + this.request.getStatus();
|
|
}
|
|
};
|
|
|
|
this.extractData = function (httpMethod, data, keys, compartment) {
|
|
try {
|
|
data = JSON.parse(data);
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
|
|
throw 'Could not parse received JSON object. See logs for more information.';
|
|
}
|
|
|
|
if (typeof keys == 'object') {
|
|
var returnBuffer = [];
|
|
for (var dataObj = 0, dataLength = data.length; dataObj < dataLength; dataObj++) {
|
|
|
|
var objectBuffer = {};
|
|
for (var key = 0, keysLength = keys.length; key < keysLength; key++) {
|
|
if (data[dataObj][keys[key]] || data[dataObj][keys[key]] == null) {
|
|
objectBuffer[keys[key].match(/^[a-z]+$|[A-Z][a-z]+$/)[0].toLowerCase()] = data[dataObj][keys[key]];
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Received an unexpected JSON object. Could not get value for key "' + keys[key] + '" in JSON: ' + JSON.stringify(data[dataObj]));
|
|
throw 'Received an unexpected JSON object. See logs for more information.';
|
|
}
|
|
}
|
|
if (typeof compartment != 'undefined' && compartment != '') objectBuffer['compartment'] = compartment;
|
|
returnBuffer.push(objectBuffer);
|
|
}
|
|
return returnBuffer;
|
|
}
|
|
|
|
try {
|
|
if (httpMethod === 'get') {
|
|
return data[keys];
|
|
} else {
|
|
if (data.length === 0) {
|
|
return 0;
|
|
}
|
|
data = data[0][keys];
|
|
return data[data.length - 1]['value'];
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not find key "' + keys + '" in JSON: ' + JSON.stringify(data));
|
|
throw 'Could not find required key in JSON object. See logs for more information.';
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
validateZabbixParams(['tenancy_ocid', 'user_ocid', 'private_key', 'fingerprint', 'api_host', 'instance_id', 'http_status_code', 'req_interval', 'compartment_id'], params);
|
|
var oci = new OCI('Compute', 'Get health', params);
|
|
const mql = 'InstanceAccessibilityStatus[' + params['req_interval'] + 'm]{resourceId=' + params['instance_id'] + '}.max()';
|
|
|
|
return JSON.stringify(oci.extractData('post', oci.executeRequest('post', '/20180401/metrics/actions/summarizeMetricsData', '?compartmentId=' + encodeURIComponent(params['compartment_id']), mql, 'oci_compute_instance_health'), 'aggregatedDatapoints'));
|
|
description: |
|
|
The accessibility status of a virtual machine instance.
|
|
A value of "1" indicates that the instance is unresponsive due to an issue with
|
|
the infrastructure or the instance itself.
|
|
A value of "0" indicates that an accessibility issue has not been detected.
|
|
If the instance is stopped, then the metric does not have a value.
|
|
valuemap:
|
|
name: 'Compute instance availability'
|
|
timeout: 10s
|
|
parameters:
|
|
- name: api_host
|
|
value: '{$OCI.API.TELEMETRY.HOST}'
|
|
- name: compartment_id
|
|
value: '{$OCI.COMPUTE.COMPARTMENT.ID}'
|
|
- name: fingerprint
|
|
value: '{$OCI.API.FINGERPRINT}'
|
|
- name: http_proxy
|
|
value: '{$OCI.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$OCI.HTTP.RETURN.CODE.OK}'
|
|
- name: instance_id
|
|
value: '{$OCI.COMPUTE.INSTANCE.ID}'
|
|
- name: private_key
|
|
value: '{$OCI.API.PRIVATE.KEY}'
|
|
- name: req_interval
|
|
value: '5'
|
|
- name: tenancy_ocid
|
|
value: '{$OCI.API.TENANCY}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"Oracle Cloud Compute"}'
|
|
- name: user_ocid
|
|
value: '{$OCI.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: environment
|
|
triggers:
|
|
- uuid: dbaee26c1de544d08fa6dd76ddc4c06a
|
|
expression: 'last(/Oracle Cloud Compute by HTTP/oci.compute.availability.get) = 1'
|
|
name: 'OCI Compute: Compute instance is not available'
|
|
priority: HIGH
|
|
description: 'Current instance availability.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 04a1f534ae844021be0935abf1214951
|
|
name: 'CPU utilization, in %'
|
|
type: DEPENDENT
|
|
key: oci.compute.cpu.util
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'Activity level from the CPU. Expressed as a percentage of the total time.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.CpuUtilization
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
triggers:
|
|
- uuid: 38987527713b404f842e26ad12ce3015
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.cpu.util,5m) >= {$OCI.COMPUTE.CPU.UTIL.WARN}'
|
|
name: 'OCI Compute: Current CPU utilization is high'
|
|
event_name: 'OCI Compute: Current CPU utilization is high (util >= {$OCI.COMPUTE.CPU.UTIL.WARN}%)'
|
|
opdata: 'Current: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current CPU utilization has exceeded `{$OCI.COMPUTE.CPU.UTIL.WARN}`% of the max available value.'
|
|
dependencies:
|
|
- name: 'OCI Compute: Current CPU utilization is too high'
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.cpu.util,5m) >= {$OCI.COMPUTE.CPU.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 082ba105bf614996a68054ad8c7d7101
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.cpu.util,5m) >= {$OCI.COMPUTE.CPU.UTIL.HIGH}'
|
|
name: 'OCI Compute: Current CPU utilization is too high'
|
|
event_name: 'OCI Compute: Current CPU utilization is too high (util >= {$OCI.COMPUTE.CPU.UTIL.HIGH}%)'
|
|
opdata: 'Current: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current CPU utilization has exceeded `{$OCI.COMPUTE.CPU.UTIL.HIGH}`% of the max available value.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 670783a729a647db9349d78ac61f1d94
|
|
name: 'Disk read I/O'
|
|
type: DEPENDENT
|
|
key: oci.compute.disk.io.read
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '!reads/s'
|
|
description: 'Activity level from I/O reads. Expressed as reads per interval.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.DiskIopsRead
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: cbd32ebd403c48b2b2f9815f13407afe
|
|
name: 'Disk write I/O'
|
|
type: DEPENDENT
|
|
key: oci.compute.disk.io.write
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '!writes/s'
|
|
description: 'Activity level from I/O writes. Expressed as writes per interval.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.DiskIopsWritten
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 15d234ef381747bfb76e7ccf9169046d
|
|
name: 'Disk bytes read'
|
|
type: DEPENDENT
|
|
key: oci.compute.disk.read
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: Bps
|
|
description: 'Read throughput. Expressed as bytes read per interval.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.DiskBytesRead
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: c7e061599b474ac49082d28572ab74c6
|
|
name: 'Disk bytes written'
|
|
type: DEPENDENT
|
|
key: oci.compute.disk.written
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: Bps
|
|
description: 'Write throughput. Expressed as bytes written per interval.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.DiskBytesWritten
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 75308c4fb9bd4bad8fbb80aa9b62b099
|
|
name: 'Load average'
|
|
type: DEPENDENT
|
|
key: oci.compute.load.avg
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '!processes'
|
|
description: 'Average system load calculated over a 1-minute period. Expressed as a number of processes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.LoadAverage
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: environment
|
|
- uuid: 610796958f694aa99f3e9ea1082972bf
|
|
name: 'Memory allocation stalls'
|
|
type: DEPENDENT
|
|
key: oci.compute.mem.stalls
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '!stalls'
|
|
description: 'Number of times page reclaim was called directly.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.MemoryAllocationStalls
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
- uuid: ef284ac17689442e835b686126161bc5
|
|
name: 'Memory utilization, in %'
|
|
type: DEPENDENT
|
|
key: oci.compute.mem.util
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'Space currently in use, measured in pages. Expressed as a percentage of used pages.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.MemoryUtilization
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
triggers:
|
|
- uuid: 9baaacf70a4446a7ae816afdc4db0ae8
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.mem.util,5m) >= {$OCI.COMPUTE.MEM.UTIL.WARN}'
|
|
name: 'OCI Compute: Current memory utilization is high'
|
|
event_name: 'OCI Compute: Current memory utilization is high (util >= {$OCI.COMPUTE.MEM.UTIL.WARN}%)'
|
|
opdata: 'Current: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current memory utilization has exceeded `{$OCI.COMPUTE.MEM.UTIL.WARN}`% of the max available value.'
|
|
dependencies:
|
|
- name: 'OCI Compute: Current memory utilization is too high'
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.mem.util,5m) >= {$OCI.COMPUTE.MEM.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 3b894aa250f04ebdb63fb8a914fbd72a
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.mem.util,5m) >= {$OCI.COMPUTE.MEM.UTIL.HIGH}'
|
|
name: 'OCI Compute: Current memory utilization is too high'
|
|
event_name: 'OCI Compute: Current memory utilization is too high (util >= {$OCI.COMPUTE.MEM.UTIL.HIGH}%)'
|
|
opdata: 'Current: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current memory utilization has exceeded `{$OCI.COMPUTE.MEM.UTIL.HIGH}`% of the max available value.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 65ff665a67374bb082f260ca473dfb1b
|
|
name: 'Get compute metrics'
|
|
type: SCRIPT
|
|
key: oci.compute.metrics.get
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
params: |
|
|
const CTlsConfig = function (raw_value) {
|
|
raw_value = String(raw_value).trim().toLowerCase();
|
|
|
|
if (['none', 'peer', 'full'].indexOf(raw_value) === -1) {
|
|
raw_value = 'full';
|
|
}
|
|
|
|
this.options = {
|
|
SSLVerifyPeer: (raw_value === 'peer' || raw_value === 'full'),
|
|
SSLVerifyHost: (raw_value === 'full')
|
|
};
|
|
|
|
this.enabled = (raw_value !== 'none');
|
|
|
|
this.checkURL = function (url) {
|
|
if (this.enabled && !/^https:\/\//i.test(url)) {
|
|
throw 'TLS certificate verification is enabled by {$' + 'HTTP.TLS.VERIFY}, but the URL uses plain HTTP: ' + url +
|
|
'. Use an "https://" URL, or set {$' + 'HTTP.TLS.VERIFY} to `none` to disable verification.';
|
|
}
|
|
|
|
return url;
|
|
};
|
|
}
|
|
|
|
|
|
function validateZabbixParams(requiredParams, allParams) {
|
|
requiredParams.forEach(function (field) {
|
|
if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
|
|
throw 'Required param is not set: ' + field + '.';
|
|
}
|
|
});
|
|
}
|
|
|
|
function OCI(service, action, params) {
|
|
this.zabbixLogPrefix = '[ OCI ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.hash = function (string) {
|
|
return sha256(string);
|
|
};
|
|
|
|
this.sign = function (string) {
|
|
return sign('sha256', params['private_key'], string);
|
|
};
|
|
|
|
this.encode = function (hash) {
|
|
const hexArr = hash.match(/.{1,2}/g);
|
|
var uInt8Array = new Uint8Array(hexArr.length);
|
|
hexArr.forEach(function (hex, idx) {
|
|
uInt8Array[idx] = parseInt(hex, 16);
|
|
});
|
|
return btoa(uInt8Array);
|
|
};
|
|
|
|
this.getDate = function () {
|
|
const weekdayShortList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
const monthShortList = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
|
|
const today = new Date();
|
|
return weekdayShortList[today.getUTCDay()] + ', ' + today.getUTCDate() + ' ' + monthShortList[today.getUTCMonth()] + ' ' + today.getUTCFullYear() + ' ' + today.getUTCHours() + ':' + today.getUTCMinutes() + ':' + today.getUTCSeconds() + ' GMT';
|
|
};
|
|
|
|
this.executeRequest = function (httpMethod, apiPath, apiParams, mql, namespace) {
|
|
var headers = '(request-target) date host';
|
|
const contentTypeHeader = 'content-type: application/json';
|
|
const dateHeader = 'date: ' + this.getDate();
|
|
const hostHeader = 'host: ' + params['api_host'];
|
|
const requestTarget = '(request-target): ' + httpMethod + ' ' + apiPath + apiParams;
|
|
var signingString = requestTarget + '\n' + dateHeader + '\n' + hostHeader;
|
|
var reqHeaders = [contentTypeHeader, dateHeader];
|
|
|
|
if (httpMethod === 'post') {
|
|
var body = JSON.stringify({
|
|
'namespace': namespace,
|
|
'query': mql
|
|
});
|
|
headers = headers + ' x-content-sha256 content-type content-length';
|
|
const bodyHeader = 'x-content-sha256: ' + this.encode(this.hash(body));
|
|
const bodyLengthHeader = 'content-length: ' + body.length;
|
|
signingString = signingString + '\n' + bodyHeader + '\n' + contentTypeHeader + '\n' + bodyLengthHeader;
|
|
reqHeaders.push(bodyHeader, bodyLengthHeader);
|
|
}
|
|
|
|
const signature = this.encode(this.sign(signingString));
|
|
|
|
reqHeaders.push('Authorization: Signature version="1",keyId="' + params['tenancy_ocid'] + '/' + params['user_ocid'] + '/' + params['fingerprint'] + '",algorithm="rsa-sha256",headers="' + headers + '",signature="' + signature + '"');
|
|
for (var header = 0, headerLength = reqHeaders.length; header < headerLength; header++) {
|
|
this.request.addHeader(reqHeaders[header]);
|
|
}
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
if (httpMethod === 'post') {
|
|
var apiRateLimitExceeded = false;
|
|
do {
|
|
const response = this.request.post('https://' + params['api_host'] + apiPath + apiParams, body);
|
|
|
|
try {
|
|
if (JSON.parse(response)['code'] === 'TooManyRequests') {
|
|
|
|
apiRateLimitExceeded = true;
|
|
Zabbix.sleep(1000);
|
|
} else {
|
|
apiRateLimitExceeded = false;
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the response: ' + JSON.stringify(response));
|
|
throw 'Could not parse the response. See logs for more information.';
|
|
}
|
|
} while (apiRateLimitExceeded);
|
|
} else {
|
|
const response = this.request.get('https://' + params['api_host'] + apiPath + apiParams);
|
|
}
|
|
|
|
this.request.clearHeader();
|
|
|
|
if (this.request.getStatus() === parseInt(params['http_status_code'])) {
|
|
return response;
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
|
|
throw 'Unexpected HTTP response code: ' + this.request.getStatus();
|
|
}
|
|
};
|
|
|
|
this.extractData = function (httpMethod, data, keys, compartment) {
|
|
try {
|
|
data = JSON.parse(data);
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
|
|
throw 'Could not parse received JSON object. See logs for more information.';
|
|
}
|
|
|
|
if (typeof keys == 'object') {
|
|
var returnBuffer = [];
|
|
for (var dataObj = 0, dataLength = data.length; dataObj < dataLength; dataObj++) {
|
|
|
|
var objectBuffer = {};
|
|
for (var key = 0, keysLength = keys.length; key < keysLength; key++) {
|
|
if (data[dataObj][keys[key]] || data[dataObj][keys[key]] == null) {
|
|
objectBuffer[keys[key].match(/^[a-z]+$|[A-Z][a-z]+$/)[0].toLowerCase()] = data[dataObj][keys[key]];
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Received an unexpected JSON object. Could not get value for key "' + keys[key] + '" in JSON: ' + JSON.stringify(data[dataObj]));
|
|
throw 'Received an unexpected JSON object. See logs for more information.';
|
|
}
|
|
}
|
|
if (typeof compartment != 'undefined' && compartment != '') objectBuffer['compartment'] = compartment;
|
|
returnBuffer.push(objectBuffer);
|
|
}
|
|
return returnBuffer;
|
|
}
|
|
|
|
try {
|
|
if (httpMethod === 'get') {
|
|
return data[keys];
|
|
} else {
|
|
if (data.length === 0) {
|
|
return 0;
|
|
}
|
|
data = data[0][keys];
|
|
return data[data.length - 1]['value'];
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not find key "' + keys + '" in JSON: ' + JSON.stringify(data));
|
|
throw 'Could not find required key in JSON object. See logs for more information.';
|
|
}
|
|
};
|
|
}
|
|
|
|
function buildMql(id, metrics, defaultStatistic, resourceType) {
|
|
resourceType = resourceType === '' || resourceType === undefined ? 'resourceId' : resourceType;
|
|
this.query = '[' + params['req_interval'] + 'm]{' + resourceType + '=' + id + '}.';
|
|
|
|
for (var i = 0, metricsLength = metrics.length; i < metricsLength; i++) {
|
|
const metric = ((Array.isArray(metrics[i]) ? metrics[i] : [metrics[i], defaultStatistic]));
|
|
metrics[i] = [metric[0], this.query + metric[1]];
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
validateZabbixParams(['tenancy_ocid', 'user_ocid', 'private_key', 'fingerprint', 'api_host', 'instance_id', 'http_status_code', 'req_interval', 'compartment_id'], params);
|
|
var oci = new OCI('Compute', 'Get metrics', params);
|
|
|
|
const metrics = [
|
|
['CpuUtilization', 'mean'],
|
|
['MemoryUtilization', 'mean'],
|
|
['LoadAverage', 'mean'],
|
|
['MemoryAllocationStalls', 'mean'],
|
|
'DiskBytesRead',
|
|
'DiskBytesWritten',
|
|
'DiskIopsRead',
|
|
'DiskIopsWritten',
|
|
'NetworksBytesIn',
|
|
'NetworksBytesOut'
|
|
];
|
|
buildMql(params['instance_id'], metrics, 'rate');
|
|
|
|
var result = {};
|
|
for (var i = 0, metricsLength = metrics.length; i < metricsLength; i++) {
|
|
result[metrics[i][0]] = oci.extractData('post', oci.executeRequest('post', '/20180401/metrics/actions/summarizeMetricsData', '?compartmentId=' + encodeURIComponent(params['compartment_id']), metrics[i][0] + metrics[i][1] + '()', 'oci_computeagent'), 'aggregatedDatapoints');
|
|
}
|
|
return JSON.stringify(result);
|
|
description: 'Gets compute instance metrics.'
|
|
timeout: 30s
|
|
parameters:
|
|
- name: api_host
|
|
value: '{$OCI.API.TELEMETRY.HOST}'
|
|
- name: compartment_id
|
|
value: '{$OCI.COMPUTE.COMPARTMENT.ID}'
|
|
- name: fingerprint
|
|
value: '{$OCI.API.FINGERPRINT}'
|
|
- name: http_proxy
|
|
value: '{$OCI.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$OCI.HTTP.RETURN.CODE.OK}'
|
|
- name: instance_id
|
|
value: '{$OCI.COMPUTE.INSTANCE.ID}'
|
|
- name: private_key
|
|
value: '{$OCI.API.PRIVATE.KEY}'
|
|
- name: req_interval
|
|
value: '1'
|
|
- name: tenancy_ocid
|
|
value: '{$OCI.API.TENANCY}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"Oracle Cloud Compute"}'
|
|
- name: user_ocid
|
|
value: '{$OCI.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 0c910a86a99b47f08dee930f07422f45
|
|
name: 'Network bytes in'
|
|
type: DEPENDENT
|
|
key: oci.compute.network.in
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: Bps
|
|
description: 'Network bytes in for the compute instance.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.NetworksBytesIn
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: a7a027ae583740e19e5f6288b3f15d10
|
|
name: 'Network bytes out'
|
|
type: DEPENDENT
|
|
key: oci.compute.network.out
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: Bps
|
|
description: 'Network bytes out for the compute instance.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.NetworksBytesOut
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- 'return Math.round(value * 100) / 100;'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.metrics.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 3c4a11c3c8fe40fca36635e2a6882816
|
|
name: State
|
|
type: SCRIPT
|
|
key: oci.compute.state.get
|
|
params: |
|
|
const CTlsConfig = function (raw_value) {
|
|
raw_value = String(raw_value).trim().toLowerCase();
|
|
|
|
if (['none', 'peer', 'full'].indexOf(raw_value) === -1) {
|
|
raw_value = 'full';
|
|
}
|
|
|
|
this.options = {
|
|
SSLVerifyPeer: (raw_value === 'peer' || raw_value === 'full'),
|
|
SSLVerifyHost: (raw_value === 'full')
|
|
};
|
|
|
|
this.enabled = (raw_value !== 'none');
|
|
|
|
this.checkURL = function (url) {
|
|
if (this.enabled && !/^https:\/\//i.test(url)) {
|
|
throw 'TLS certificate verification is enabled by {$' + 'HTTP.TLS.VERIFY}, but the URL uses plain HTTP: ' + url +
|
|
'. Use an "https://" URL, or set {$' + 'HTTP.TLS.VERIFY} to `none` to disable verification.';
|
|
}
|
|
|
|
return url;
|
|
};
|
|
}
|
|
|
|
|
|
function validateZabbixParams(requiredParams, allParams) {
|
|
requiredParams.forEach(function (field) {
|
|
if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
|
|
throw 'Required param is not set: ' + field + '.';
|
|
}
|
|
});
|
|
}
|
|
|
|
function OCI(service, action, params) {
|
|
this.zabbixLogPrefix = '[ OCI ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.hash = function (string) {
|
|
return sha256(string);
|
|
};
|
|
|
|
this.sign = function (string) {
|
|
return sign('sha256', params['private_key'], string);
|
|
};
|
|
|
|
this.encode = function (hash) {
|
|
const hexArr = hash.match(/.{1,2}/g);
|
|
var uInt8Array = new Uint8Array(hexArr.length);
|
|
hexArr.forEach(function (hex, idx) {
|
|
uInt8Array[idx] = parseInt(hex, 16);
|
|
});
|
|
return btoa(uInt8Array);
|
|
};
|
|
|
|
this.getDate = function () {
|
|
const weekdayShortList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
const monthShortList = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
|
|
const today = new Date();
|
|
return weekdayShortList[today.getUTCDay()] + ', ' + today.getUTCDate() + ' ' + monthShortList[today.getUTCMonth()] + ' ' + today.getUTCFullYear() + ' ' + today.getUTCHours() + ':' + today.getUTCMinutes() + ':' + today.getUTCSeconds() + ' GMT';
|
|
};
|
|
|
|
this.executeRequest = function (httpMethod, apiPath, apiParams, mql, namespace) {
|
|
var headers = '(request-target) date host';
|
|
const contentTypeHeader = 'content-type: application/json';
|
|
const dateHeader = 'date: ' + this.getDate();
|
|
const hostHeader = 'host: ' + params['api_host'];
|
|
const requestTarget = '(request-target): ' + httpMethod + ' ' + apiPath + apiParams;
|
|
var signingString = requestTarget + '\n' + dateHeader + '\n' + hostHeader;
|
|
var reqHeaders = [contentTypeHeader, dateHeader];
|
|
|
|
if (httpMethod === 'post') {
|
|
var body = JSON.stringify({
|
|
'namespace': namespace,
|
|
'query': mql
|
|
});
|
|
headers = headers + ' x-content-sha256 content-type content-length';
|
|
const bodyHeader = 'x-content-sha256: ' + this.encode(this.hash(body));
|
|
const bodyLengthHeader = 'content-length: ' + body.length;
|
|
signingString = signingString + '\n' + bodyHeader + '\n' + contentTypeHeader + '\n' + bodyLengthHeader;
|
|
reqHeaders.push(bodyHeader, bodyLengthHeader);
|
|
}
|
|
|
|
const signature = this.encode(this.sign(signingString));
|
|
|
|
reqHeaders.push('Authorization: Signature version="1",keyId="' + params['tenancy_ocid'] + '/' + params['user_ocid'] + '/' + params['fingerprint'] + '",algorithm="rsa-sha256",headers="' + headers + '",signature="' + signature + '"');
|
|
for (var header = 0, headerLength = reqHeaders.length; header < headerLength; header++) {
|
|
this.request.addHeader(reqHeaders[header]);
|
|
}
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
if (httpMethod === 'post') {
|
|
var apiRateLimitExceeded = false;
|
|
do {
|
|
const response = this.request.post('https://' + params['api_host'] + apiPath + apiParams, body);
|
|
|
|
try {
|
|
if (JSON.parse(response)['code'] === 'TooManyRequests') {
|
|
|
|
apiRateLimitExceeded = true;
|
|
Zabbix.sleep(1000);
|
|
} else {
|
|
apiRateLimitExceeded = false;
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the response: ' + JSON.stringify(response));
|
|
throw 'Could not parse the response. See logs for more information.';
|
|
}
|
|
} while (apiRateLimitExceeded);
|
|
} else {
|
|
const response = this.request.get('https://' + params['api_host'] + apiPath + apiParams);
|
|
}
|
|
|
|
this.request.clearHeader();
|
|
|
|
if (this.request.getStatus() === parseInt(params['http_status_code'])) {
|
|
return response;
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
|
|
throw 'Unexpected HTTP response code: ' + this.request.getStatus();
|
|
}
|
|
};
|
|
|
|
this.extractData = function (httpMethod, data, keys, compartment) {
|
|
try {
|
|
data = JSON.parse(data);
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
|
|
throw 'Could not parse received JSON object. See logs for more information.';
|
|
}
|
|
|
|
if (typeof keys == 'object') {
|
|
var returnBuffer = [];
|
|
for (var dataObj = 0, dataLength = data.length; dataObj < dataLength; dataObj++) {
|
|
|
|
var objectBuffer = {};
|
|
for (var key = 0, keysLength = keys.length; key < keysLength; key++) {
|
|
if (data[dataObj][keys[key]] || data[dataObj][keys[key]] == null) {
|
|
objectBuffer[keys[key].match(/^[a-z]+$|[A-Z][a-z]+$/)[0].toLowerCase()] = data[dataObj][keys[key]];
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Received an unexpected JSON object. Could not get value for key "' + keys[key] + '" in JSON: ' + JSON.stringify(data[dataObj]));
|
|
throw 'Received an unexpected JSON object. See logs for more information.';
|
|
}
|
|
}
|
|
if (typeof compartment != 'undefined' && compartment != '') objectBuffer['compartment'] = compartment;
|
|
returnBuffer.push(objectBuffer);
|
|
}
|
|
return returnBuffer;
|
|
}
|
|
|
|
try {
|
|
if (httpMethod === 'get') {
|
|
return data[keys];
|
|
} else {
|
|
if (data.length === 0) {
|
|
return 0;
|
|
}
|
|
data = data[0][keys];
|
|
return data[data.length - 1]['value'];
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not find key "' + keys + '" in JSON: ' + JSON.stringify(data));
|
|
throw 'Could not find required key in JSON object. See logs for more information.';
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
validateZabbixParams(['tenancy_ocid', 'user_ocid', 'private_key', 'fingerprint', 'api_host', 'instance_id', 'http_status_code'], params);
|
|
var oci = new OCI('Compute', 'Get state', params);
|
|
|
|
return oci.extractData('get', oci.executeRequest('get', '/20160918/instances/' + encodeURIComponent(params['instance_id']), ''), 'lifecycleState');
|
|
description: 'The current state of the instance.'
|
|
valuemap:
|
|
name: 'Compute instance state'
|
|
preprocessing:
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'MOVING': 1,
|
|
'PROVISIONING': 2,
|
|
'RUNNING': 3,
|
|
'STARTING': 4,
|
|
'STOPPING': 5,
|
|
'STOPPED': 6,
|
|
'CREATING_IMAGE': 7,
|
|
'TERMINATING': 8,
|
|
'TERMINATED': 9
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
timeout: 10s
|
|
parameters:
|
|
- name: api_host
|
|
value: '{$OCI.API.CORE.HOST}'
|
|
- name: fingerprint
|
|
value: '{$OCI.API.FINGERPRINT}'
|
|
- name: http_proxy
|
|
value: '{$OCI.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$OCI.HTTP.RETURN.CODE.OK}'
|
|
- name: instance_id
|
|
value: '{$OCI.COMPUTE.INSTANCE.ID}'
|
|
- name: private_key
|
|
value: '{$OCI.API.PRIVATE.KEY}'
|
|
- name: tenancy_ocid
|
|
value: '{$OCI.API.TENANCY}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"Oracle Cloud Compute"}'
|
|
- name: user_ocid
|
|
value: '{$OCI.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: environment
|
|
triggers:
|
|
- uuid: 2bce7c23998f4331a5eca3507fc671d9
|
|
expression: 'last(/Oracle Cloud Compute by HTTP/oci.compute.state.get,#1)<>last(/Oracle Cloud Compute by HTTP/oci.compute.state.get,#2)'
|
|
name: 'OCI Compute: State has changed'
|
|
event_name: 'OCI Compute: State has changed (new state: {ITEM.VALUE})'
|
|
opdata: 'Current state: {ITEM.LASTVALUE}'
|
|
priority: INFO
|
|
description: 'Compute instance state has changed.'
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
- uuid: c0e74098afb14984af6355ac0711662e
|
|
name: 'Get VNICs'
|
|
type: SCRIPT
|
|
key: oci.compute.vnic.get
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
params: |
|
|
const CTlsConfig = function (raw_value) {
|
|
raw_value = String(raw_value).trim().toLowerCase();
|
|
|
|
if (['none', 'peer', 'full'].indexOf(raw_value) === -1) {
|
|
raw_value = 'full';
|
|
}
|
|
|
|
this.options = {
|
|
SSLVerifyPeer: (raw_value === 'peer' || raw_value === 'full'),
|
|
SSLVerifyHost: (raw_value === 'full')
|
|
};
|
|
|
|
this.enabled = (raw_value !== 'none');
|
|
|
|
this.checkURL = function (url) {
|
|
if (this.enabled && !/^https:\/\//i.test(url)) {
|
|
throw 'TLS certificate verification is enabled by {$' + 'HTTP.TLS.VERIFY}, but the URL uses plain HTTP: ' + url +
|
|
'. Use an "https://" URL, or set {$' + 'HTTP.TLS.VERIFY} to `none` to disable verification.';
|
|
}
|
|
|
|
return url;
|
|
};
|
|
}
|
|
|
|
|
|
function validateZabbixParams(requiredParams, allParams) {
|
|
requiredParams.forEach(function (field) {
|
|
if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
|
|
throw 'Required param is not set: ' + field + '.';
|
|
}
|
|
});
|
|
}
|
|
|
|
function OCI(service, action, params) {
|
|
this.zabbixLogPrefix = '[ OCI ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.hash = function (string) {
|
|
return sha256(string);
|
|
};
|
|
|
|
this.sign = function (string) {
|
|
return sign('sha256', params['private_key'], string);
|
|
};
|
|
|
|
this.encode = function (hash) {
|
|
const hexArr = hash.match(/.{1,2}/g);
|
|
var uInt8Array = new Uint8Array(hexArr.length);
|
|
hexArr.forEach(function (hex, idx) {
|
|
uInt8Array[idx] = parseInt(hex, 16);
|
|
});
|
|
return btoa(uInt8Array);
|
|
};
|
|
|
|
this.getDate = function () {
|
|
const weekdayShortList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
const monthShortList = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
|
|
const today = new Date();
|
|
return weekdayShortList[today.getUTCDay()] + ', ' + today.getUTCDate() + ' ' + monthShortList[today.getUTCMonth()] + ' ' + today.getUTCFullYear() + ' ' + today.getUTCHours() + ':' + today.getUTCMinutes() + ':' + today.getUTCSeconds() + ' GMT';
|
|
};
|
|
|
|
this.executeRequest = function (httpMethod, apiPath, apiParams, mql, namespace) {
|
|
var headers = '(request-target) date host';
|
|
const contentTypeHeader = 'content-type: application/json';
|
|
const dateHeader = 'date: ' + this.getDate();
|
|
const hostHeader = 'host: ' + params['api_host'];
|
|
const requestTarget = '(request-target): ' + httpMethod + ' ' + apiPath + apiParams;
|
|
var signingString = requestTarget + '\n' + dateHeader + '\n' + hostHeader;
|
|
var reqHeaders = [contentTypeHeader, dateHeader];
|
|
|
|
if (httpMethod === 'post') {
|
|
var body = JSON.stringify({
|
|
'namespace': namespace,
|
|
'query': mql
|
|
});
|
|
headers = headers + ' x-content-sha256 content-type content-length';
|
|
const bodyHeader = 'x-content-sha256: ' + this.encode(this.hash(body));
|
|
const bodyLengthHeader = 'content-length: ' + body.length;
|
|
signingString = signingString + '\n' + bodyHeader + '\n' + contentTypeHeader + '\n' + bodyLengthHeader;
|
|
reqHeaders.push(bodyHeader, bodyLengthHeader);
|
|
}
|
|
|
|
const signature = this.encode(this.sign(signingString));
|
|
|
|
reqHeaders.push('Authorization: Signature version="1",keyId="' + params['tenancy_ocid'] + '/' + params['user_ocid'] + '/' + params['fingerprint'] + '",algorithm="rsa-sha256",headers="' + headers + '",signature="' + signature + '"');
|
|
for (var header = 0, headerLength = reqHeaders.length; header < headerLength; header++) {
|
|
this.request.addHeader(reqHeaders[header]);
|
|
}
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
if (httpMethod === 'post') {
|
|
var apiRateLimitExceeded = false;
|
|
do {
|
|
const response = this.request.post('https://' + params['api_host'] + apiPath + apiParams, body);
|
|
|
|
try {
|
|
if (JSON.parse(response)['code'] === 'TooManyRequests') {
|
|
|
|
apiRateLimitExceeded = true;
|
|
Zabbix.sleep(1000);
|
|
} else {
|
|
apiRateLimitExceeded = false;
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the response: ' + JSON.stringify(response));
|
|
throw 'Could not parse the response. See logs for more information.';
|
|
}
|
|
} while (apiRateLimitExceeded);
|
|
} else {
|
|
const response = this.request.get('https://' + params['api_host'] + apiPath + apiParams);
|
|
}
|
|
|
|
this.request.clearHeader();
|
|
|
|
if (this.request.getStatus() === parseInt(params['http_status_code'])) {
|
|
return response;
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
|
|
throw 'Unexpected HTTP response code: ' + this.request.getStatus();
|
|
}
|
|
};
|
|
|
|
this.extractData = function (httpMethod, data, keys, compartment) {
|
|
try {
|
|
data = JSON.parse(data);
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
|
|
throw 'Could not parse received JSON object. See logs for more information.';
|
|
}
|
|
|
|
if (typeof keys == 'object') {
|
|
var returnBuffer = [];
|
|
for (var dataObj = 0, dataLength = data.length; dataObj < dataLength; dataObj++) {
|
|
|
|
var objectBuffer = {};
|
|
for (var key = 0, keysLength = keys.length; key < keysLength; key++) {
|
|
if (data[dataObj][keys[key]] || data[dataObj][keys[key]] == null) {
|
|
objectBuffer[keys[key].match(/^[a-z]+$|[A-Z][a-z]+$/)[0].toLowerCase()] = data[dataObj][keys[key]];
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Received an unexpected JSON object. Could not get value for key "' + keys[key] + '" in JSON: ' + JSON.stringify(data[dataObj]));
|
|
throw 'Received an unexpected JSON object. See logs for more information.';
|
|
}
|
|
}
|
|
if (typeof compartment != 'undefined' && compartment != '') objectBuffer['compartment'] = compartment;
|
|
returnBuffer.push(objectBuffer);
|
|
}
|
|
return returnBuffer;
|
|
}
|
|
|
|
try {
|
|
if (httpMethod === 'get') {
|
|
return data[keys];
|
|
} else {
|
|
if (data.length === 0) {
|
|
return 0;
|
|
}
|
|
data = data[0][keys];
|
|
return data[data.length - 1]['value'];
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not find key "' + keys + '" in JSON: ' + JSON.stringify(data));
|
|
throw 'Could not find required key in JSON object. See logs for more information.';
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
validateZabbixParams(['tenancy_ocid', 'user_ocid', 'private_key', 'fingerprint', 'api_host', 'instance_id', 'availability_domain', 'http_status_code', 'compartment_id'], params);
|
|
var oci = new OCI('Compute', 'Get VNICs', params);
|
|
|
|
return JSON.stringify(oci.extractData('get', oci.executeRequest('get', '/20160918/vnicAttachments', '?compartmentId=' + encodeURIComponent(params['compartment_id']) + '&availabilityDomain=' + encodeURIComponent(params['availability_domain']) + '&instanceId=' + encodeURIComponent(params['instance_id'])), ['vnicId', 'displayName', 'lifecycleState']));
|
|
description: 'Gets information about all virtual network interface cards attached to the instance.'
|
|
timeout: 30s
|
|
parameters:
|
|
- name: api_host
|
|
value: '{$OCI.API.CORE.HOST}'
|
|
- name: availability_domain
|
|
value: '{$OCI.COMPUTE.AVAILABILITY.DOMAIN}'
|
|
- name: compartment_id
|
|
value: '{$OCI.COMPUTE.COMPARTMENT.ID}'
|
|
- name: fingerprint
|
|
value: '{$OCI.API.FINGERPRINT}'
|
|
- name: http_proxy
|
|
value: '{$OCI.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$OCI.HTTP.RETURN.CODE.OK}'
|
|
- name: instance_id
|
|
value: '{$OCI.COMPUTE.INSTANCE.ID}'
|
|
- name: private_key
|
|
value: '{$OCI.API.PRIVATE.KEY}'
|
|
- name: tenancy_ocid
|
|
value: '{$OCI.API.TENANCY}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"Oracle Cloud Compute"}'
|
|
- name: user_ocid
|
|
value: '{$OCI.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
discovery_rules:
|
|
- uuid: 4f4a058b2a0b4bddb4ddbdb7613934af
|
|
name: 'VNIC discovery'
|
|
type: DEPENDENT
|
|
key: oci.compute.vnic.discovery
|
|
delay: '0'
|
|
filter:
|
|
evaltype: AND
|
|
conditions:
|
|
- macro: '{#NAME}'
|
|
value: '{$OCI.COMPUTE.VNIC.DISCOVERY.NAME.MATCHES}'
|
|
formulaid: A
|
|
- macro: '{#NAME}'
|
|
value: '{$OCI.COMPUTE.VNIC.DISCOVERY.NAME.NOT_MATCHES}'
|
|
operator: NOT_MATCHES_REGEX
|
|
formulaid: B
|
|
- macro: '{#STATE}'
|
|
value: '{$OCI.COMPUTE.VNIC.DISCOVERY.STATE.MATCHES}'
|
|
formulaid: C
|
|
- macro: '{#STATE}'
|
|
value: '{$OCI.COMPUTE.VNIC.DISCOVERY.STATE.NOT_MATCHES}'
|
|
operator: NOT_MATCHES_REGEX
|
|
formulaid: D
|
|
description: 'Discover compute instance VNICs.'
|
|
item_prototypes:
|
|
- uuid: 45fc4a9241f147c88e45352ac0f5018d
|
|
name: 'VNIC [{#NAME}]: Attachment state'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.attachment[{#ID}]'
|
|
delay: '0'
|
|
description: 'Current attachment state of the VNIC.'
|
|
valuemap:
|
|
name: 'VNIC attachment state'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$[?(@.id == ''{#ID}'')].state.first()'
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'ATTACHING': 1,
|
|
'ATTACHED': 2,
|
|
'DETACHING': 3,
|
|
'DETACHED': 4
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: oci.compute.vnic.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
trigger_prototypes:
|
|
- uuid: 7176da6364464cfcacadfcfe7e81fdb3
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.vnic.attachment[{#ID}],5m) >= 3'
|
|
name: 'OCI Compute: VNIC [{#NAME}]: VNIC is not attached'
|
|
priority: HIGH
|
|
description: 'Virtual network interface card attachment status.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: a9f4e55f3dd848b8bf0c861c81c2690a
|
|
name: 'VNIC [{#NAME}]: Egress packets dropped by security list'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.egress.packets.dropped[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets sent by the VNIC, destined for the network, dropped due to security rule violations.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicEgressDropsSecurityList
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 0ac50b3b570a470ca301185489c4d2a4
|
|
name: 'VNIC [{#NAME}]: Smartnic buffer drops from host'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.host.smartnic.drops[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: |
|
|
Number of packets dropped in SmartNIC from the host due to buffer exhaustion.
|
|
This metric is available only for Bare Metal Instances. For virtual machines, these metric values are zero.
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.SmartnicBufferDropsFromHost
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 86258bd1db6a46c9862f175acac2daf2
|
|
name: 'VNIC [{#NAME}]: Ingress packets dropped by security list'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.ingress.packets.dropped[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets received from the network, destined for the VNIC, dropped due to security rule violations.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicIngressDropsSecurityList
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: eb79782153524452ba4ba8506fb207a5
|
|
name: 'VNIC [{#NAME}]: Get metrics'
|
|
type: SCRIPT
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
params: |
|
|
const CTlsConfig = function (raw_value) {
|
|
raw_value = String(raw_value).trim().toLowerCase();
|
|
|
|
if (['none', 'peer', 'full'].indexOf(raw_value) === -1) {
|
|
raw_value = 'full';
|
|
}
|
|
|
|
this.options = {
|
|
SSLVerifyPeer: (raw_value === 'peer' || raw_value === 'full'),
|
|
SSLVerifyHost: (raw_value === 'full')
|
|
};
|
|
|
|
this.enabled = (raw_value !== 'none');
|
|
|
|
this.checkURL = function (url) {
|
|
if (this.enabled && !/^https:\/\//i.test(url)) {
|
|
throw 'TLS certificate verification is enabled by {$' + 'HTTP.TLS.VERIFY}, but the URL uses plain HTTP: ' + url +
|
|
'. Use an "https://" URL, or set {$' + 'HTTP.TLS.VERIFY} to `none` to disable verification.';
|
|
}
|
|
|
|
return url;
|
|
};
|
|
}
|
|
|
|
|
|
function validateZabbixParams(requiredParams, allParams) {
|
|
requiredParams.forEach(function (field) {
|
|
if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
|
|
throw 'Required param is not set: ' + field + '.';
|
|
}
|
|
});
|
|
}
|
|
|
|
function OCI(service, action, params) {
|
|
this.zabbixLogPrefix = '[ OCI ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.hash = function (string) {
|
|
return sha256(string);
|
|
};
|
|
|
|
this.sign = function (string) {
|
|
return sign('sha256', params['private_key'], string);
|
|
};
|
|
|
|
this.encode = function (hash) {
|
|
const hexArr = hash.match(/.{1,2}/g);
|
|
var uInt8Array = new Uint8Array(hexArr.length);
|
|
hexArr.forEach(function (hex, idx) {
|
|
uInt8Array[idx] = parseInt(hex, 16);
|
|
});
|
|
return btoa(uInt8Array);
|
|
};
|
|
|
|
this.getDate = function () {
|
|
const weekdayShortList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
const monthShortList = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
|
|
const today = new Date();
|
|
return weekdayShortList[today.getUTCDay()] + ', ' + today.getUTCDate() + ' ' + monthShortList[today.getUTCMonth()] + ' ' + today.getUTCFullYear() + ' ' + today.getUTCHours() + ':' + today.getUTCMinutes() + ':' + today.getUTCSeconds() + ' GMT';
|
|
};
|
|
|
|
this.executeRequest = function (httpMethod, apiPath, apiParams, mql, namespace) {
|
|
var headers = '(request-target) date host';
|
|
const contentTypeHeader = 'content-type: application/json';
|
|
const dateHeader = 'date: ' + this.getDate();
|
|
const hostHeader = 'host: ' + params['api_host'];
|
|
const requestTarget = '(request-target): ' + httpMethod + ' ' + apiPath + apiParams;
|
|
var signingString = requestTarget + '\n' + dateHeader + '\n' + hostHeader;
|
|
var reqHeaders = [contentTypeHeader, dateHeader];
|
|
|
|
if (httpMethod === 'post') {
|
|
var body = JSON.stringify({
|
|
'namespace': namespace,
|
|
'query': mql
|
|
});
|
|
headers = headers + ' x-content-sha256 content-type content-length';
|
|
const bodyHeader = 'x-content-sha256: ' + this.encode(this.hash(body));
|
|
const bodyLengthHeader = 'content-length: ' + body.length;
|
|
signingString = signingString + '\n' + bodyHeader + '\n' + contentTypeHeader + '\n' + bodyLengthHeader;
|
|
reqHeaders.push(bodyHeader, bodyLengthHeader);
|
|
}
|
|
|
|
const signature = this.encode(this.sign(signingString));
|
|
|
|
reqHeaders.push('Authorization: Signature version="1",keyId="' + params['tenancy_ocid'] + '/' + params['user_ocid'] + '/' + params['fingerprint'] + '",algorithm="rsa-sha256",headers="' + headers + '",signature="' + signature + '"');
|
|
for (var header = 0, headerLength = reqHeaders.length; header < headerLength; header++) {
|
|
this.request.addHeader(reqHeaders[header]);
|
|
}
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
if (httpMethod === 'post') {
|
|
var apiRateLimitExceeded = false;
|
|
do {
|
|
const response = this.request.post('https://' + params['api_host'] + apiPath + apiParams, body);
|
|
|
|
try {
|
|
if (JSON.parse(response)['code'] === 'TooManyRequests') {
|
|
|
|
apiRateLimitExceeded = true;
|
|
Zabbix.sleep(1000);
|
|
} else {
|
|
apiRateLimitExceeded = false;
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the response: ' + JSON.stringify(response));
|
|
throw 'Could not parse the response. See logs for more information.';
|
|
}
|
|
} while (apiRateLimitExceeded);
|
|
} else {
|
|
const response = this.request.get('https://' + params['api_host'] + apiPath + apiParams);
|
|
}
|
|
|
|
this.request.clearHeader();
|
|
|
|
if (this.request.getStatus() === parseInt(params['http_status_code'])) {
|
|
return response;
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
|
|
throw 'Unexpected HTTP response code: ' + this.request.getStatus();
|
|
}
|
|
};
|
|
|
|
this.extractData = function (httpMethod, data, keys, compartment) {
|
|
try {
|
|
data = JSON.parse(data);
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
|
|
throw 'Could not parse received JSON object. See logs for more information.';
|
|
}
|
|
|
|
if (typeof keys == 'object') {
|
|
var returnBuffer = [];
|
|
for (var dataObj = 0, dataLength = data.length; dataObj < dataLength; dataObj++) {
|
|
|
|
var objectBuffer = {};
|
|
for (var key = 0, keysLength = keys.length; key < keysLength; key++) {
|
|
if (data[dataObj][keys[key]] || data[dataObj][keys[key]] == null) {
|
|
objectBuffer[keys[key].match(/^[a-z]+$|[A-Z][a-z]+$/)[0].toLowerCase()] = data[dataObj][keys[key]];
|
|
} else {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Received an unexpected JSON object. Could not get value for key "' + keys[key] + '" in JSON: ' + JSON.stringify(data[dataObj]));
|
|
throw 'Received an unexpected JSON object. See logs for more information.';
|
|
}
|
|
}
|
|
if (typeof compartment != 'undefined' && compartment != '') objectBuffer['compartment'] = compartment;
|
|
returnBuffer.push(objectBuffer);
|
|
}
|
|
return returnBuffer;
|
|
}
|
|
|
|
try {
|
|
if (httpMethod === 'get') {
|
|
return data[keys];
|
|
} else {
|
|
if (data.length === 0) {
|
|
return 0;
|
|
}
|
|
data = data[0][keys];
|
|
return data[data.length - 1]['value'];
|
|
}
|
|
} catch (error) {
|
|
Zabbix.log(3, this.zabbixLogPrefix + ' Could not find key "' + keys + '" in JSON: ' + JSON.stringify(data));
|
|
throw 'Could not find required key in JSON object. See logs for more information.';
|
|
}
|
|
};
|
|
}
|
|
|
|
function buildMql(id, metrics, defaultStatistic, resourceType) {
|
|
resourceType = resourceType === '' || resourceType === undefined ? 'resourceId' : resourceType;
|
|
this.query = '[' + params['req_interval'] + 'm]{' + resourceType + '=' + id + '}.';
|
|
|
|
for (var i = 0, metricsLength = metrics.length; i < metricsLength; i++) {
|
|
const metric = ((Array.isArray(metrics[i]) ? metrics[i] : [metrics[i], defaultStatistic]));
|
|
metrics[i] = [metric[0], this.query + metric[1]];
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
validateZabbixParams(['tenancy_ocid', 'user_ocid', 'private_key', 'fingerprint', 'api_host', 'vnic_id', 'http_status_code', 'req_interval', 'compartment_id'], params);
|
|
var oci = new OCI('Compute - VNIC', 'Get metrics', params);
|
|
|
|
const metrics = [
|
|
'VnicEgressDropsSecurityList',
|
|
'VnicIngressDropsSecurityList',
|
|
'VnicFromNetworkBytes',
|
|
'VnicFromNetworkPackets',
|
|
'VnicToNetworkBytes',
|
|
'VnicToNetworkPackets',
|
|
'VnicIngressDropsThrottle',
|
|
'VnicEgressDropsThrottle',
|
|
'VnicIngressDropsConntrackFull',
|
|
'VnicEgressDropsConntrackFull',
|
|
'VnicConntrackUtilPercent',
|
|
['VnicConntrackIsFull', 'last'],
|
|
'SmartnicBufferDropsFromNetwork',
|
|
'SmartnicBufferDropsFromHost'
|
|
];
|
|
buildMql(params['vnic_id'], metrics, 'sum');
|
|
|
|
var result = {};
|
|
for (var i = 0, metricsLength = metrics.length; i < metricsLength; i++) {
|
|
result[metrics[i][0]] = oci.extractData('post', oci.executeRequest('post', '/20180401/metrics/actions/summarizeMetricsData', '?compartmentId=' + encodeURIComponent(params['compartment_id']), metrics[i][0] + metrics[i][1] + '()', 'oci_vcn'), 'aggregatedDatapoints');
|
|
}
|
|
return JSON.stringify(result);
|
|
description: 'Gets virtual network interface card metrics.'
|
|
timeout: 30s
|
|
parameters:
|
|
- name: api_host
|
|
value: '{$OCI.API.TELEMETRY.HOST}'
|
|
- name: compartment_id
|
|
value: '{$OCI.COMPUTE.COMPARTMENT.ID}'
|
|
- name: fingerprint
|
|
value: '{$OCI.API.FINGERPRINT}'
|
|
- name: http_proxy
|
|
value: '{$OCI.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$OCI.HTTP.RETURN.CODE.OK}'
|
|
- name: private_key
|
|
value: '{$OCI.API.PRIVATE.KEY}'
|
|
- name: req_interval
|
|
value: '1'
|
|
- name: tenancy_ocid
|
|
value: '{$OCI.API.TENANCY}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"Oracle Cloud Compute"}'
|
|
- name: user_ocid
|
|
value: '{$OCI.API.USER}'
|
|
- name: vnic_id
|
|
value: '{#ID}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: e083fab486984a1d8c0947924e2e6c60
|
|
name: 'VNIC [{#NAME}]: Bytes to network'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.bytes.egr[{#ID}]'
|
|
delay: '0'
|
|
units: B
|
|
description: 'Bytes sent from the VNIC to the network, before drops.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicToNetworkBytes
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 09b608c006b34276b34356802f755ce7
|
|
name: 'VNIC [{#NAME}]: Bytes from network'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.bytes.ingr[{#ID}]'
|
|
delay: '0'
|
|
units: B
|
|
description: 'Bytes received at the VNIC from the network, after drops.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicFromNetworkBytes
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 9e4d0babdaad4f7291974881d88fa991
|
|
name: 'VNIC [{#NAME}]: Connection tracking table full'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.conntrack.full[{#ID}]'
|
|
delay: '0'
|
|
description: 'Boolean (0/false, 1/true) that indicates the connection tracking table is full.'
|
|
valuemap:
|
|
name: 'Generic Bool'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicConntrackIsFull
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
trigger_prototypes:
|
|
- uuid: 4faafcd1719745749ae1e3b2c58a09d0
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.vnic.net.conntrack.full[{#ID}],5m) = 1'
|
|
name: 'OCI Compute: VNIC [{#NAME}]: Conntrack table full'
|
|
priority: HIGH
|
|
description: 'Virtual network interface card connection tracking table is full.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 088fc9f8d317402099ed0cda9dffb525
|
|
name: 'VNIC [{#NAME}]: Connection tracking table utilization, in %'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.conntrack.util[{#ID}]'
|
|
delay: '0'
|
|
units: '%'
|
|
description: 'Total utilization percentage (0-100%) of the connection tracking table.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicConntrackUtilPercent
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
trigger_prototypes:
|
|
- uuid: c2fd382491624a74b2956be3dad187ea
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.vnic.net.conntrack.util[{#ID}],5m) >= {$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.WARN}'
|
|
name: 'OCI Compute: VNIC [{#NAME}]: Current conntrack table utilization is high'
|
|
event_name: 'OCI Compute: VNIC [{#NAME}]: Current conntrack table utilization is high (util >= {$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.WARN}%)'
|
|
opdata: 'Current: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current conntrack table utilization has exceeded `{$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.WARN}`% of the max available value.'
|
|
dependencies:
|
|
- name: 'OCI Compute: VNIC [{#NAME}]: Current conntrack table utilization is too high'
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.vnic.net.conntrack.util[{#ID}],5m) >= {$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: cf98ffe12a2b413c9b1384e9ec167cbd
|
|
expression: 'min(/Oracle Cloud Compute by HTTP/oci.compute.vnic.net.conntrack.util[{#ID}],5m) >= {$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.HIGH}'
|
|
name: 'OCI Compute: VNIC [{#NAME}]: Current conntrack table utilization is too high'
|
|
event_name: 'OCI Compute: VNIC [{#NAME}]: Current conntrack table utilization is too high (util >= {$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.HIGH}%)'
|
|
opdata: 'Current: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current conntrack table utilization has exceeded `{$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.HIGH}`% of the max available value.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 23be348ca25948468df11644a5f51d0d
|
|
name: 'VNIC [{#NAME}]: Egress packets dropped by full connection tracking table'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.packets.egr.drop[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets sent from the VNIC, destined for the network, dropped due to the full connection tracking table.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicEgressDropsConntrackFull
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: bfa72f1cfc294d2b819cea22dbe7ddd8
|
|
name: 'VNIC [{#NAME}]: Throttled egress packets'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.packets.egr.throttled[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets sent from the VNIC, destined for the network, dropped due to throttling.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicEgressDropsThrottle
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 06cee1bacd744926ac61f72cd8ba3ae5
|
|
name: 'VNIC [{#NAME}]: Packets to network'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.packets.egr[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets sent from the VNIC to the network, before drops.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicToNetworkPackets
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 2564ee2fa8bd4d5f9859506c1486f45f
|
|
name: 'VNIC [{#NAME}]: Ingress packets dropped by full connection tracking table'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.packets.ingr.drop[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets received from the network, destined for the VNIC, dropped due to the full connection tracking table.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicIngressDropsConntrackFull
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 595654f8255f454fba44abfcfeeb8c14
|
|
name: 'VNIC [{#NAME}]: Throttled ingress packets'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.packets.ingr.throttled[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets received from the network, destined for the VNIC, dropped due to throttling.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicIngressDropsThrottle
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 9c37d782e3594e199f0c77010853d893
|
|
name: 'VNIC [{#NAME}]: Packets from network'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.packets.ingr[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: 'Packets received at the VNIC from the network, after drops.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.VnicFromNetworkPackets
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
- uuid: 400c523fe78b4264948e363f278bbc6d
|
|
name: 'VNIC [{#NAME}]: Smartnic buffer drops from network'
|
|
type: DEPENDENT
|
|
key: 'oci.compute.vnic.net.smartnic.drops[{#ID}]'
|
|
delay: '0'
|
|
units: '!packets'
|
|
description: |
|
|
Number of packets dropped in SmartNIC from the network due to buffer exhaustion.
|
|
This metric is available only for Bare Metal Instances. For virtual machines, these metric values are zero.
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.SmartnicBufferDropsFromNetwork
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'oci.compute.vnic.metrics.get[{#ID}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: vnic
|
|
value: '{#ID}'
|
|
graph_prototypes:
|
|
- uuid: 7a02ebf104a24f3ebd1631003dc7365c
|
|
name: 'VNIC [{#NAME}]: Network bytes in'
|
|
graph_items:
|
|
- color: 00D936
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.bytes.ingr[{#ID}]'
|
|
- uuid: 50306b25bef24d95acd2d9ae9e0c1f6f
|
|
name: 'VNIC [{#NAME}]: Network bytes out'
|
|
graph_items:
|
|
- color: 2196F3
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.bytes.egr[{#ID}]'
|
|
- uuid: 4f3c1eabc2be43b68c4a76a6bed17761
|
|
name: 'VNIC [{#NAME}]: Network packets dropped by connection tracking table'
|
|
graph_items:
|
|
- color: 199C0D
|
|
yaxisside: RIGHT
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.conntrack.util[{#ID}]'
|
|
- sortorder: '1'
|
|
color: 00D936
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.ingr.drop[{#ID}]'
|
|
- sortorder: '2'
|
|
color: 0208bf
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.egr.drop[{#ID}]'
|
|
- uuid: 3d9f549442ac455eb0e5296594eac004
|
|
name: 'VNIC [{#NAME}]: Network packets dropped by security list'
|
|
graph_items:
|
|
- color: 00D936
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.ingr.drop[{#ID}]'
|
|
- sortorder: '1'
|
|
color: 0208bf
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.egr.drop[{#ID}]'
|
|
- uuid: 2c4626b63df0468caef94e405e499aaa
|
|
name: 'VNIC [{#NAME}]: Network packets in'
|
|
graph_items:
|
|
- color: 00D936
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.ingr[{#ID}]'
|
|
- sortorder: '1'
|
|
color: 008C23
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.ingr.throttled[{#ID}]'
|
|
- uuid: 4fe14e23a0414b8787749aababc35ceb
|
|
name: 'VNIC [{#NAME}]: Network packets out'
|
|
graph_items:
|
|
- color: 2196F3
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.egr[{#ID}]'
|
|
- sortorder: '1'
|
|
color: 0208bf
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.packets.egr.throttled[{#ID}]'
|
|
- uuid: fdaad88126dd486b948348e993217c8f
|
|
name: 'VNIC [{#NAME}]: Smartnic buffer drops'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.net.smartnic.drops[{#ID}]'
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: 'oci.compute.vnic.host.smartnic.drops[{#ID}]'
|
|
master_item:
|
|
key: oci.compute.vnic.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#ID}'
|
|
path: $.id
|
|
- lld_macro: '{#NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#STATE}'
|
|
path: $.state
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
tags:
|
|
- tag: class
|
|
value: cloud
|
|
- tag: target
|
|
value: oci
|
|
- tag: target
|
|
value: oracle-cloud-infrastructure
|
|
macros:
|
|
- macro: '{$HTTP.TLS.VERIFY}'
|
|
value: full
|
|
description: 'TLS certificate verification for script items: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "Oracle Cloud Compute", e.g. {$HTTP.TLS.VERIFY:"Oracle Cloud Compute"}.'
|
|
- macro: '{$OCI.COMPUTE.CPU.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about CPU resource utilization.'
|
|
- macro: '{$OCI.COMPUTE.CPU.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about CPU resource utilization.'
|
|
- macro: '{$OCI.COMPUTE.MEM.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about memory resource utilization.'
|
|
- macro: '{$OCI.COMPUTE.MEM.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about memory resource utilization.'
|
|
- macro: '{$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about VNIC connection tracking table utilization.'
|
|
- macro: '{$OCI.COMPUTE.VNIC.CONNTRACK.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about VNIC connection tracking table utilization.'
|
|
- macro: '{$OCI.COMPUTE.VNIC.DISCOVERY.NAME.MATCHES}'
|
|
value: '.*'
|
|
description: 'Sets the regex string of VNIC names to allow in discovery.'
|
|
- macro: '{$OCI.COMPUTE.VNIC.DISCOVERY.NAME.NOT_MATCHES}'
|
|
value: CHANGE_IF_NEEDED
|
|
description: 'Sets the regex string of VNIC names to ignore in discovery.'
|
|
- macro: '{$OCI.COMPUTE.VNIC.DISCOVERY.STATE.MATCHES}'
|
|
value: '.*'
|
|
description: 'Sets the regex string of VNIC states to allow in discovery.'
|
|
- macro: '{$OCI.COMPUTE.VNIC.DISCOVERY.STATE.NOT_MATCHES}'
|
|
value: CHANGE_IF_NEEDED
|
|
description: 'Sets the regex string of VNIC states to ignore in discovery.'
|
|
- macro: '{$OCI.HTTP.PROXY}'
|
|
description: 'Set an HTTP proxy for OCI API requests if needed.'
|
|
- macro: '{$OCI.HTTP.RETURN.CODE.OK}'
|
|
value: '200'
|
|
description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
|
|
dashboards:
|
|
- uuid: edab80c89bcf43d6ada2e4ed5477d36f
|
|
name: 'OCI Compute: Overview'
|
|
pages:
|
|
- name: Main
|
|
display_period: '60'
|
|
widgets:
|
|
- type: item
|
|
name: State
|
|
width: '27'
|
|
height: '4'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- type: STRING
|
|
name: description
|
|
value: 'Current State'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.availability.get
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: units_show
|
|
value: '0'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: item
|
|
name: 'Disk bytes read'
|
|
'y': '4'
|
|
width: '15'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Bytes Read'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.read
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '20'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: 'Disk read I/O'
|
|
'y': '7'
|
|
width: '15'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Read I/O'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.io.read
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '20'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: 'Disk bytes written'
|
|
x: '15'
|
|
'y': '4'
|
|
width: '15'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Bytes Written'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.written
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '20'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: 'Disk write I/O'
|
|
x: '15'
|
|
'y': '7'
|
|
width: '15'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Write I/O'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.io.write
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '20'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: Availability
|
|
x: '27'
|
|
width: '15'
|
|
height: '4'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- type: STRING
|
|
name: description
|
|
value: Availability
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.availability.get
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: units_show
|
|
value: '0'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '20'
|
|
- type: item
|
|
name: 'Net bytes in'
|
|
x: '30'
|
|
'y': '4'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FF0000
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Net Bytes In'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.in
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: 'Net bytes out'
|
|
x: '30'
|
|
'y': '7'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FF0000
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Net Bytes Out'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.out
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: 'Load average'
|
|
x: '42'
|
|
width: '30'
|
|
height: '4'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Load Average'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.load.avg
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: gauge
|
|
name: CPU
|
|
x: '48'
|
|
'y': '4'
|
|
width: '12'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: CPU
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 145C96
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.cpu.util
|
|
- type: INTEGER
|
|
name: rf_rate
|
|
value: '30'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: show.2
|
|
value: '5'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: INTEGER
|
|
name: units_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: STRING
|
|
name: value_arc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_arc_size
|
|
value: '35'
|
|
- type: INTEGER
|
|
name: value_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: item
|
|
name: 'Memory allocation stalls'
|
|
x: '48'
|
|
'y': '7'
|
|
width: '24'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FBC02D
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Memory Allocation Stalls'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.mem.stalls
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: gauge
|
|
name: Memory
|
|
x: '60'
|
|
'y': '4'
|
|
width: '12'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: Memory
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 145C96
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.mem.util
|
|
- type: INTEGER
|
|
name: rf_rate
|
|
value: '30'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: show.2
|
|
value: '5'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: INTEGER
|
|
name: units_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: STRING
|
|
name: value_arc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_arc_size
|
|
value: '35'
|
|
- type: INTEGER
|
|
name: value_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- name: CPU/Mem
|
|
display_period: '30'
|
|
widgets:
|
|
- type: gauge
|
|
name: CPU
|
|
width: '24'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: CPU
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 145C96
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.cpu.util
|
|
- type: INTEGER
|
|
name: rf_rate
|
|
value: '30'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: show.2
|
|
value: '5'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: INTEGER
|
|
name: units_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: STRING
|
|
name: value_arc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_arc_size
|
|
value: '35'
|
|
- type: INTEGER
|
|
name: value_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'CPU utilization'
|
|
'y': '3'
|
|
width: '24'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Cpu utilization'
|
|
- type: STRING
|
|
name: reference
|
|
value: ABAAA
|
|
- type: gauge
|
|
name: Memory
|
|
x: '24'
|
|
width: '48'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: Memory
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 145C96
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.mem.util
|
|
- type: INTEGER
|
|
name: rf_rate
|
|
value: '30'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: show.2
|
|
value: '5'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: INTEGER
|
|
name: units_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: STRING
|
|
name: value_arc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_arc_size
|
|
value: '35'
|
|
- type: INTEGER
|
|
name: value_bold
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Memory utilization'
|
|
x: '24'
|
|
'y': '3'
|
|
width: '24'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Memory utilization'
|
|
- type: STRING
|
|
name: reference
|
|
value: ABAAB
|
|
- type: graph
|
|
name: 'Memory allocation stalls'
|
|
x: '48'
|
|
'y': '3'
|
|
width: '24'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Memory allocation stalls'
|
|
- type: STRING
|
|
name: reference
|
|
value: ABAAC
|
|
- name: 'Net In/Out'
|
|
display_period: '30'
|
|
widgets:
|
|
- type: item
|
|
name: 'Net bytes in'
|
|
width: '36'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FF0000
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Net Bytes In'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.in
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Network bytes in'
|
|
'y': '3'
|
|
width: '36'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Network bytes in'
|
|
- type: STRING
|
|
name: reference
|
|
value: ACAAA
|
|
- type: item
|
|
name: 'Net bytes out'
|
|
x: '36'
|
|
width: '36'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FF0000
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Net Bytes Out'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.out
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Network bytes out'
|
|
x: '36'
|
|
'y': '3'
|
|
width: '36'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Network bytes out'
|
|
- type: STRING
|
|
name: reference
|
|
value: ACAAC
|
|
- name: Disk
|
|
display_period: '30'
|
|
widgets:
|
|
- type: item
|
|
name: 'Disk bytes read'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Bytes Read'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.read
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Disk bytes read'
|
|
'y': '3'
|
|
width: '18'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Disk bytes read'
|
|
- type: STRING
|
|
name: reference
|
|
value: ADAAA
|
|
- type: item
|
|
name: 'Disk bytes written'
|
|
x: '18'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Bytes Written'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.written
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Disk bytes written'
|
|
x: '18'
|
|
'y': '3'
|
|
width: '18'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Disk bytes written'
|
|
- type: STRING
|
|
name: reference
|
|
value: ADAAB
|
|
- type: item
|
|
name: 'Disk read i/o'
|
|
x: '36'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Read I/O'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.io.read
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Disk read i/o'
|
|
x: '36'
|
|
'y': '3'
|
|
width: '18'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Disk bytes read I/O'
|
|
- type: STRING
|
|
name: reference
|
|
value: ADAAC
|
|
- type: item
|
|
name: 'Disk write i/o'
|
|
x: '54'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 00D936
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '45'
|
|
- type: STRING
|
|
name: description
|
|
value: 'Disk Write I/O'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.io.write
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '25'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: graph
|
|
name: 'Disk write i/o'
|
|
x: '54'
|
|
'y': '3'
|
|
width: '18'
|
|
height: '8'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Disk bytes write I/O'
|
|
- type: STRING
|
|
name: reference
|
|
value: ADAAD
|
|
- name: 'VNIC In/Out'
|
|
display_period: '30'
|
|
widgets:
|
|
- type: item
|
|
name: 'Total bytes in'
|
|
width: '6'
|
|
height: '11'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FF0000
|
|
- type: INTEGER
|
|
name: decimal_places
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '4'
|
|
- type: STRING
|
|
name: description
|
|
value: Ingress
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_size
|
|
value: '3'
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.in
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '2'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '4'
|
|
- type: graph
|
|
name: 'Network bytes in'
|
|
x: '6'
|
|
width: '30'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Network bytes in'
|
|
- type: STRING
|
|
name: reference
|
|
value: AEAAA
|
|
- type: INTEGER
|
|
name: show_legend
|
|
value: '0'
|
|
- type: graphprototype
|
|
name: 'VNIC bytes in'
|
|
x: '6'
|
|
'y': '3'
|
|
width: '30'
|
|
height: '4'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Network bytes in'
|
|
- type: STRING
|
|
name: reference
|
|
value: AEAAB
|
|
- type: graphprototype
|
|
name: 'VNIC packets in'
|
|
x: '6'
|
|
'y': '7'
|
|
width: '30'
|
|
height: '4'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Network packets in'
|
|
- type: STRING
|
|
name: reference
|
|
value: AEAAC
|
|
- type: item
|
|
name: 'Total bytes out'
|
|
x: '36'
|
|
width: '6'
|
|
height: '11'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: FF0000
|
|
- type: INTEGER
|
|
name: decimal_places
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: decimal_size
|
|
value: '4'
|
|
- type: STRING
|
|
name: description
|
|
value: Egress
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_size
|
|
value: '3'
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.out
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: units_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: units_size
|
|
value: '2'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '4'
|
|
- type: graph
|
|
name: 'Network bytes out'
|
|
x: '42'
|
|
width: '30'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'OCI Compute: Network bytes out'
|
|
- type: STRING
|
|
name: reference
|
|
value: AEAAD
|
|
- type: INTEGER
|
|
name: show_legend
|
|
value: '0'
|
|
- type: graphprototype
|
|
name: 'VNIC bytes out'
|
|
x: '42'
|
|
'y': '3'
|
|
width: '30'
|
|
height: '4'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Network bytes out'
|
|
- type: STRING
|
|
name: reference
|
|
value: AEAAE
|
|
- type: graphprototype
|
|
name: 'VNIC packets out'
|
|
x: '42'
|
|
'y': '7'
|
|
width: '30'
|
|
height: '4'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Network packets out'
|
|
- type: STRING
|
|
name: reference
|
|
value: AEAAF
|
|
- name: 'VNIC Detailed'
|
|
display_period: '30'
|
|
widgets:
|
|
- type: graphprototype
|
|
name: 'Connection tracking table'
|
|
width: '24'
|
|
height: '11'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Network packets dropped by connection tracking table'
|
|
- type: STRING
|
|
name: reference
|
|
value: AFAAA
|
|
- type: graphprototype
|
|
name: 'Security list'
|
|
x: '24'
|
|
width: '24'
|
|
height: '11'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Network packets dropped by security list'
|
|
- type: STRING
|
|
name: reference
|
|
value: AFAAB
|
|
- type: graphprototype
|
|
name: Smartnic
|
|
x: '48'
|
|
width: '24'
|
|
height: '11'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
name: 'VNIC [{#NAME}]: Smartnic buffer drops'
|
|
- type: STRING
|
|
name: reference
|
|
value: AFAAC
|
|
valuemaps:
|
|
- uuid: 9e238671edca4ed7b58eefacc861a77d
|
|
name: 'Compute instance availability'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Available
|
|
- value: '1'
|
|
newvalue: Unavailable
|
|
- uuid: c336821eced54261afb0d10a0de6601d
|
|
name: 'Compute instance state'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: Moving
|
|
- value: '2'
|
|
newvalue: Provisioning
|
|
- value: '3'
|
|
newvalue: Running
|
|
- value: '4'
|
|
newvalue: Starting
|
|
- value: '5'
|
|
newvalue: Stopping
|
|
- value: '6'
|
|
newvalue: Stopped
|
|
- value: '7'
|
|
newvalue: 'Creating image'
|
|
- value: '8'
|
|
newvalue: Terminating
|
|
- value: '9'
|
|
newvalue: Terminated
|
|
- uuid: dce0b4413ede4dbca55f89cbc86736b3
|
|
name: 'Generic Bool'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: 'False'
|
|
- value: '1'
|
|
newvalue: 'True'
|
|
- uuid: 8fdcb86d1dde4d2489239dd61fbd8b08
|
|
name: 'VNIC attachment state'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: Attaching
|
|
- value: '2'
|
|
newvalue: Attached
|
|
- value: '3'
|
|
newvalue: Detaching
|
|
- value: '4'
|
|
newvalue: Detached
|
|
graphs:
|
|
- uuid: 70f0b43207cd4e28bf93e0b41ad45a10
|
|
name: 'OCI Compute: Cpu utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.cpu.util
|
|
- uuid: 944bf71570b549ce8682d3f1beea5c57
|
|
name: 'OCI Compute: Disk bytes read'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.read
|
|
- uuid: 39ece65d2b2b402abee59432cc3a3cea
|
|
name: 'OCI Compute: Disk bytes read I/O'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.io.read
|
|
- uuid: f073ce71549946509fe9f021b3c2d2e9
|
|
name: 'OCI Compute: Disk bytes write I/O'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.io.write
|
|
- uuid: 784735022c1e40fc9cf7d065e95124f3
|
|
name: 'OCI Compute: Disk bytes written'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.disk.written
|
|
- uuid: 9f4a1426c49f47bfade03875a6af0a60
|
|
name: 'OCI Compute: Memory allocation stalls'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.mem.stalls
|
|
- uuid: db9ad56d9e334de0a3ba7f6c3862fb76
|
|
name: 'OCI Compute: Memory utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.mem.util
|
|
- uuid: 609ba54782934bb8b60696588bf57038
|
|
name: 'OCI Compute: Network bytes in'
|
|
graph_items:
|
|
- color: 00D936
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.in
|
|
- uuid: 807729ba0afb4710a33307286d5c027a
|
|
name: 'OCI Compute: Network bytes out'
|
|
graph_items:
|
|
- color: 2196F3
|
|
item:
|
|
host: 'Oracle Cloud Compute by HTTP'
|
|
key: oci.compute.network.out
|