1068 lines
43 KiB
YAML
1068 lines
43 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
|
name: Templates/Applications
|
|
host_groups:
|
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
|
name: Applications
|
|
templates:
|
|
- uuid: 56079badd056419383cc26e6a4fcc7e0
|
|
template: VMware
|
|
name: VMware
|
|
description: |
|
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/.
|
|
|
|
Note: To enable discovery of hardware sensors of VMware Hypervisors, set the macro '{$VMWARE.HV.SENSOR.DISCOVERY}' to the value 'true' on the discovered host level.
|
|
|
|
Note: To create custom performance counter see documentation: https://www.zabbix.com/documentation/7.0/manual/vm_monitoring/vmware_keys#footnotes.
|
|
|
|
Note: To get all supported counters and generate path for custom performance counter see documentation: https://www.zabbix.com/documentation/7.0/manual/appendix/items/perf_counters.
|
|
|
|
Generated by official Zabbix template tool "Templator"
|
|
vendor:
|
|
name: Zabbix
|
|
version: 7.0-5
|
|
groups:
|
|
- name: Templates/Applications
|
|
items:
|
|
- uuid: 5a0c711cae454f0e92a492dd1718101f
|
|
name: 'Get alarms'
|
|
type: SIMPLE
|
|
key: 'vmware.alarms.get[{$VMWARE.URL}]'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Get alarm status.'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 5ce209f4d94f460488a74a92a52d92b1
|
|
name: 'Event log'
|
|
type: SIMPLE
|
|
key: 'vmware.eventlog[{$VMWARE.URL},skip]'
|
|
value_type: LOG
|
|
trends: '0'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Collect VMware event log. See also: https://www.zabbix.com/documentation/7.0/manual/config/items/preprocessing/examples#filtering_vmware_event_log_records'
|
|
tags:
|
|
- tag: component
|
|
value: log
|
|
- uuid: ee2edadb8ce943ef81d25dbbba8667a4
|
|
name: 'Full name'
|
|
type: SIMPLE
|
|
key: 'vmware.fullname[{$VMWARE.URL}]'
|
|
delay: 1h
|
|
value_type: CHAR
|
|
trends: '0'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'VMware service full name.'
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1d
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 91756015645746e68b3f85b4cd1b5abd
|
|
name: 'Overall Health VC State error check'
|
|
type: DEPENDENT
|
|
key: vmware.health.check
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'Data collection error check.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.error
|
|
error_handler: CUSTOM_VALUE
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 3h
|
|
master_item:
|
|
key: vmware.health.get
|
|
tags:
|
|
- tag: component
|
|
value: status
|
|
triggers:
|
|
- uuid: a11ed3829afb48fb99b9feb2dab4a45d
|
|
expression: length(last(/VMware/vmware.health.check))>0
|
|
name: 'VMware: Failed to get Overall Health VC State'
|
|
opdata: 'Current error: {ITEM.LASTVALUE}'
|
|
priority: WARNING
|
|
description: 'Failed to get data. Check debug log for more information.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 889333d3225147e1b1604119050a121f
|
|
name: 'Get Overall Health VC State'
|
|
type: SCRIPT
|
|
key: vmware.health.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;
|
|
};
|
|
}
|
|
|
|
|
|
var Vcenter = {
|
|
params: {},
|
|
vmware_api_session_id: '',
|
|
health_status: '',
|
|
error_msg: '',
|
|
|
|
setParams: function (params) {
|
|
['url', 'username', 'password'].forEach(function (field) {
|
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
|
throw 'Required param is not set: ' + field + '.';
|
|
}
|
|
});
|
|
|
|
if (params['url'].endsWith('/')) {
|
|
params['url'] = params['url'].slice(0,-1);
|
|
}
|
|
params['url'] = params['url'].replace('/sdk','');
|
|
|
|
Vcenter.params = params;
|
|
Vcenter.tls = new CTlsConfig(params.tls_verify);
|
|
Vcenter.tls.checkURL(Vcenter.params.url);
|
|
},
|
|
|
|
isGtOrEqVersion: function (first_version, second_version) {
|
|
var first = first_version.split('.').map(Number),
|
|
second = second_version.split('.').map(Number);
|
|
|
|
if (first.length > second.length) {
|
|
const max_componens_length = first.length
|
|
}
|
|
else {
|
|
const max_componens_length = second.length
|
|
}
|
|
|
|
var num_components = first.length;
|
|
while (num_components < max_componens_length) {
|
|
first.push(0);
|
|
num_components = num_components +1;
|
|
}
|
|
|
|
var num_components = second.length;
|
|
while (num_components < max_componens_length) {
|
|
second.push(0);
|
|
num_components = num_components +1;
|
|
}
|
|
|
|
if (first[0] > second[0] ||
|
|
(first[0] === second[0] && first[1] > second[1]) ||
|
|
(first[0] === second[0] && first[1] === second[1] && first[2] >= second[2])) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
|
|
login: function () {
|
|
var response, request = new HttpRequest(Vcenter.tls.options);
|
|
request.setHttpAuth(HTTPAUTH_BASIC, Vcenter.params.username, Vcenter.params.password);
|
|
request.addHeader('Accept: application/json');
|
|
request.addHeader('Content-Type: application/json');
|
|
|
|
response = request.post(Vcenter.params.url + '/api/session', '');
|
|
if (request.getStatus() >= 200 && request.getStatus() < 300 && (!JSON.parse(response).error)) {
|
|
Vcenter.vmware_api_session_id = Vcenter.removeQuotes(response);
|
|
return true;
|
|
}
|
|
|
|
response = request.post(Vcenter.params.url + '/rest/com/vmware/cis/session', '');
|
|
if (request.getStatus() >= 200 && request.getStatus() < 300) {
|
|
Vcenter.vmware_api_session_id = JSON.parse(response).value;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
|
|
logout: function () {
|
|
path = '/rest/com/vmware/cis/session';
|
|
if (Vcenter.vmware_api_version && Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '7.0.2')) {
|
|
path = '/api/session';
|
|
}
|
|
|
|
Vcenter.request(Vcenter.params.url + path, 'delete');
|
|
},
|
|
|
|
get_version: function () {
|
|
path = '/rest/appliance/system/version';
|
|
|
|
try {
|
|
Vcenter.vmware_api_version = Vcenter.request(Vcenter.params.url + path, 'get').version;
|
|
return true;
|
|
}
|
|
catch (error) {
|
|
return false;
|
|
}
|
|
},
|
|
|
|
removeQuotes: function (str){
|
|
if (str.startsWith('"') && str.endsWith('"')) {
|
|
return str.slice(1, -1);
|
|
}
|
|
|
|
return str;
|
|
},
|
|
|
|
getHealthStatus: function () {
|
|
path = '/api/appliance/health/system';
|
|
if (!Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '7.0.2')) {
|
|
path = '/rest/appliance/health/system';
|
|
}
|
|
|
|
result = Vcenter.removeQuotes(Vcenter.request(Vcenter.params.url + path, 'get'));
|
|
|
|
const idx = [
|
|
'green',
|
|
'yellow',
|
|
'orange',
|
|
'red',
|
|
'gray'
|
|
].indexOf(result.toLowerCase());
|
|
Vcenter.health_status = idx !== -1 ? idx : 5;
|
|
},
|
|
|
|
request: function (url, method) {
|
|
var response, request = new HttpRequest(Vcenter.tls.options);
|
|
|
|
if (typeof Vcenter.params.proxy !== 'undefined' && Vcenter.params.proxy !== '') {
|
|
request.setProxy(Vcenter.params.proxy);
|
|
}
|
|
|
|
request.setHttpAuth(HTTPAUTH_NONE);
|
|
request.addHeader("Cookie: vmware-api-session-id=" + Vcenter.vmware_api_session_id);
|
|
|
|
Zabbix.log(4, '[ VMware vCenter ] Sending request: ' + url);
|
|
|
|
switch (method) {
|
|
case 'get':
|
|
response = request.get(url);
|
|
break;
|
|
|
|
case 'post':
|
|
response = request.post(url);
|
|
break;
|
|
|
|
case 'delete':
|
|
response = request.delete(url);
|
|
break;
|
|
|
|
default:
|
|
throw 'Unsupported HTTP request method: ' + method;
|
|
}
|
|
|
|
Zabbix.log(4, '[ VMware vCenter ] Received response with status code ' + request.getStatus() + ': ' + response);
|
|
|
|
if (request.getStatus() < 200 || request.getStatus() >= 300) {
|
|
throw 'Cannot connect to VMware vCenter. Check debug log for more information.';
|
|
}
|
|
|
|
if (method !== 'delete' && JSON.parse(response).value) {
|
|
return JSON.parse(response).value;
|
|
}
|
|
else {
|
|
return response;
|
|
}
|
|
}
|
|
};
|
|
|
|
try {
|
|
Vcenter.setParams(JSON.parse(value));
|
|
|
|
if (Vcenter.login() && Vcenter.get_version() && Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '6.5.0')) {
|
|
Vcenter.getHealthStatus();
|
|
}
|
|
else {
|
|
Vcenter.health_status = 6;
|
|
}
|
|
|
|
if (Vcenter.vmware_api_session_id) {
|
|
Vcenter.logout();
|
|
}
|
|
}
|
|
catch (error) {
|
|
Zabbix.log(3, '[ VMware vCenter ] ERROR: ' + error);
|
|
Vcenter.error_msg = 'Failed to get data from API:' + error;
|
|
}
|
|
|
|
return JSON.stringify({'health': Vcenter.health_status, 'error': Vcenter.error_msg});
|
|
description: 'Gets overall health of the system. This item works only with VMware vCenter versions above 6.5.'
|
|
timeout: '10'
|
|
parameters:
|
|
- name: password
|
|
value: '{$VMWARE.PASSWORD}'
|
|
- name: proxy
|
|
value: '{$VMWARE.PROXY}'
|
|
- name: tls_verify
|
|
value: '{$HTTP.TLS.VERIFY:"VMware"}'
|
|
- name: url
|
|
value: '{$VMWARE.URL}'
|
|
- name: username
|
|
value: '{$VMWARE.USERNAME}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 2d18e0c8b8284c1bafd4bd131dcb640d
|
|
name: 'Overall Health VC State'
|
|
type: DEPENDENT
|
|
key: vmware.health.state
|
|
delay: '0'
|
|
description: |
|
|
VMware Overall health of system. One of the following:
|
|
- Gray: No health data is available for this service.
|
|
- Green: Service is healthy.
|
|
- Yellow: The service is in a healthy state, but experiencing some level of problems.
|
|
- Orange: The service health is degraded. The service might have serious problems.
|
|
- Red: The service is unavailable, not functioning properly, or will stop functioning soon.
|
|
- Not available: The health status is unavailable (not supported on the vCenter or ESXi side).
|
|
valuemap:
|
|
name: 'VMware Overall Health VC State'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 3h
|
|
master_item:
|
|
key: vmware.health.get
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
triggers:
|
|
- uuid: 4058114acbc743e087f5b10e22c997d1
|
|
expression: 'last(/VMware/vmware.health.state)>0 and last(/VMware/vmware.health.state)<>6'
|
|
name: 'VMware: Overall Health VC State is not Green'
|
|
opdata: 'Current Overall Health VC State: {ITEM.LASTVALUE}'
|
|
priority: AVERAGE
|
|
description: 'One or more components in the appliance might be in an unusable status and the appliance might soon become unresponsive.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- tag: scope
|
|
value: performance
|
|
- uuid: a0ec9145f2234fbea79a28c57ebdb44d
|
|
name: Version
|
|
type: SIMPLE
|
|
key: 'vmware.version[{$VMWARE.URL}]'
|
|
delay: 1h
|
|
value_type: CHAR
|
|
trends: '0'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'VMware service version.'
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1d
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
discovery_rules:
|
|
- uuid: a1f545a8acb5423884a3ef46b0aaa1c6
|
|
name: 'VMware alarm discovery'
|
|
type: DEPENDENT
|
|
key: vmware.alarms.discovery
|
|
delay: '0'
|
|
lifetime: '0'
|
|
description: 'Discovery of alarms.'
|
|
item_prototypes:
|
|
- uuid: b52727a894964058a5f0a9701e3f7edb
|
|
name: '{#VMWARE.ALARMS.NAME} {#VMWARE.ALARMS.ENTITY.NAME}'
|
|
type: DEPENDENT
|
|
key: 'vmware.alarms.status["{#VMWARE.ALARMS.KEY}"]'
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'VMware alarm status.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.[?(@.key == "{#VMWARE.ALARMS.KEY}")].key.first()'
|
|
error_handler: CUSTOM_VALUE
|
|
error_handler_params: '-1'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'vmware.alarms.get[{$VMWARE.URL}]'
|
|
tags:
|
|
- tag: component
|
|
value: alarms
|
|
trigger_prototypes:
|
|
- uuid: ec5711e1881149ffbf67325f16b960a4
|
|
expression: 'last(/VMware/vmware.alarms.status["{#VMWARE.ALARMS.KEY}"])<>-1'
|
|
name: 'VMware: {#VMWARE.ALARMS.NAME} {#VMWARE.ALARMS.ENTITY.NAME}'
|
|
description: |
|
|
'{#VMWARE.ALARMS.DESC}'
|
|
Type: {#VMWARE.ALARMS.ENTITY.TYPE}
|
|
UUID: {#VMWARE.ALARMS.ENTITY.UUID}
|
|
ID: {#VMWARE.ALARMS.ENTITY.ID}
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
master_item:
|
|
key: 'vmware.alarms.get[{$VMWARE.URL}]'
|
|
lld_macro_paths:
|
|
- lld_macro: '{#VMWARE.ALARMS.DESC}'
|
|
path: $.description
|
|
- lld_macro: '{#VMWARE.ALARMS.ENTITY.ID}'
|
|
path: $.entity.id
|
|
- lld_macro: '{#VMWARE.ALARMS.ENTITY.NAME}'
|
|
path: $.entity.name
|
|
- lld_macro: '{#VMWARE.ALARMS.ENTITY.TYPE}'
|
|
path: $.entity.type
|
|
- lld_macro: '{#VMWARE.ALARMS.ENTITY.UUID}'
|
|
path: $.entity.uuid
|
|
- lld_macro: '{#VMWARE.ALARMS.KEY}'
|
|
path: $.key
|
|
- lld_macro: '{#VMWARE.ALARMS.NAME}'
|
|
path: $.name
|
|
- lld_macro: '{#VMWARE.ALARMS.STATUS}'
|
|
path: $.overall_status
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
overrides:
|
|
- name: 'Trigger priority red'
|
|
step: '1'
|
|
filter:
|
|
conditions:
|
|
- macro: '{#VMWARE.ALARMS.STATUS}'
|
|
value: red
|
|
formulaid: A
|
|
operations:
|
|
- operationobject: TRIGGER_PROTOTYPE
|
|
operator: REGEXP
|
|
value: 'VMware: *'
|
|
severity: HIGH
|
|
- name: 'Trigger priority yellow'
|
|
step: '2'
|
|
filter:
|
|
conditions:
|
|
- macro: '{#VMWARE.ALARMS.STATUS}'
|
|
value: yellow
|
|
formulaid: A
|
|
operations:
|
|
- operationobject: TRIGGER_PROTOTYPE
|
|
operator: REGEXP
|
|
value: 'VMware: *'
|
|
severity: WARNING
|
|
- name: 'Trigger priority green'
|
|
step: '3'
|
|
filter:
|
|
conditions:
|
|
- macro: '{#VMWARE.ALARMS.STATUS}'
|
|
value: green
|
|
formulaid: A
|
|
operations:
|
|
- operationobject: TRIGGER_PROTOTYPE
|
|
operator: REGEXP
|
|
value: 'VMware: *'
|
|
severity: INFO
|
|
- uuid: 16ffc933cce74cf28a6edf306aa99782
|
|
name: 'VMware cluster discovery'
|
|
type: SIMPLE
|
|
key: 'vmware.cluster.discovery[{$VMWARE.URL}]'
|
|
delay: 1h
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Discovery of clusters.'
|
|
item_prototypes:
|
|
- uuid: 46111f91dd564a459dbc1d396e2e6c76
|
|
name: 'Status of [{#CLUSTER.NAME}] cluster'
|
|
type: SIMPLE
|
|
key: 'vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}]'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: |
|
|
VMware cluster status. One of the following:
|
|
- Gray: Unknown;
|
|
- Green: OK;
|
|
- Yellow: It might have a problem;
|
|
- Red: It has a problem.
|
|
valuemap:
|
|
name: 'VMware status'
|
|
tags:
|
|
- tag: cluster
|
|
value: '{#CLUSTER.NAME}'
|
|
- tag: component
|
|
value: cluster
|
|
trigger_prototypes:
|
|
- uuid: 9f7bcea84eb54fe5b79481267e6db341
|
|
expression: 'last(/VMware/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=3'
|
|
name: 'VMware: The [{#CLUSTER.NAME}] status is Red'
|
|
priority: HIGH
|
|
description: 'A cluster enabled for DRS becomes invalid (red) when the tree is no longer internally consistent, that is, when resource constraints are not observed. See also: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-C7417CAA-BD38-41D0-9529-9E7A5898BB12.html'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- tag: scope
|
|
value: performance
|
|
- uuid: bf1e7838597241228506c5cfb7063950
|
|
expression: 'last(/VMware/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=2'
|
|
name: 'VMware: The [{#CLUSTER.NAME}] status is Yellow'
|
|
priority: AVERAGE
|
|
description: 'A cluster becomes overcommitted (yellow) when the tree of resource pools and virtual machines is internally consistent but the cluster does not have the capacity to support all the resources reserved by the child resource pools. See also: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-ED8240A0-FB54-4A31-BD3D-F23FE740F10C.html'
|
|
dependencies:
|
|
- name: 'VMware: The [{#CLUSTER.NAME}] status is Red'
|
|
expression: 'last(/VMware/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=3'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- tag: scope
|
|
value: performance
|
|
- uuid: 8fb6a45cbe074b0cb6df53758e2c6623
|
|
name: 'VMware datastore discovery'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.discovery[{$VMWARE.URL}]'
|
|
delay: 1h
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Discovery of VMware datastores.'
|
|
item_prototypes:
|
|
- uuid: 4b61838ba4c34e709b25081ae5b059b5
|
|
name: 'Average read latency of the datastore [{#DATASTORE}]'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Amount of time for a read operation from the datastore (milliseconds).'
|
|
tags:
|
|
- tag: component
|
|
value: datastore
|
|
- tag: datastore
|
|
value: '{#DATASTORE}'
|
|
- tag: type
|
|
value: '{#DATASTORE.TYPE}'
|
|
- uuid: 54c2631edeb04ef39701ad3bf03be1af
|
|
name: 'Average read IOPS of the datastore [{#DATASTORE}]'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'IOPS for a read operation from the datastore (milliseconds).'
|
|
tags:
|
|
- tag: component
|
|
value: datastore
|
|
- tag: datastore
|
|
value: '{#DATASTORE}'
|
|
- tag: type
|
|
value: '{#DATASTORE.TYPE}'
|
|
- uuid: 5355c401dc244bc588ccd18767577c93
|
|
name: 'Free space on datastore [{#DATASTORE}] (percentage)'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree]'
|
|
delay: 5m
|
|
value_type: FLOAT
|
|
units: '%'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'VMware datastore free space (percentage from the total).'
|
|
tags:
|
|
- tag: component
|
|
value: datastore
|
|
- tag: datastore
|
|
value: '{#DATASTORE}'
|
|
- tag: type
|
|
value: '{#DATASTORE.TYPE}'
|
|
trigger_prototypes:
|
|
- uuid: 8783e6c0bb394763afecddfd49929a01
|
|
expression: 'last(/VMware/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.CRIT}'
|
|
name: 'VMware: [{#DATASTORE}]: Free space is critically low'
|
|
event_name: 'VMware: Datastore free space is critically low ([{#DATASTORE}] free space < {$VMWARE.DATASTORE.SPACE.CRIT}%)'
|
|
priority: HIGH
|
|
description: 'Datastore free space has fallen below the critical threshold.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 201980a75d734a42b3fbe1b0d3c9f55c
|
|
expression: 'last(/VMware/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.WARN}'
|
|
name: 'VMware: [{#DATASTORE}]: Free space is low'
|
|
event_name: 'VMware: Datastore free space is low ([{#DATASTORE}] free space < {$VMWARE.DATASTORE.SPACE.WARN}%)'
|
|
priority: WARNING
|
|
description: 'Datastore free space has fallen below the warning threshold.'
|
|
dependencies:
|
|
- name: 'VMware: [{#DATASTORE}]: Free space is critically low'
|
|
expression: 'last(/VMware/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.CRIT}'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 84f13c4fde2d4a17baaf0c8c1eb4f2c0
|
|
name: 'Total size of datastore [{#DATASTORE}]'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}]'
|
|
delay: 5m
|
|
units: B
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'VMware datastore space in bytes.'
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
tags:
|
|
- tag: component
|
|
value: datastore
|
|
- tag: datastore
|
|
value: '{#DATASTORE}'
|
|
- tag: type
|
|
value: '{#DATASTORE.TYPE}'
|
|
- uuid: 540cd0fbc56c4b8ea19f2ff5839ce00d
|
|
name: 'Average write latency of the datastore [{#DATASTORE}]'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Amount of time for a write operation to the datastore (milliseconds).'
|
|
tags:
|
|
- tag: component
|
|
value: datastore
|
|
- tag: datastore
|
|
value: '{#DATASTORE}'
|
|
- tag: type
|
|
value: '{#DATASTORE.TYPE}'
|
|
- uuid: 0026edd933404faf992d08628c9ab364
|
|
name: 'Average write IOPS of the datastore [{#DATASTORE}]'
|
|
type: SIMPLE
|
|
key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'IOPS for a write operation to the datastore (milliseconds).'
|
|
tags:
|
|
- tag: component
|
|
value: datastore
|
|
- tag: datastore
|
|
value: '{#DATASTORE}'
|
|
- tag: type
|
|
value: '{#DATASTORE.TYPE}'
|
|
overrides:
|
|
- name: 'Disable IO perfCounter'
|
|
step: '1'
|
|
filter:
|
|
conditions:
|
|
- macro: '{#DATASTORE.TYPE}'
|
|
value: vsan|nfs
|
|
formulaid: A
|
|
operations:
|
|
- operationobject: ITEM_PROTOTYPE
|
|
operator: LIKE
|
|
value: Average
|
|
discover: NO_DISCOVER
|
|
- uuid: a5bc075e89f248e7b411d8f960897a08
|
|
name: 'VMware hypervisor discovery'
|
|
type: SIMPLE
|
|
key: 'vmware.hv.discovery[{$VMWARE.URL}]'
|
|
delay: 1h
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
description: 'Discovery of hypervisors.'
|
|
host_prototypes:
|
|
- uuid: 051a1469d4d045cbbf818fcc843a352e
|
|
host: '{#HV.UUID}'
|
|
name: '{#HV.NAME}'
|
|
group_links:
|
|
- group:
|
|
name: Applications
|
|
group_prototypes:
|
|
- name: '{#CLUSTER.NAME} (hypervisor)'
|
|
- name: '{#DATACENTER.NAME}'
|
|
templates:
|
|
- name: 'VMware Hypervisor'
|
|
macros:
|
|
- macro: '{$VMWARE.HV.UUID}'
|
|
value: '{#HV.UUID}'
|
|
description: 'UUID of hypervisor.'
|
|
custom_interfaces: 'YES'
|
|
interfaces:
|
|
- ip: '{#HV.IP}'
|
|
- uuid: 9fd559f4e88c4677a1b874634dd686f5
|
|
name: 'VMware VM discovery'
|
|
type: SIMPLE
|
|
key: 'vmware.vm.discovery[{$VMWARE.URL}]'
|
|
delay: 1h
|
|
username: '{$VMWARE.USERNAME}'
|
|
password: '{$VMWARE.PASSWORD}'
|
|
filter:
|
|
evaltype: AND
|
|
conditions:
|
|
- macro: '{#VM.POWERSTATE}'
|
|
value: '{$VMWARE.VM.POWERSTATE}'
|
|
formulaid: A
|
|
description: 'Discovery of guest virtual machines.'
|
|
host_prototypes:
|
|
- uuid: 23b9ae9d6f33414880db1cb107115810
|
|
host: '{#VM.UUID}'
|
|
name: '{#VM.NAME}'
|
|
group_links:
|
|
- group:
|
|
name: Applications
|
|
group_prototypes:
|
|
- name: '{#CLUSTER.NAME} (vm)'
|
|
- name: '{#DATACENTER.NAME}/{#VM.FOLDER} (vm)'
|
|
- name: '{#HV.NAME}'
|
|
templates:
|
|
- name: 'VMware Guest'
|
|
macros:
|
|
- macro: '{$VMWARE.VM.UUID}'
|
|
value: '{#VM.UUID}'
|
|
description: 'UUID of guest virtual machine.'
|
|
custom_interfaces: 'YES'
|
|
interfaces:
|
|
- ip: '{#VM.IP}'
|
|
tags:
|
|
- tag: class
|
|
value: software
|
|
- tag: target
|
|
value: vmware
|
|
macros:
|
|
- macro: '{$HTTP.TLS.VERIFY}'
|
|
value: full
|
|
description: 'TLS certificate verification for script items: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "VMware", e.g. {$HTTP.TLS.VERIFY:"VMware"}.'
|
|
- macro: '{$VMWARE.DATASTORE.SPACE.CRIT}'
|
|
value: '10'
|
|
description: 'The critical threshold of the datastore free space.'
|
|
- macro: '{$VMWARE.DATASTORE.SPACE.WARN}'
|
|
value: '20'
|
|
description: 'The warning threshold of the datastore free space.'
|
|
- macro: '{$VMWARE.HV.SENSOR.DISCOVERY}'
|
|
value: 'false'
|
|
description: 'Set "true"/"false" to enable or disable monitoring of hardware sensors.'
|
|
- macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
|
|
value: '.*'
|
|
description: 'Sets the regex string of hardware sensor names to be allowed in discovery.'
|
|
- macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.NOT_MATCHES}'
|
|
value: CHANGE_IF_NEEDED
|
|
description: 'Sets the regex string of hardware sensor names to be ignored in discovery.'
|
|
- macro: '{$VMWARE.PASSWORD}'
|
|
type: SECRET_TEXT
|
|
description: 'VMware service `{$USERNAME}` user password.'
|
|
- macro: '{$VMWARE.PROXY}'
|
|
description: 'Sets the HTTP proxy for script items. If this parameter is empty, then no proxy is used.'
|
|
- macro: '{$VMWARE.URL}'
|
|
description: 'VMware service (vCenter or ESX hypervisor) SDK URL (https://servername/sdk).'
|
|
- macro: '{$VMWARE.USERNAME}'
|
|
description: 'VMware service user name.'
|
|
- macro: '{$VMWARE.VM.POWERSTATE}'
|
|
value: poweredOn|poweredOff|suspended
|
|
description: 'Possibility to filter out VMs by power state.'
|
|
dashboards:
|
|
- uuid: 00e64ad19fff4dc9af2ab2c0c1ccc290
|
|
name: Overview
|
|
pages:
|
|
- name: 'VMware: Overview'
|
|
widgets:
|
|
- type: honeycomb
|
|
name: 'Overall status'
|
|
width: '15'
|
|
height: '4'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Overall Health VC State'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: 'Overall status'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAA
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: 80FF00
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '0'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: FFFF00
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '1'
|
|
- type: STRING
|
|
name: thresholds.2.color
|
|
value: FFBF00
|
|
- type: STRING
|
|
name: thresholds.2.threshold
|
|
value: '2'
|
|
- type: STRING
|
|
name: thresholds.3.color
|
|
value: FF465C
|
|
- type: STRING
|
|
name: thresholds.3.threshold
|
|
value: '3'
|
|
- type: STRING
|
|
name: thresholds.4.color
|
|
value: D2D2D2
|
|
- type: STRING
|
|
name: thresholds.4.threshold
|
|
value: '4'
|
|
- type: STRING
|
|
name: thresholds.5.color
|
|
value: D2D2D2
|
|
- type: STRING
|
|
name: thresholds.5.threshold
|
|
value: '5'
|
|
- type: STRING
|
|
name: thresholds.6.color
|
|
value: 90A4AE
|
|
- type: STRING
|
|
name: thresholds.6.threshold
|
|
value: '6'
|
|
- type: honeycomb
|
|
name: 'Total size of datastore'
|
|
'y': '4'
|
|
width: '36'
|
|
height: '8'
|
|
fields:
|
|
- type: STRING
|
|
name: bg_color
|
|
value: 81D4FA
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Total size of datastore*'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAB
|
|
- type: item
|
|
name: 'Full name'
|
|
x: '15'
|
|
width: '57'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: VMware
|
|
key: 'vmware.fullname[{$VMWARE.URL}]'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: value_bold
|
|
value: '0'
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: item
|
|
name: Version
|
|
x: '15'
|
|
'y': '2'
|
|
width: '57'
|
|
hide_header: 'YES'
|
|
fields:
|
|
- type: INTEGER
|
|
name: desc_v_pos
|
|
value: '0'
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: VMware
|
|
key: 'vmware.version[{$VMWARE.URL}]'
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '1'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: INTEGER
|
|
name: value_bold
|
|
value: '0'
|
|
- type: INTEGER
|
|
name: value_size
|
|
value: '35'
|
|
- type: honeycomb
|
|
name: 'Free space on datastore'
|
|
x: '36'
|
|
'y': '4'
|
|
width: '36'
|
|
height: '8'
|
|
fields:
|
|
- type: STRING
|
|
name: items.0
|
|
value: 'Free space on datastore*'
|
|
- type: STRING
|
|
name: primary_label
|
|
value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
|
|
- type: INTEGER
|
|
name: primary_label_size_type
|
|
value: '1'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAC
|
|
- type: STRING
|
|
name: thresholds.0.color
|
|
value: FF465C
|
|
- type: STRING
|
|
name: thresholds.0.threshold
|
|
value: '10'
|
|
- type: STRING
|
|
name: thresholds.1.color
|
|
value: FFD54F
|
|
- type: STRING
|
|
name: thresholds.1.threshold
|
|
value: '20'
|
|
- type: STRING
|
|
name: thresholds.2.color
|
|
value: 0EC9AC
|
|
- type: STRING
|
|
name: thresholds.2.threshold
|
|
value: '30'
|
|
- name: 'VMware: Datastore'
|
|
widgets:
|
|
- type: graphprototype
|
|
name: 'Average read IOps of the datastore'
|
|
width: '36'
|
|
height: '6'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: ITEM_PROTOTYPE
|
|
name: itemid.0
|
|
value:
|
|
host: VMware
|
|
key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAD
|
|
- type: INTEGER
|
|
name: source_type
|
|
value: '3'
|
|
- type: graphprototype
|
|
name: 'Average read latency of the datastore'
|
|
'y': '6'
|
|
width: '36'
|
|
height: '6'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: ITEM_PROTOTYPE
|
|
name: itemid.0
|
|
value:
|
|
host: VMware
|
|
key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAE
|
|
- type: INTEGER
|
|
name: source_type
|
|
value: '3'
|
|
- type: graphprototype
|
|
name: 'Average write IOps of the datastore'
|
|
x: '36'
|
|
width: '36'
|
|
height: '6'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: ITEM_PROTOTYPE
|
|
name: itemid.0
|
|
value:
|
|
host: VMware
|
|
key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAF
|
|
- type: INTEGER
|
|
name: source_type
|
|
value: '3'
|
|
- type: graphprototype
|
|
name: 'Average write latency of the datastore'
|
|
x: '36'
|
|
'y': '6'
|
|
width: '36'
|
|
height: '6'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: ITEM_PROTOTYPE
|
|
name: itemid.0
|
|
value:
|
|
host: VMware
|
|
key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAG
|
|
- type: INTEGER
|
|
name: source_type
|
|
value: '3'
|
|
valuemaps:
|
|
- uuid: 7e24ccef9d754cb4805df5b1f27f4ef4
|
|
name: 'VMware Overall Health VC State'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Green
|
|
- value: '1'
|
|
newvalue: Yellow
|
|
- value: '2'
|
|
newvalue: Orange
|
|
- value: '3'
|
|
newvalue: Red
|
|
- value: '4'
|
|
newvalue: Gray
|
|
- value: '5'
|
|
newvalue: Unknown
|
|
- value: '6'
|
|
newvalue: 'Not available'
|
|
- uuid: 3c59c22905054d42ac4ee8b72fe5f270
|
|
name: 'VMware status'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Gray
|
|
- value: '1'
|
|
newvalue: Green
|
|
- value: '2'
|
|
newvalue: Yellow
|
|
- value: '3'
|
|
newvalue: Red
|