3858 lines
155 KiB
YAML
3858 lines
155 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: e960332b3f6c46a1956486d4f3f99fce
|
|
name: 'Templates/Server hardware'
|
|
templates:
|
|
- uuid: 185867ae9b4a46b59d53931d3330c770
|
|
template: 'DELL PowerEdge R660 by HTTP'
|
|
name: 'DELL PowerEdge R660 by HTTP'
|
|
description: |
|
|
Template for DELL PowerEdge R660 servers with iDRAC 8/9 firmware 4.32 and later and Redfish API enabled.
|
|
|
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/426752-discussion-thread-for-official-zabbix-dell-templates
|
|
|
|
Generated by official Zabbix template tool "Templator"
|
|
vendor:
|
|
name: Zabbix
|
|
version: 7.0-4
|
|
groups:
|
|
- name: 'Templates/Server hardware'
|
|
items:
|
|
- uuid: 0aa82279099d4599acd24f1cf4eccc40
|
|
name: 'Get array controller resources'
|
|
type: SCRIPT
|
|
key: dell.server.array.resources.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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Controller', 'Discovery', params);
|
|
|
|
const controllers = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage?$expand=.($levels=1)'), 'Members');
|
|
|
|
var arrControllerKeys = [
|
|
{
|
|
'name': 'id',
|
|
'path': 'Id'
|
|
},
|
|
{
|
|
'name': 'name',
|
|
'path': 'Name'
|
|
},
|
|
{
|
|
'name': 'health',
|
|
'path': 'Status.Health'
|
|
},
|
|
{
|
|
'name': 'slot',
|
|
'path': 'Oem.Dell.DellController.PCISlot'
|
|
}
|
|
];
|
|
|
|
var battControllerKeys = [
|
|
{
|
|
'name': 'id',
|
|
'path': 'Oem.Dell.DellControllerBattery.Id'
|
|
},
|
|
{
|
|
'name': 'name',
|
|
'path': 'Oem.Dell.DellControllerBattery.Name'
|
|
},
|
|
{
|
|
'name': 'status',
|
|
'path': 'Oem.Dell.DellControllerBattery.PrimaryStatus'
|
|
}
|
|
];
|
|
|
|
if (!Array.isArray(controllers)) {
|
|
throw 'Unexpected type for controllers.';
|
|
}
|
|
|
|
var buffer = { 'arrayControllers': [], 'batteryControllers': [] };
|
|
|
|
controllers.forEach(function (controller) {
|
|
if (controller['Id'].search('RAID') > -1) {
|
|
buffer['arrayControllers'].push(dell.extractData(controller, arrControllerKeys, true));
|
|
buffer['batteryControllers'].push(dell.extractData(controller, battControllerKeys, true));
|
|
}
|
|
});
|
|
|
|
return JSON.stringify(buffer);
|
|
description: 'Returns array controller resources.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 7aa73c13af5a43b6b956362d7e9f2742
|
|
name: 'Get disks'
|
|
type: SCRIPT
|
|
key: dell.server.disks.get
|
|
delay: 1h
|
|
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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Disk', 'Discovery', params);
|
|
|
|
const disks = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage'), 'Members');
|
|
|
|
var keys = [
|
|
{
|
|
'name': 'path',
|
|
'path': '@odata.id'
|
|
},
|
|
{
|
|
'name': 'name',
|
|
'path': 'Name'
|
|
}
|
|
];
|
|
|
|
if (!Array.isArray(disks)) {
|
|
throw 'Unexpected type for disks.';
|
|
}
|
|
|
|
var buffer = { 'physicalDisks': [], 'virtualDisks': [] };
|
|
|
|
disks.forEach(function (disk) {
|
|
var requests = [{ 'usage': 'physicalDisks', 'path': '', 'target': 'Drives' }, { 'usage': 'virtualDisks', 'path': '/Volumes', 'target': 'Members' }];
|
|
|
|
requests.forEach(function (request) {
|
|
const disks = dell.extractData(dell.executeRequest(disk['@odata.id'] + request['path']), request['target']);
|
|
|
|
if (!Array.isArray(disks) || disks.length <= 0) {
|
|
return;
|
|
}
|
|
|
|
disks.forEach(function (drive) {
|
|
buffer[request['usage']].push(dell.extractData(dell.executeRequest(drive['@odata.id']), keys));
|
|
});
|
|
});
|
|
});
|
|
|
|
return JSON.stringify(buffer);
|
|
description: 'Returns storage resources.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 103aad19a3374c3ca5817a6f9e3b5401
|
|
name: 'Firmware version'
|
|
type: DEPENDENT
|
|
key: dell.server.hw.firmware
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'This attribute defines the firmware version of a remote access card.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.firmware
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: dell.server.system.get
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
triggers:
|
|
- uuid: e6688a178fab46d59cc685a223767a12
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.firmware,#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.hw.firmware,#2) and length(last(/DELL PowerEdge R660 by HTTP/dell.server.hw.firmware))>0'
|
|
name: 'Dell R660: Firmware has changed'
|
|
opdata: 'Current value: {ITEM.LASTVALUE1}'
|
|
priority: INFO
|
|
description: 'The firmware version has changed. Acknowledge to close the problem manually.'
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
- uuid: 1c77ed3fe70441228cd99475c70bf61e
|
|
name: 'Hardware model name'
|
|
type: DEPENDENT
|
|
key: dell.server.hw.model
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'This attribute defines the model name of the system.'
|
|
inventory_link: MODEL
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.model
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: dell.server.system.get
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: c87090e7bc7443e7ac8ec75e5ae8a549
|
|
name: 'Hardware serial number'
|
|
type: DEPENDENT
|
|
key: dell.server.hw.serialnumber
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'This attribute defines the service tag of the system.'
|
|
inventory_link: SERIALNO_A
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.serialnumber
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: dell.server.system.get
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
triggers:
|
|
- uuid: 62ece039dea440c7999f0b93bc32c40a
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.serialnumber,#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.hw.serialnumber,#2) and length(last(/DELL PowerEdge R660 by HTTP/dell.server.hw.serialnumber))>0'
|
|
name: 'Dell R660: Device has been replaced'
|
|
event_name: 'Dell R660: Device has been replaced (new serial number received)'
|
|
priority: INFO
|
|
description: 'The device serial number has changed. Acknowledge to close the problem manually.'
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
- uuid: 02e6c6db566f42aaab92e0fbc634e37c
|
|
name: 'Get network interfaces'
|
|
type: SCRIPT
|
|
key: dell.server.net.iface.get
|
|
delay: 1h
|
|
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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Network Interface', 'Discovery', params);
|
|
|
|
const netAdapters = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters'), 'Members');
|
|
|
|
var keys = [
|
|
{
|
|
'name': 'path',
|
|
'path': '@odata.id'
|
|
},
|
|
{
|
|
'name': 'id',
|
|
'path': 'Id'
|
|
}
|
|
];
|
|
|
|
if (!Array.isArray(netAdapters)) {
|
|
throw 'Unexpected type for network adapters.';
|
|
}
|
|
|
|
var buffer = [];
|
|
|
|
netAdapters.forEach(function (netAdapter) {
|
|
const netPorts = dell.extractData(dell.executeRequest(netAdapter["@odata.id"] + '/NetworkPorts'), 'Members');
|
|
|
|
if (!Array.isArray(netPorts)) {
|
|
return;
|
|
}
|
|
|
|
netPorts.forEach(function (netPort) {
|
|
buffer.push(dell.extractData(dell.executeRequest(netPort["@odata.id"]), keys));
|
|
})
|
|
|
|
});
|
|
|
|
return JSON.stringify(buffer);
|
|
description: 'Returns network interfaces.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 228fc2bc5dc94052bb1eba79756e040f
|
|
name: 'Get sensors'
|
|
type: SCRIPT
|
|
key: dell.server.sensors.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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
function formatPSU(psuObj) {
|
|
var foundPowerSupplies = [],
|
|
buffer = [];
|
|
|
|
psuObj.forEach(function (obj) {
|
|
const psuName = obj['name'].split(' ')[0];
|
|
|
|
if (foundPowerSupplies.indexOf(psuName) === -1) {
|
|
foundPowerSupplies.push(psuName);
|
|
buffer.push({
|
|
'name': psuName,
|
|
[obj['type'].toLowerCase()]: {'reading': obj['reading'], 'health': obj['health']}
|
|
});
|
|
} else {
|
|
buffer.forEach(function (bufferObj) {
|
|
|
|
if (bufferObj['name'] === psuName) {
|
|
bufferObj[obj['type'].toLowerCase()] = {'reading': obj['reading'], 'health': obj['health']};
|
|
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
})
|
|
return buffer;
|
|
};
|
|
|
|
function formatTemp(tempObj) {
|
|
tempObj.forEach(function (obj) {
|
|
obj.name = obj.name.split(' ').slice(0, -1).join(' ');
|
|
});
|
|
|
|
return tempObj;
|
|
}
|
|
|
|
function formatSysBoard(sysObj) {
|
|
const remove = ['System', 'Board', 'Usage'];
|
|
|
|
sysObj.forEach(function (obj) {
|
|
var buffer = [];
|
|
|
|
obj['name'].split(' ').forEach(function (word) {
|
|
var match = false;
|
|
|
|
remove.forEach(function (removeWord) {
|
|
if (removeWord === word) {
|
|
match = true;
|
|
}
|
|
});
|
|
|
|
if (!match) {
|
|
buffer.push(word);
|
|
}
|
|
});
|
|
|
|
if (buffer.length > 0) {
|
|
obj['name'] = buffer.join(' ');
|
|
}
|
|
});
|
|
|
|
return sysObj;
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Sensor', 'Discovery', params);
|
|
|
|
const sensors = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/Sensors?$expand=.($levels=1)'), 'Members');
|
|
|
|
if (!Array.isArray(sensors)) {
|
|
throw 'Unexpected type for sensors.';
|
|
}
|
|
|
|
const keys = [
|
|
{
|
|
'name': 'id',
|
|
'path': 'Id'
|
|
},
|
|
{
|
|
'name': 'name',
|
|
'path': 'Name'
|
|
},
|
|
{
|
|
'name': 'context',
|
|
'path': 'PhysicalContext'
|
|
},
|
|
{
|
|
'name': 'reading',
|
|
'path': 'Reading'
|
|
},
|
|
{
|
|
'name': 'type',
|
|
'path': 'ReadingType'
|
|
},
|
|
{
|
|
'name': 'health',
|
|
'path': 'Status.Health'
|
|
}
|
|
];
|
|
|
|
var buffer = { 'fan': [], 'psu': [], 'temperature': [], 'sysBoard': [] };
|
|
|
|
sensors.forEach(function (sensor) {
|
|
if (sensor['Name'].substring(0, 2) === 'PS' && sensor['PhysicalContext'] === 'PowerSupply') {
|
|
buffer['psu'].push(dell.extractData(sensor, keys, true));
|
|
} else if (sensor['ReadingType'] === 'Temperature') {
|
|
buffer['temperature'].push(dell.extractData(sensor, keys, true));
|
|
} else if (sensor['Name'].includes('Fan') && sensor['ReadingType'] === 'Rotational') {
|
|
buffer['fan'].push(dell.extractData(sensor, keys, true));
|
|
} else if (sensor['Name'].includes('System Board') && sensor['ReadingType'] === 'Percent') {
|
|
buffer['sysBoard'].push(dell.extractData(sensor, keys, true));
|
|
}
|
|
});
|
|
|
|
buffer['psu'] = formatPSU(buffer['psu']);
|
|
buffer['temperature'] = formatTemp(buffer['temperature']);
|
|
buffer['sysBoard'] = formatSysBoard(buffer['sysBoard']);
|
|
|
|
return JSON.stringify(buffer);
|
|
description: 'Returns sensors.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: fe81d663497d402c81b1e26fe4ea507e
|
|
name: 'Overall system health status'
|
|
type: DEPENDENT
|
|
key: dell.server.status
|
|
delay: '0'
|
|
trends: '0'
|
|
description: 'This attribute defines the overall rollup status of all the components in the system monitored by the remote access card. Includes system, storage, IO devices, iDRAC, CPU, memory, etc.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.status
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: dell.server.system.get
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
- tag: component
|
|
value: system
|
|
triggers:
|
|
- uuid: 2ccd53402fea446283e24ebfe5b32bdd
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.status,)=3'
|
|
name: 'Dell R660: Server is in a critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: d9c93ee01d284b319cdc1acc6919b834
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.status,)=2'
|
|
name: 'Dell R660: Server is in a warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Server is in a critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.status,)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: c264044dde3241089e003ea431cf98f2
|
|
name: 'Get system'
|
|
type: SCRIPT
|
|
key: dell.server.system.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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('System', 'Get system metrics', params);
|
|
|
|
const requests = [
|
|
{
|
|
'path': '/redfish/v1/Systems/System.Embedded.1',
|
|
'keys': [
|
|
{
|
|
'name': 'model',
|
|
'path': 'Model'
|
|
},
|
|
{
|
|
'name': 'serialnumber',
|
|
'path': 'Oem.Dell.DellSystem.ChassisServiceTag'
|
|
},
|
|
{
|
|
'name': 'status',
|
|
'path': 'Status.Health'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'path': '/redfish/v1/Managers/iDRAC.Embedded.1',
|
|
'keys': {
|
|
'name': 'firmware',
|
|
'path': 'FirmwareVersion'
|
|
}
|
|
}
|
|
];
|
|
|
|
var buffer = {};
|
|
|
|
for (var i = 0, requestsCount = requests.length; i < requestsCount; i++) {
|
|
Object.assign(buffer, dell.extractData(dell.executeRequest(requests[i].path), requests[i].keys));
|
|
}
|
|
|
|
return JSON.stringify(buffer);
|
|
description: 'Returns system metrics.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 0e1f349ff3804a99a1f274134d9a7fb8
|
|
name: 'CPU utilization, in %'
|
|
type: DEPENDENT
|
|
key: dell.server.util.cpu
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'CPU utilization.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.sysBoard[?(@.id == "SystemBoardCPUUsage")].reading.first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
triggers:
|
|
- uuid: d342f09969114891ae47b50e6e03aa80
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.WARN}'
|
|
name: 'Dell R660: CPU utilization is high'
|
|
event_name: 'Dell R660: Current CPU utilization is high (util >= {$DELL.HTTP.CPU.UTIL.WARN}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.WARN}`%.'
|
|
dependencies:
|
|
- name: 'Dell R660: CPU utilization is too high'
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 7e5960ded30e450a89a153ef1612b03e
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
|
|
name: 'Dell R660: CPU utilization is too high'
|
|
event_name: 'Dell R660: Current CPU utilization is too high (util >= {$DELL.HTTP.CPU.UTIL.HIGH}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.HIGH}`%.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 8ba22cb80bd94ee4a92364b7efa1aaea
|
|
name: 'IO utilization, in %'
|
|
type: DEPENDENT
|
|
key: dell.server.util.io
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'IO utilization.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.sysBoard[?(@.id == "SystemBoardIOUsage")].reading.first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: io
|
|
triggers:
|
|
- uuid: 1fe2219883964e9d9db2fbc83a62f854
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.WARN}'
|
|
name: 'Dell R660: IO utilization is high'
|
|
event_name: 'Dell R660: Current IO utilization is high (util >= {$DELL.HTTP.IO.UTIL.WARN}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.WARN}`%.'
|
|
dependencies:
|
|
- name: 'Dell R660: IO utilization is too high'
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: eab83e0592ec4de7b219ae8a7e9eb54c
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
|
|
name: 'Dell R660: IO utilization is too high'
|
|
event_name: 'Dell R660: Current IO utilization is too high (util >= {$DELL.HTTP.IO.UTIL.HIGH}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.HIGH}`%.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 61370ae82d474daa961494bb3c7dc0f2
|
|
name: 'Memory utilization, in %'
|
|
type: DEPENDENT
|
|
key: dell.server.util.mem
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'Memory utilization.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.sysBoard[?(@.id == "SystemBoardMEMUsage")].reading.first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
triggers:
|
|
- uuid: 9f3501907030474580f28cbd602eb951
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.WARN}'
|
|
name: 'Dell R660: Memory utilization is high'
|
|
event_name: 'Dell R660: Current memory utilization is high (util >= {$DELL.HTTP.MEM.UTIL.WARN}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.WARN}`%.'
|
|
dependencies:
|
|
- name: 'Dell R660: Memory utilization is too high'
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 886fcdda4b7847fb9364d6c2f807641e
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
|
|
name: 'Dell R660: Memory utilization is too high'
|
|
event_name: 'Dell R660: Current memory utilization is too high (util >= {$DELL.HTTP.MEM.UTIL.HIGH}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.HIGH}`%.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: ae4ad90d5a8e437d940888d64554805f
|
|
name: 'SYS utilization, in %'
|
|
type: DEPENDENT
|
|
key: dell.server.util.sys
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'SYS utilization.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.sysBoard[?(@.id == "SystemBoardSYSUsage")].reading.first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: sys
|
|
triggers:
|
|
- uuid: b9d668629940497dbf06e212f297dc2a
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.WARN}'
|
|
name: 'Dell R660: SYS utilization is high'
|
|
event_name: 'Dell R660: Current SYS utilization is high (util >= {$DELL.HTTP.SYS.UTIL.WARN}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.WARN}`%.'
|
|
dependencies:
|
|
- name: 'Dell R660: IO utilization is too high'
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: be2e13c07a894816b6566101e31d017b
|
|
expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.HIGH}'
|
|
name: 'Dell R660: SYS utilization is too high'
|
|
event_name: 'Dell R660: Current SYS utilization is too high (util >= {$DELL.HTTP.SYS.UTIL.HIGH}%)'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.HIGH}`%.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 9ba8445ce392429a81191dbaffbaa919
|
|
name: 'Redfish API status'
|
|
type: SIMPLE
|
|
key: 'net.tcp.service[https]'
|
|
description: |
|
|
Availability of Redfish API on the server.
|
|
Possible values:
|
|
0 - Unavailable
|
|
1 - Available
|
|
valuemap:
|
|
name: 'Redfish API availability'
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
- tag: component
|
|
value: system
|
|
triggers:
|
|
- uuid: 28d07a7c2c914523b40d46bc8a19764a
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/net.tcp.service[https])=0'
|
|
name: 'Dell R660: Redfish API service is unavailable'
|
|
priority: HIGH
|
|
description: 'The service is unavailable or does not accept TCP connections.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
discovery_rules:
|
|
- uuid: 92a3b71de182481ba3add9cc77badf67
|
|
name: 'Array controller discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.array.discovery
|
|
delay: '0'
|
|
description: 'Discovery of disk array controllers.'
|
|
item_prototypes:
|
|
- uuid: 444a2f831e374f809f012d19e9ffb8fa
|
|
name: 'Controller [{#CNTLR_NAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.array.status[{#ID}]'
|
|
delay: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.arrayControllers[?(@.id == "{#ID}")].health.first()'
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: dell.server.array.resources.get
|
|
tags:
|
|
- tag: component
|
|
value: diskarray
|
|
- tag: component
|
|
value: storage
|
|
trigger_prototypes:
|
|
- uuid: 61c75f4620e04c268abfa84f8dd0de95
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.array.status[{#ID}],)=3'
|
|
name: 'Dell R660: Controller [{#CNTLR_NAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 5b2ce324b7ed499eb7b0ccaba5132cfa
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.array.status[{#ID}],)=2'
|
|
name: 'Dell R660: Controller [{#CNTLR_NAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Controller [{#CNTLR_NAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.array.status[{#ID}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
master_item:
|
|
key: dell.server.array.resources.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#CNTLR_NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#ID}'
|
|
path: $.id
|
|
- lld_macro: '{#SLOT}'
|
|
path: $.slot
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.arrayControllers
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: 038a5de592cd489d9e71de906ddb8d10
|
|
name: 'Battery discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.controller.battery.discovery
|
|
delay: '0'
|
|
description: 'Discovery of battery controllers.'
|
|
item_prototypes:
|
|
- uuid: cd2bad7a386a4a2dbcbc5ce1921aaa09
|
|
name: 'Battery [{#BATTERY_NAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.controller.battery.status[{#ID}]'
|
|
delay: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.batteryControllers[?(@.id == "{#ID}")].status.first()'
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: dell.server.array.resources.get
|
|
tags:
|
|
- tag: component
|
|
value: battery
|
|
- tag: component
|
|
value: diskarray
|
|
trigger_prototypes:
|
|
- uuid: 24fe81eeb566444a9d97bd69b86a8929
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
|
|
name: 'Dell R660: Battery [{#BATTERY_NAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 5ca151f6f35b4dc6994f48ea3828f720
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.controller.battery.status[{#ID}],)=2'
|
|
name: 'Dell R660: Battery [{#BATTERY_NAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Battery [{#BATTERY_NAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
master_item:
|
|
key: dell.server.array.resources.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#BATTERY_NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#ID}'
|
|
path: $.id
|
|
- lld_macro: '{#ODATA}'
|
|
path: $.path
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.batteryControllers
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: e08b684570894b20b5f2b7978bbdc6cc
|
|
name: 'FAN discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.fan.discovery
|
|
delay: '0'
|
|
description: 'Discovery of FAN sensors.'
|
|
item_prototypes:
|
|
- uuid: be494eecb65644b080bcc896503035e7
|
|
name: 'Fan [{#SENSOR_NAME}]: Get sensor'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'Returns the metrics of a sensor.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.fan.[?(@.id == ''{#ID}'')].first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: fan
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 5704a3a505db486a806b52af48f48921
|
|
name: 'Fan [{#SENSOR_NAME}]: Speed'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
units: '!rpm'
|
|
description: 'Sensor value.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.reading
|
|
master_item:
|
|
key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: fan
|
|
- uuid: 3bcd23e100f54b1684667755be3cd9d0
|
|
name: 'Fan [{#SENSOR_NAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.fan.status[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: fan
|
|
trigger_prototypes:
|
|
- uuid: 5b1c3844e374460799c186bbdfb57c4a
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
|
|
name: 'Dell R660: Fan [{#SENSOR_NAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 1d868e86dbf24639a90562a8e2adaa6f
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=2'
|
|
name: 'Dell R660: Fan [{#SENSOR_NAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Fan [{#SENSOR_NAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
graph_prototypes:
|
|
- uuid: 035fa59950af4f0caf91f4de59189ed5
|
|
name: 'Dell R660: Fan [{#SENSOR_NAME}]: Speed'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#ID}'
|
|
path: $.id
|
|
- lld_macro: '{#SENSOR_NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#TYPE}'
|
|
path: $.type
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.fan
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: 2c726d35378a4eeba24d23e9cb8f7de4
|
|
name: 'Network interface discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.net.if.discovery
|
|
delay: '0'
|
|
description: 'Discovery of network interfaces.'
|
|
item_prototypes:
|
|
- uuid: c644bf0a447c4067bb4106860d98f813
|
|
name: 'Interface [{#IFNAME}]: Get interface'
|
|
type: SCRIPT
|
|
key: 'dell.server.net.if.get[{#IFNAME}]'
|
|
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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Network Interface', 'Get metrics', params);
|
|
|
|
const keys = [
|
|
{
|
|
'name': 'linkStatus',
|
|
'path': 'LinkStatus'
|
|
},
|
|
{
|
|
'name': 'health',
|
|
'path': 'Status.Health'
|
|
},
|
|
{
|
|
'name': 'state',
|
|
'path': 'Status.State'
|
|
},
|
|
{
|
|
'name': 'linkSpeed',
|
|
'path': 'CurrentLinkSpeedMbps'
|
|
}
|
|
];
|
|
|
|
return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
|
|
description: 'Returns the metrics of a network interface.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: path
|
|
value: '{#ODATA}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- tag: component
|
|
value: raw
|
|
- uuid: b72384586f1e472ba4d286281523a430
|
|
name: 'Interface [{#IFNAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.net.if.health[{#IFNAME}]'
|
|
delay: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.net.if.get[{#IFNAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
trigger_prototypes:
|
|
- uuid: 73c7ef1f002141a8abe53562d2d711ab
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
|
|
name: 'Dell R660: Interface [{#IFNAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 6afa44a6dfdc42129f40405ef2749d84
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.health[{#IFNAME}],)=2'
|
|
name: 'Dell R660: Interface [{#IFNAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Interface [{#IFNAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: ef78ffb8dbfa4aa7b8d75ee67d0b6232
|
|
name: 'Interface [{#IFNAME}]: Speed'
|
|
type: DEPENDENT
|
|
key: 'dell.server.net.if.speed[{#IFNAME}]'
|
|
delay: '0'
|
|
units: bps
|
|
description: 'The network port current link speed.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.linkSpeed
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '1000000'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.net.if.get[{#IFNAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: d04f33b61a5b4fd6acdc89fe89e8d9f6
|
|
name: 'Interface [{#IFNAME}]: State'
|
|
type: DEPENDENT
|
|
key: 'dell.server.net.if.state[{#IFNAME}]'
|
|
delay: '0'
|
|
description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
|
|
valuemap:
|
|
name: 'Redfish status state'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.state
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'Enabled': 1,
|
|
'Disabled': 2,
|
|
'Absent': 3,
|
|
'Deferring': 4,
|
|
'InTest': 5,
|
|
'Quiesced': 6,
|
|
'StandbyOffline': 7,
|
|
'StandbySpare': 8,
|
|
'Starting': 9,
|
|
'UnavailableOffline': 10,
|
|
'Updating': 11
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.net.if.get[{#IFNAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 4b82f4e9ec27404e8340a9bff4dd54c9
|
|
name: 'Interface [{#IFNAME}]: Link status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.net.if.status[{#IFNAME}]'
|
|
delay: '0'
|
|
description: 'The status of the link between this port and its link partner. Possible values: Down, Up, null.'
|
|
valuemap:
|
|
name: 'Network interface status'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.linkStatus
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'null': 1,
|
|
'Down': 2,
|
|
'Up': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.net.if.get[{#IFNAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
trigger_prototypes:
|
|
- uuid: a0b08d93fbf042bda4cb17db3bfb8205
|
|
expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)=2 and last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
|
|
recovery_mode: RECOVERY_EXPRESSION
|
|
recovery_expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)=3 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
|
|
name: 'Dell R660: Interface [{#IFNAME}]: Link down'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: |
|
|
This trigger expression works as follows:
|
|
1. It can be triggered if the operations status is Down (2).
|
|
2. `{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1` - a user can redefine the context macro to "0", marking this interface as not important. No new trigger will be fired if this interface is Down (2).
|
|
3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "eternal off" interfaces).
|
|
|
|
WARNING: if closed manually - it will not fire again on the next poll because of `.diff`.
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 1f1be4634d7344679afb26ecbab3955c
|
|
expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)<2 and last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
|
|
recovery_mode: RECOVERY_EXPRESSION
|
|
recovery_expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)>=2 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
|
|
name: 'Dell R660: Interface [{#IFNAME}]: Link status issue'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: |
|
|
This trigger expression works as follows:
|
|
1. It can be triggered if the operations status is Null (1) or Unknown (0).
|
|
2. `{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1` - a user can redefine the context macro to "0", marking this interface as not important. No new trigger will be fired if this interface is Null (1) or Unknown (0).
|
|
3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "eternal off" interfaces.)
|
|
|
|
WARNING: if closed manually - it will not fire again on the next poll because of `.diff`.
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
graph_prototypes:
|
|
- uuid: 461971c0e09446a5ae341bfc40dec119
|
|
name: 'Dell R660: Interface [{#IFNAME}]: Speed'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.net.if.speed[{#IFNAME}]'
|
|
master_item:
|
|
key: dell.server.net.iface.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#IFNAME}'
|
|
path: $.id
|
|
- lld_macro: '{#ODATA}'
|
|
path: $.path
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: 5f0b95a603074c96aafb395f6aedd873
|
|
name: 'Physical disk discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.physicaldisk.discovery
|
|
delay: '0'
|
|
description: 'Discovery of physical disks.'
|
|
item_prototypes:
|
|
- uuid: d1e4d411743040d3892769aa63e18b7f
|
|
name: 'Physical disk [{#DISK_NAME}]: Get disk'
|
|
type: SCRIPT
|
|
key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
|
|
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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Disk', 'Get physical disk metrics', params);
|
|
|
|
const keys = [
|
|
{
|
|
'name': 'health',
|
|
'path': 'Status.Health'
|
|
},
|
|
{
|
|
'name': 'sn',
|
|
'path': 'SerialNumber'
|
|
},
|
|
{
|
|
'name': 'model',
|
|
'path': 'Model'
|
|
},
|
|
{
|
|
'name': 'mediaType',
|
|
'path': 'MediaType'
|
|
},
|
|
{
|
|
'name': 'capacity',
|
|
'path': 'CapacityBytes'
|
|
}
|
|
];
|
|
|
|
return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
|
|
description: 'Returns the metrics of a physical disk.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: path
|
|
value: '{#ODATA}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: physicaldisk
|
|
- tag: component
|
|
value: raw
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 112cb35eb86748fc84fbc42cb2f27a68
|
|
name: 'Physical disk [{#DISK_NAME}]: Media type'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.physicaldisk.media_type[{#DISK_NAME}]'
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'The type of media contained in this drive. Possible values: HDD, SSD, SMR, null.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.mediaType
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: physicaldisk
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 4bd6ed5e76e84b11b8819fa000ed4e34
|
|
name: 'Physical disk [{#DISK_NAME}]: Model name'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.physicaldisk.model[{#DISK_NAME}]'
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'The model number of the drive.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.model
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: physicaldisk
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 36243c8fa1ad4bb6b2a3f8f1ad8ceb99
|
|
name: 'Physical disk [{#DISK_NAME}]: Serial number'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]'
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'The serial number of this drive.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.sn
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: physicaldisk
|
|
- tag: component
|
|
value: storage
|
|
trigger_prototypes:
|
|
- uuid: bbe632a29504433791396747fd2b997c
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#2) and length(last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]))>0'
|
|
name: 'Dell R660: Physical disk [{#DISK_NAME}] has been replaced'
|
|
event_name: 'Dell R660: [{#DISK_NAME}] has been replaced (new serial number received)'
|
|
priority: INFO
|
|
description: '[{#DISK_NAME}] serial number has changed. Acknowledge to close the problem manually.'
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
- uuid: 66eef724488c40f0b9c45c394245c29f
|
|
name: 'Physical disk [{#DISK_NAME}]: Size'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
units: B
|
|
description: 'The size, in bytes, of this drive.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.capacity
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: physicaldisk
|
|
- tag: component
|
|
value: storage
|
|
- uuid: a2a221a5606744a883c2a914c32e8733
|
|
name: 'Physical disk [{#DISK_NAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.physicaldisk.status[{#DISK_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: physicaldisk
|
|
- tag: component
|
|
value: storage
|
|
trigger_prototypes:
|
|
- uuid: f890c971cddc4c16a64bd35b716f9299
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
|
|
name: 'Dell R660: Physical disk [{#DISK_NAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: e87e58bbb41d40e39f1d1fae29fd9e4d
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=2'
|
|
name: 'Dell R660: Physical disk [{#DISK_NAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Physical disk [{#DISK_NAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
graph_prototypes:
|
|
- uuid: e8963658181440d9b9fd711103ea7a89
|
|
name: 'Dell R660: Physical disk [{#DISK_NAME}]: Size'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
|
|
master_item:
|
|
key: dell.server.disks.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#DISK_NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#ODATA}'
|
|
path: $.path
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.physicalDisks
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: fa352e43355843d08901b70ade3a6926
|
|
name: 'PSU discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.psu.discovery
|
|
delay: '0'
|
|
description: 'Discovery of PSU sensors.'
|
|
item_prototypes:
|
|
- uuid: 575743aaeed14887b744111150773833
|
|
name: 'Power supply [{#SENSOR_NAME}]: Current sensor status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.psu.current.status[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.current.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: psu
|
|
trigger_prototypes:
|
|
- uuid: a6b73b5c3bf74966b62044b9e0c6a269
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
|
|
name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 94f3feb429f346e89194533627a63a1c
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=2'
|
|
name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current sensor: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 855af0a279b840caad6283cb9b9e3a2f
|
|
name: 'Power supply [{#SENSOR_NAME}]: Current'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: A
|
|
description: 'Sensor value.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.current.reading
|
|
master_item:
|
|
key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: current
|
|
- tag: component
|
|
value: psu
|
|
- uuid: 0d563e9d3f1546ccb0a56afd0627c5ce
|
|
name: 'Power supply [{#SENSOR_NAME}]: Get sensor'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'Returns the metrics of a sensor.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.psu.[?(@.name == ''{#SENSOR_NAME}'')].first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: psu
|
|
- tag: component
|
|
value: raw
|
|
- uuid: d480ce48057e4515827b02ed73e1bc2f
|
|
name: 'Power supply [{#SENSOR_NAME}]: Voltage sensor status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.voltage.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: psu
|
|
trigger_prototypes:
|
|
- uuid: 84715b0fca5348efb6b7e94f917d090f
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
|
|
name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 2dcf0f63718a48d1a7e194c5c4c47c83
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=2'
|
|
name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage sensor: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 5ec65db57336463f87efc6c479dcdae9
|
|
name: 'Power supply [{#SENSOR_NAME}]: Voltage'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: V
|
|
description: 'Sensor value.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.voltage.reading
|
|
master_item:
|
|
key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: psu
|
|
- tag: component
|
|
value: voltage
|
|
graph_prototypes:
|
|
- uuid: 4675b21a22ed4da6a018670f88fe06a2
|
|
name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
|
|
- uuid: 18e119c61b284952890d3168aeba7e09
|
|
name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#SENSOR_NAME}'
|
|
path: $.name
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.psu
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: 212a1244a4f14afbbea66a06e3ff023f
|
|
name: 'Temperature discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.temp.discovery
|
|
delay: '0'
|
|
description: 'Discovery of temperature sensors.'
|
|
item_prototypes:
|
|
- uuid: 3a43f6fa64e046e79d510e0d2eb00403
|
|
name: 'Probe [{#SENSOR_NAME}]: Get sensor'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'Returns the metrics of a sensor.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.temperature.[?(@.id == ''{#ID}'')].first()'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- tag: component
|
|
value: temperature
|
|
- uuid: 9a02c56447bf46138515a4964e859ae0
|
|
name: 'Probe [{#SENSOR_NAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.temp.status[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: temperature
|
|
trigger_prototypes:
|
|
- uuid: 004befed6db74f798e45e487809773dc
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
|
|
name: 'Dell R660: Probe [{#SENSOR_NAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: bd72de9242054f7e890424c4ef8401ac
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=2'
|
|
name: 'Dell R660: Probe [{#SENSOR_NAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Probe [{#SENSOR_NAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: d9fb53a40fb141a3b480776dae81ca58
|
|
name: 'Probe [{#SENSOR_NAME}]: Value'
|
|
type: DEPENDENT
|
|
key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: °C
|
|
description: 'Sensor value.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.reading
|
|
master_item:
|
|
key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: temperature
|
|
graph_prototypes:
|
|
- uuid: d30bc3325ef2458a8381ea06ede80762
|
|
name: 'Dell R660: Probe [{#SENSOR_NAME}]: Value'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
|
|
master_item:
|
|
key: dell.server.sensors.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#ID}'
|
|
path: $.id
|
|
- lld_macro: '{#SENSOR_NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#TYPE}'
|
|
path: $.type
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.temperature
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
- uuid: 2638370591cd401e9738db1f11329ce6
|
|
name: 'Virtual disk discovery'
|
|
type: DEPENDENT
|
|
key: dell.server.virtualdisk.discovery
|
|
delay: '0'
|
|
description: 'Discovery of virtual disks.'
|
|
item_prototypes:
|
|
- uuid: 2d70a9fc34e84fb4b57025fa47eabde8
|
|
name: 'Virtual disk [{#DISK_NAME}]: Get disk'
|
|
type: SCRIPT
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
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 Dell(service, action, params) {
|
|
this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
|
|
this.tls = new CTlsConfig(params.tls_verify);
|
|
this.tls.checkURL(params['url']);
|
|
this.request = new HttpRequest(this.tls.options);
|
|
|
|
this.executeRequest = function (apiPath) {
|
|
this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
|
|
|
|
if (params['http_proxy']) {
|
|
this.request.setProxy(params['http_proxy']);
|
|
Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
|
|
}
|
|
|
|
const response = this.request.get(params['url'] + apiPath);
|
|
|
|
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 (data, keys, skipParse) {
|
|
if (!skipParse) {
|
|
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 (Array.isArray(keys)) {
|
|
var returnBuffer = {};
|
|
|
|
for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
|
|
if (keys[keyIdx]['path'] === '@odata.id') {
|
|
returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
|
|
} else {
|
|
returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
|
|
}
|
|
}
|
|
|
|
return returnBuffer;
|
|
} else if (typeof keys === 'object') {
|
|
return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
|
|
} else if (typeof keys === 'string') {
|
|
return this.parseJSON(data, keys.split('.'));
|
|
} else {
|
|
throw 'Unexpected key type';
|
|
}
|
|
};
|
|
|
|
this.parseJSON = function (data, jsonPath) {
|
|
for (var i = 0, args = jsonPath.length; i < args; i++) {
|
|
data = data[jsonPath[i]];
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
const params = JSON.parse(value);
|
|
|
|
validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
|
|
var dell = new Dell('Disk', 'Get virtual disk metrics', params);
|
|
|
|
const keys = [
|
|
{
|
|
'name': 'health',
|
|
'path': 'Status.Health'
|
|
},
|
|
{
|
|
'name': 'capacity',
|
|
'path': 'CapacityBytes'
|
|
},
|
|
{
|
|
'name': 'status',
|
|
'path': 'Status.State'
|
|
},
|
|
{
|
|
'name': 'raidStatus',
|
|
'path': 'Oem.Dell.DellVirtualDisk.RaidStatus'
|
|
},
|
|
{
|
|
'name': 'readCachePolicy',
|
|
'path': 'Oem.Dell.DellVirtualDisk.ReadCachePolicy'
|
|
},
|
|
{
|
|
'name': 'writeCachePolicy',
|
|
'path': 'Oem.Dell.DellVirtualDisk.WriteCachePolicy'
|
|
}
|
|
];
|
|
|
|
return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
|
|
description: 'Returns the metrics of a virtual disk.'
|
|
timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
parameters:
|
|
- name: http_proxy
|
|
value: '{$DELL.HTTP.PROXY}'
|
|
- name: http_status_code
|
|
value: '{$DELL.HTTP.RETURN.CODE.OK}'
|
|
- name: password
|
|
value: '{$DELL.HTTP.API.PASSWORD}'
|
|
- name: path
|
|
value: '{#ODATA}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"DELL PowerEdge"}'
|
|
- name: url
|
|
value: '{$DELL.HTTP.API.URL}'
|
|
- name: user
|
|
value: '{$DELL.HTTP.API.USER}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- tag: component
|
|
value: virtualdisk
|
|
- uuid: 28fc2dc811fd49198516c48e65a8cf94
|
|
name: 'Virtual disk [{#DISK_NAME}]: RAID status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}]'
|
|
delay: '0'
|
|
description: 'This property represents the RAID specific status. Possible values: Blocked, Degraded, Failed, Foreign, Offline, Online, Ready, Unknown, null.'
|
|
valuemap:
|
|
name: 'Virtual disk RAID status'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.raidStatus
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'Blocked': 1,
|
|
'Degraded': 2,
|
|
'Failed': 3,
|
|
'Foreign': 4,
|
|
'Offline': 5,
|
|
'Unknown': 6,
|
|
'null': 7,
|
|
'Ready': 8,
|
|
'Online': 9,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- tag: component
|
|
value: virtualdisk
|
|
trigger_prototypes:
|
|
- uuid: 5669738f4dcc4cf892f2474227b52c26
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}],)<8'
|
|
name: 'Dell R660: Virtual disk [{#DISK_NAME}]: RAID status not OK'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the disk for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: a4a0c80a539741c9aa1ebe2623cb61cf
|
|
name: 'Virtual disk [{#DISK_NAME}]: Read policy'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.virtualdisk.read_policy[{#DISK_NAME}]'
|
|
delay: '0'
|
|
description: 'Indicates the read cache policy setting for the Volume. Possible values: ReadAhead, NoReadAhead, AdaptiveReadAhead.'
|
|
valuemap:
|
|
name: 'Virtual disk read policy'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.readCachePolicy
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'NoReadAhead': 1,
|
|
'ReadAhead': 2,
|
|
'AdaptiveReadAhead': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- tag: component
|
|
value: virtualdisk
|
|
- uuid: 375e1eff18f84210975e8726632eed75
|
|
name: 'Virtual disk [{#DISK_NAME}]: Size'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
|
|
delay: '0'
|
|
trends: '0'
|
|
units: B
|
|
description: 'The size in bytes of this Volume.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.capacity
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- tag: component
|
|
value: virtualdisk
|
|
- uuid: 6d638199503a4287adbbbdcbe9c68152
|
|
name: 'Virtual disk [{#DISK_NAME}]: Current state'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.virtualdisk.state[{#DISK_NAME}]'
|
|
delay: '0'
|
|
description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
|
|
valuemap:
|
|
name: 'Redfish status state'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.status
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'Enabled': 1,
|
|
'Disabled': 2,
|
|
'Absent': 3,
|
|
'Deferring': 4,
|
|
'InTest': 5,
|
|
'Quiesced': 6,
|
|
'StandbyOffline': 7,
|
|
'StandbySpare': 8,
|
|
'Starting': 9,
|
|
'UnavailableOffline': 10,
|
|
'Updating': 11
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- tag: component
|
|
value: virtualdisk
|
|
- uuid: 8e57ee881d9c46088f18fa6bcabe9f2d
|
|
name: 'Virtual disk [{#DISK_NAME}]: Status'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.virtualdisk.status[{#DISK_NAME}]'
|
|
delay: '0'
|
|
description: 'The status of the job. Possible values: OK, Warning, Critical.'
|
|
valuemap:
|
|
name: 'Redfish status health'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'OK': 1,
|
|
'Warning': 2,
|
|
'Critical': 3,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- tag: component
|
|
value: virtualdisk
|
|
trigger_prototypes:
|
|
- uuid: b8e7795d584c41f083601b7d11119b49
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
|
|
name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Critical state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Please check the device for faults.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 2c9da958cf3749869b504eeb80005d9b
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=2'
|
|
name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Warning state'
|
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'Please check the device for warnings.'
|
|
dependencies:
|
|
- name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Critical state'
|
|
expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: b55e8a16144541b0b4043ffa7e3e9679
|
|
name: 'Virtual disk [{#DISK_NAME}]: Write policy'
|
|
type: DEPENDENT
|
|
key: 'dell.server.hw.virtualdisk.write_policy[{#DISK_NAME}]'
|
|
delay: '0'
|
|
description: 'Indicates the write cache policy setting for the Volume. Possible values: WriteThrough, WriteBack, ProtectedWriteBack, UnprotectedWriteBack.'
|
|
valuemap:
|
|
name: 'Virtual disk write policy'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.writeCachePolicy
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
const idx = {
|
|
'WriteThrough': 1,
|
|
'WriteBack': 2,
|
|
'ProtectedWriteBack': 3,
|
|
'UnprotectedWriteBack': 4,
|
|
};
|
|
|
|
return typeof idx[value] === 'undefined' ? 0 : idx[value];
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
master_item:
|
|
key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- tag: component
|
|
value: virtualdisk
|
|
graph_prototypes:
|
|
- uuid: 4897862f7316481a9447bc70dd54214b
|
|
name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Size'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
|
|
master_item:
|
|
key: dell.server.disks.get
|
|
lld_macro_paths:
|
|
- lld_macro: '{#DISK_NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#ODATA}'
|
|
path: $.path
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.virtualDisks
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 6h
|
|
tags:
|
|
- tag: class
|
|
value: hardware
|
|
- tag: target
|
|
value: dell
|
|
- tag: target
|
|
value: 'dell poweredge'
|
|
macros:
|
|
- macro: '{$DELL.HTTP.API.PASSWORD}'
|
|
type: SECRET_TEXT
|
|
description: 'The Dell iDRAC user password.'
|
|
- macro: '{$DELL.HTTP.API.URL}'
|
|
value: '<Put your URL here>'
|
|
description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
|
|
- macro: '{$DELL.HTTP.API.USER}'
|
|
value: '<Put your username here>'
|
|
description: 'The Dell iDRAC username.'
|
|
- macro: '{$DELL.HTTP.CPU.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization.'
|
|
- macro: '{$DELL.HTTP.CPU.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization.'
|
|
- macro: '{$DELL.HTTP.IFCONTROL}'
|
|
value: '1'
|
|
description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
|
|
- macro: '{$DELL.HTTP.IO.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization.'
|
|
- macro: '{$DELL.HTTP.IO.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization.'
|
|
- macro: '{$DELL.HTTP.MEM.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization.'
|
|
- macro: '{$DELL.HTTP.MEM.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization.'
|
|
- macro: '{$DELL.HTTP.PROXY}'
|
|
description: 'Set an HTTP proxy for Redfish API requests if needed.'
|
|
- macro: '{$DELL.HTTP.REQUEST.TIMEOUT}'
|
|
value: 10s
|
|
description: 'Set the timeout for HTTP requests.'
|
|
- macro: '{$DELL.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.'
|
|
- macro: '{$DELL.HTTP.SYS.UTIL.HIGH}'
|
|
value: '90'
|
|
description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization.'
|
|
- macro: '{$DELL.HTTP.SYS.UTIL.WARN}'
|
|
value: '75'
|
|
description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization.'
|
|
- 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 "DELL PowerEdge", e.g. {$HTTP.TLS.VERIFY:"DELL PowerEdge"}.'
|
|
dashboards:
|
|
- uuid: 92c173b1b13142d197d9bac23f757a05
|
|
name: Overview
|
|
pages:
|
|
- name: Overview
|
|
display_period: '30'
|
|
widgets:
|
|
- type: gauge
|
|
name: 'CPU utilization'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- 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: 5000A1
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.cpu
|
|
- 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: gauge
|
|
name: 'Memory utilization'
|
|
'y': '3'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- type: STRING
|
|
name: description
|
|
value: MEM
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 5000A1
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.mem
|
|
- 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: gauge
|
|
name: 'I/O utilization'
|
|
'y': '6'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- type: STRING
|
|
name: description
|
|
value: I/O
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 5000A1
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.io
|
|
- 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: gauge
|
|
name: 'SYS utilization'
|
|
'y': '9'
|
|
width: '18'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 6C00D9
|
|
- type: STRING
|
|
name: description
|
|
value: SYS
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: STRING
|
|
name: empty_color
|
|
value: 5000A1
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.sys
|
|
- 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: 'Redfish API'
|
|
x: '18'
|
|
width: '27'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: 'Redfish API'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: 'net.tcp.service[https]'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: item
|
|
name: 'HW model'
|
|
x: '18'
|
|
'y': '3'
|
|
width: '54'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: 'HW model'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.hw.model
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: item
|
|
name: 'Serial number'
|
|
x: '18'
|
|
'y': '6'
|
|
width: '54'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: 'Serial number'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.hw.serialnumber
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: item
|
|
name: Firmware
|
|
x: '18'
|
|
'y': '9'
|
|
width: '54'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: Firmware
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.hw.firmware
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: item
|
|
name: 'System health'
|
|
x: '45'
|
|
width: '27'
|
|
height: '3'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: description
|
|
value: 'System Health'
|
|
- type: STRING
|
|
name: desc_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.status
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '1'
|
|
- type: STRING
|
|
name: value_color
|
|
value: FFFFFF
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- name: Discoveries
|
|
display_period: '30'
|
|
widgets:
|
|
- type: honeycomb
|
|
name: 'Interface link'
|
|
width: '36'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Interface*Link status'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAA
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: D3212C
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '2'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: 069C56
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '3'
|
|
- type: honeycomb
|
|
name: 'Temperature sensors'
|
|
'y': '4'
|
|
width: '72'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Probe*Value'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAB
|
|
- type: INTEGER
|
|
name: secondary_label_decimal_places
|
|
value: '0'
|
|
- type: honeycomb
|
|
name: 'Physical disks'
|
|
'y': '8'
|
|
width: '36'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Physical disk*Status'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAC
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: 069C56
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '1'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: FF681E
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '2'
|
|
- type: STRING
|
|
name: thresholds.2.color
|
|
value: D3212C
|
|
- type: STRING
|
|
name: thresholds.2.threshold
|
|
value: '3'
|
|
- type: honeycomb
|
|
name: 'Power supplies'
|
|
'y': '12'
|
|
width: '36'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Power supply*Voltage'
|
|
- type: STRING
|
|
name: items.1
|
|
value: 'Power supply*Current'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAE
|
|
- type: honeycomb
|
|
name: 'Interface speed'
|
|
x: '36'
|
|
width: '36'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Interface*Speed'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAABA
|
|
- type: INTEGER
|
|
name: secondary_label_decimal_places
|
|
value: '0'
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: D3212C
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '0'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: FF681E
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '10000000'
|
|
- type: STRING
|
|
name: thresholds.2.color
|
|
value: FF980E
|
|
- type: STRING
|
|
name: thresholds.2.threshold
|
|
value: '100000000'
|
|
- type: STRING
|
|
name: thresholds.3.color
|
|
value: 069C56
|
|
- type: STRING
|
|
name: thresholds.3.threshold
|
|
value: '1000000000'
|
|
- type: STRING
|
|
name: thresholds.4.color
|
|
value: 2196F3
|
|
- type: STRING
|
|
name: thresholds.4.threshold
|
|
value: '10000000000'
|
|
- type: STRING
|
|
name: thresholds.5.color
|
|
value: 6C00D9
|
|
- type: STRING
|
|
name: thresholds.5.threshold
|
|
value: '25000000000'
|
|
- type: STRING
|
|
name: thresholds.6.color
|
|
value: D900A6
|
|
- type: STRING
|
|
name: thresholds.6.threshold
|
|
value: '40000000000'
|
|
- type: honeycomb
|
|
name: 'Virtual disks'
|
|
x: '36'
|
|
'y': '8'
|
|
width: '36'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Virtual disk*: Status'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAD
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: 069C56
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '1'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: FF681E
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '2'
|
|
- type: STRING
|
|
name: thresholds.2.color
|
|
value: D3212C
|
|
- type: STRING
|
|
name: thresholds.2.threshold
|
|
value: '3'
|
|
- type: honeycomb
|
|
name: Fans
|
|
x: '36'
|
|
'y': '12'
|
|
width: '36'
|
|
height: '4'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Probe*Status'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAF
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: 069C56
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '1'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: FF681E
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '2'
|
|
- type: STRING
|
|
name: thresholds.2.color
|
|
value: D3212C
|
|
- type: STRING
|
|
name: thresholds.2.threshold
|
|
value: '3'
|
|
valuemaps:
|
|
- uuid: 122afb9826d4493aa319b67025bd5e74
|
|
name: 'Network interface status'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: 'Null'
|
|
- value: '2'
|
|
newvalue: Down
|
|
- value: '3'
|
|
newvalue: Up
|
|
- uuid: 2cfad557b52d49f7a56f84323c7b098a
|
|
name: 'Redfish API availability'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unavailable
|
|
- value: '1'
|
|
newvalue: Available
|
|
- uuid: 0b3b101349fa4b4d94983d7fdae83679
|
|
name: 'Redfish status health'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: OK
|
|
- value: '2'
|
|
newvalue: Warning
|
|
- value: '3'
|
|
newvalue: Critical
|
|
- uuid: e9e6e46c13fe4bd0a29b65cad929c6bc
|
|
name: 'Redfish status state'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: Enabled
|
|
- value: '2'
|
|
newvalue: Disabled
|
|
- value: '3'
|
|
newvalue: Absent
|
|
- value: '4'
|
|
newvalue: Deferring
|
|
- value: '5'
|
|
newvalue: InTest
|
|
- value: '6'
|
|
newvalue: Quiesced
|
|
- value: '7'
|
|
newvalue: StandbyOffline
|
|
- value: '8'
|
|
newvalue: StandbySpare
|
|
- value: '9'
|
|
newvalue: Starting
|
|
- value: '10'
|
|
newvalue: UnavailableOffline
|
|
- value: '11'
|
|
newvalue: Updating
|
|
- uuid: 29051e06a48b444a8ee285cd185ae04f
|
|
name: 'Virtual disk RAID status'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: unknown
|
|
- value: '1'
|
|
newvalue: Blocked
|
|
- value: '2'
|
|
newvalue: Degraded
|
|
- value: '3'
|
|
newvalue: Failed
|
|
- value: '4'
|
|
newvalue: Foreign
|
|
- value: '5'
|
|
newvalue: Offline
|
|
- value: '6'
|
|
newvalue: Unknown
|
|
- value: '7'
|
|
newvalue: 'Null'
|
|
- value: '8'
|
|
newvalue: Ready
|
|
- value: '9'
|
|
newvalue: Online
|
|
- uuid: ac7f30cf50cb459aaa41103c8fa6df1c
|
|
name: 'Virtual disk read policy'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: NoReadAhead
|
|
- value: '2'
|
|
newvalue: ReadAhead
|
|
- value: '3'
|
|
newvalue: AdaptiveReadAhead
|
|
- uuid: 39e0e7ddc8fd459e90fdb247caee7512
|
|
name: 'Virtual disk write policy'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Unknown
|
|
- value: '1'
|
|
newvalue: WriteThrough
|
|
- value: '2'
|
|
newvalue: WriteBack
|
|
- value: '3'
|
|
newvalue: ProtectedWriteBack
|
|
- value: '4'
|
|
newvalue: UnprotectedWriteBack
|
|
graphs:
|
|
- uuid: 09fa360f516e4a8b84b88f0e503a806d
|
|
name: 'Dell R660: CPU utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.cpu
|
|
- uuid: e232b8717dd745b99d49ce3a0f22825e
|
|
name: 'Dell R660: IO utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.io
|
|
- uuid: f6b5a4da810742b3b1d8c77462483a10
|
|
name: 'Dell R660: Memory utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.mem
|
|
- uuid: 82b7ad603aac49c4a952691f251bab87
|
|
name: 'Dell R660: SYS utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'DELL PowerEdge R660 by HTTP'
|
|
key: dell.server.util.sys
|