Backup de templates Zabbix 7.0.31
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,966 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: c2c162144c2d4c5491c8801193af4945
|
||||||
|
name: Templates/Cloud
|
||||||
|
templates:
|
||||||
|
- uuid: dce23cdaef364e139efa580d8a304ffe
|
||||||
|
template: 'AWS Cost Explorer by HTTP'
|
||||||
|
name: 'AWS Cost Explorer by HTTP'
|
||||||
|
description: |
|
||||||
|
The template gets AWS Cost Explorer metrics and uses the script item to make HTTP requests to the Cost Explorer API.
|
||||||
|
The Cost Explorer API can access the historical data over up to 12 months and the data for current month.
|
||||||
|
Don't forget to read the README.md for the correct setup of the template.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-5
|
||||||
|
groups:
|
||||||
|
- name: Templates/Cloud
|
||||||
|
items:
|
||||||
|
- uuid: 5bfda2617dfc43edbe524a5c44b39f18
|
||||||
|
name: 'Get daily costs'
|
||||||
|
type: SCRIPT
|
||||||
|
key: aws.get.daily.costs
|
||||||
|
delay: 0s;h/6
|
||||||
|
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 AWS = {
|
||||||
|
params: {},
|
||||||
|
metadata: 'http://169.254.169.254/latest/',
|
||||||
|
|
||||||
|
getRoleBaseCredentials: function () {
|
||||||
|
AWS.params['auth_type'] = 'role_base';
|
||||||
|
var request = new HttpRequest({SSLVerifyPeer: false, SSLVerifyHost: false});
|
||||||
|
if (typeof AWS.params.proxy !== 'undefined' && AWS.params.proxy !== '') {
|
||||||
|
request.setProxy(AWS.params.proxy);
|
||||||
|
}
|
||||||
|
request.addHeader('X-aws-ec2-metadata-token-ttl-seconds: 21600');
|
||||||
|
var token = request.put(AWS.metadata + 'api/token');
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200 || token === null || token === '') {
|
||||||
|
throw 'Error getting IMDSv2 session token.';
|
||||||
|
}
|
||||||
|
request.addHeader('X-aws-ec2-metadata-token: ' + token);
|
||||||
|
var IamRoleName = request.get(AWS.metadata + 'meta-data/iam/security-credentials');
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200 || IamRoleName === null || IamRoleName === '') {
|
||||||
|
throw 'Error getting security credentials from instance metadata. Role not found.';
|
||||||
|
}
|
||||||
|
|
||||||
|
credentials = request.get(AWS.metadata + 'meta-data/iam/security-credentials/' + encodeURI(IamRoleName));
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200 || credentials === null || credentials === '') {
|
||||||
|
throw 'Error getting security credentials from instance metadata.';
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
credentials = JSON.parse(credentials);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from instance metadata. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
['AccessKeyId', 'SecretAccessKey', 'Token'].forEach(function (field) {
|
||||||
|
if (typeof credentials !== 'object' || typeof credentials[field] === 'undefined' || credentials[field] === '') {
|
||||||
|
throw 'Required credentials are not set: "' + field + '".';
|
||||||
|
};
|
||||||
|
AWS.params[field] = credentials[field];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
setParams: function (params) {
|
||||||
|
AWS.tls = new CTlsConfig(params.tls_verify);
|
||||||
|
AWS.params['proxy'] = params.proxy;
|
||||||
|
switch (AWS.getField(params, 'auth_type')) {
|
||||||
|
case 'role_base':
|
||||||
|
AWS.getRoleBaseCredentials();
|
||||||
|
break;
|
||||||
|
case 'assume_role':
|
||||||
|
if (typeof params.metadata_auth === 'undefined' || params.metadata_auth === '' || (params.metadata_auth !== 'true' && params.metadata_auth !== 'false')) {
|
||||||
|
throw 'Required param metadata_auth for assume_role is not set or has invalid value: "' + params.metadata_auth + '". Expected "true" or "false".';
|
||||||
|
}
|
||||||
|
if (params.metadata_auth === 'true') {
|
||||||
|
AWS.getRoleBaseCredentials();
|
||||||
|
AWS.params['SessionToken'] = AWS.params['Token'];
|
||||||
|
AWS.params['auth_type'] = 'assume_role_metadata';
|
||||||
|
|
||||||
|
['sts_region', 'role_arn'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.metadata_auth === 'false') {
|
||||||
|
AWS.params['auth_type'] = 'assume_role';
|
||||||
|
|
||||||
|
['AccessKeyId', 'SecretAccessKey', 'sts_region', 'role_arn'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const role_arn_regex = /role\/(.+)$/;
|
||||||
|
const match = AWS.params.role_arn.match(role_arn_regex);
|
||||||
|
if (!match) {
|
||||||
|
throw 'Invalid role ARN format.';
|
||||||
|
}
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
'Action': 'AssumeRole',
|
||||||
|
'Version': '2011-06-15',
|
||||||
|
'RoleArn': AWS.params.role_arn,
|
||||||
|
'RoleSessionName': match[1] + 'Session',
|
||||||
|
};
|
||||||
|
|
||||||
|
credentials = AWS.getField(AWS.request('POST', AWS.params.sts_region, 'sts', AWS.prepareParams(payload), ''), 'AssumeRoleResponse.AssumeRoleResult.Credentials');
|
||||||
|
|
||||||
|
['AccessKeyId', 'SecretAccessKey', 'SessionToken'].forEach(function (field) {
|
||||||
|
if (typeof credentials !== 'object' || typeof credentials[field] === 'undefined' || credentials[field] === '') {
|
||||||
|
throw 'Required credentials are not set: "' + field + '".';
|
||||||
|
};
|
||||||
|
AWS.params[field] = credentials[field];
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
AWS.params['auth_type'] = 'access_key';
|
||||||
|
['AccessKeyId', 'SecretAccessKey'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
['region'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
|
||||||
|
today = new Date();
|
||||||
|
AWS.params.end_date = today.toDateString();
|
||||||
|
today.setDate(today.getDate() - 1);
|
||||||
|
AWS.params.start_time = today.toDateString();
|
||||||
|
},
|
||||||
|
|
||||||
|
sign: function (key, message) {
|
||||||
|
var hex = hmac('sha256', key, message);
|
||||||
|
|
||||||
|
if ((hex.length % 2) === 1) {
|
||||||
|
throw 'Invalid length of a hex string!';
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = new Int8Array(hex.length / 2);
|
||||||
|
for (var i = 0, b = 0; i < hex.length; i += 2, b++) {
|
||||||
|
result[b] = parseInt(hex.substring(i, i + 2), 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
prepareParams: function (params) {
|
||||||
|
var result = [];
|
||||||
|
|
||||||
|
Object.keys(params).sort().forEach(function (key) {
|
||||||
|
if (typeof params[key] !== 'object') {
|
||||||
|
result.push(key + '=' + encodeURIComponent(params[key]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result.push(prepareObject(key, params[key]));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result.join('&');
|
||||||
|
},
|
||||||
|
|
||||||
|
getField: function (data, path) {
|
||||||
|
var steps = path.split('.');
|
||||||
|
for (var i = 0; i < steps.length; i++) {
|
||||||
|
var step = steps[i];
|
||||||
|
if (typeof data !== 'object' || typeof data[step] === 'undefined') {
|
||||||
|
throw 'Required field was not found: ' + path;
|
||||||
|
}
|
||||||
|
data = data[step];
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
request: function (method, region, service, params, data, target) {
|
||||||
|
if (typeof data === 'undefined' || data === null) {
|
||||||
|
data = '';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data = JSON.stringify(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
var amzdate = (new Date()).toISOString().replace(/\.\d+Z/, 'Z').replace(/[-:]/g, ''),
|
||||||
|
date = amzdate.replace(/T\d+Z/, ''),
|
||||||
|
canonical_uri = '/',
|
||||||
|
host = service + '.' + region + '.amazonaws.com',
|
||||||
|
canonical_headers = 'content-encoding:amz-1.0\n' + 'host:' + host + '\n' + 'x-amz-date:' + amzdate + '\n',
|
||||||
|
signed_headers = 'content-encoding;host;x-amz-date',
|
||||||
|
canonical_request = method + '\n' + canonical_uri + '\n' + params + '\n' + canonical_headers + '\n' + signed_headers + '\n' + sha256(data),
|
||||||
|
credential_scope = date + '/' + region + '/' + service + '/' + 'aws4_request',
|
||||||
|
request_string = 'AWS4-HMAC-SHA256' + '\n' + amzdate + '\n' + credential_scope + '\n' + sha256(canonical_request),
|
||||||
|
key = AWS.sign('AWS4' + AWS.params.SecretAccessKey, date),
|
||||||
|
key = AWS.sign(key, region),
|
||||||
|
key = AWS.sign(key, service),
|
||||||
|
key = AWS.sign(key, 'aws4_request'),
|
||||||
|
request = new HttpRequest(AWS.tls.options),
|
||||||
|
url = 'https://' + host + canonical_uri + '?' + params;
|
||||||
|
|
||||||
|
if (typeof AWS.params.proxy !== 'undefined' && AWS.params.proxy !== '') {
|
||||||
|
request.setProxy(AWS.params.proxy);
|
||||||
|
}
|
||||||
|
request.addHeader('x-amz-date: ' + amzdate);
|
||||||
|
request.addHeader('x-amz-content-sha256:' + sha256(data));
|
||||||
|
request.addHeader('Accept: application/json');
|
||||||
|
request.addHeader('Content-Type: application/x-amz-json-1.1');
|
||||||
|
request.addHeader('Content-Encoding: amz-1.0');
|
||||||
|
request.addHeader('X-Amz-Target: ' + target);
|
||||||
|
request.addHeader('Authorization: ' + 'AWS4-HMAC-SHA256 Credential=' + AWS.params.AccessKeyId + '/' + credential_scope + ', ' + 'SignedHeaders=' + signed_headers + ', ' + 'Signature=' + hmac('sha256', key, request_string));
|
||||||
|
if (AWS.params.auth_type === 'role_base' || AWS.params.auth_type === 'assume_role_metadata' || (AWS.params.auth_type === 'assume_role' & !params.includes('AssumeRole'))) {
|
||||||
|
request.addHeader('X-Amz-Security-Token: ' + (AWS.params.auth_type === 'role_base' ? AWS.params.Token : AWS.params.SessionToken));
|
||||||
|
}
|
||||||
|
|
||||||
|
Zabbix.log(4, '[ AWS Billing ] Sending request: ' + url);
|
||||||
|
response = request.post(url, data);
|
||||||
|
Zabbix.log(4, '[ AWS Billing ] Received response with the status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200) {
|
||||||
|
throw 'Request failed with the status code ' + request.getStatus() + ': ' + response;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse the response received from AWS API. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
},
|
||||||
|
|
||||||
|
getCostAndUsage: function () {
|
||||||
|
var body_raw_cost = {
|
||||||
|
|
||||||
|
'TimePeriod': {
|
||||||
|
'Start': AWS.params.start_time,
|
||||||
|
'End': AWS.params.end_date
|
||||||
|
},
|
||||||
|
'Granularity': 'DAILY',
|
||||||
|
'GroupBy': [
|
||||||
|
{
|
||||||
|
'Type': 'DIMENSION',
|
||||||
|
'Key': 'SERVICE'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'Metrics': ['BlendedCost']
|
||||||
|
};
|
||||||
|
|
||||||
|
return AWS.getField(AWS.request('POST', AWS.params.region, 'ce', '', body_raw_cost, 'AWSInsightsIndexService.GetCostAndUsage'), 'ResultsByTime');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
AWS.setParams(JSON.parse(value));
|
||||||
|
|
||||||
|
return JSON.stringify(AWS.getCostAndUsage());
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
error += (String(error).endsWith('.')) ? '' : '.';
|
||||||
|
Zabbix.log(3, '[ AWS Billing ] ERROR: ' + error);
|
||||||
|
|
||||||
|
return JSON.stringify({ 'error': error });
|
||||||
|
}
|
||||||
|
description: 'Get raw data on the daily costs by service.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHECK_NOT_SUPPORTED
|
||||||
|
parameters:
|
||||||
|
- '-1'
|
||||||
|
timeout: 15s
|
||||||
|
parameters:
|
||||||
|
- name: AccessKeyId
|
||||||
|
value: '{$AWS.ACCESS.KEY.ID}'
|
||||||
|
- name: auth_type
|
||||||
|
value: '{$AWS.AUTH_TYPE}'
|
||||||
|
- name: metadata_auth
|
||||||
|
value: '{$AWS.ASSUME.ROLE.AUTH.METADATA}'
|
||||||
|
- name: proxy
|
||||||
|
value: '{$AWS.PROXY}'
|
||||||
|
- name: region
|
||||||
|
value: '{$AWS.BILLING.REGION}'
|
||||||
|
- name: role_arn
|
||||||
|
value: '{$AWS.ASSUME.ROLE.ARN}'
|
||||||
|
- name: SecretAccessKey
|
||||||
|
value: '{$AWS.SECRET.ACCESS.KEY}'
|
||||||
|
- name: sts_region
|
||||||
|
value: '{$AWS.STS.REGION}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"AWS Cost Explorer"}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 7139ce562d3c439e9686ad5b17ed0f1c
|
||||||
|
name: 'Get monthly costs'
|
||||||
|
type: SCRIPT
|
||||||
|
key: aws.get.monthly.costs
|
||||||
|
delay: 0s;h9
|
||||||
|
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 AWS = {
|
||||||
|
params: {},
|
||||||
|
metadata: 'http://169.254.169.254/latest/',
|
||||||
|
|
||||||
|
getRoleBaseCredentials: function () {
|
||||||
|
AWS.params['auth_type'] = 'role_base';
|
||||||
|
var request = new HttpRequest({SSLVerifyPeer: false, SSLVerifyHost: false});
|
||||||
|
if (typeof AWS.params.proxy !== 'undefined' && AWS.params.proxy !== '') {
|
||||||
|
request.setProxy(AWS.params.proxy);
|
||||||
|
}
|
||||||
|
request.addHeader('X-aws-ec2-metadata-token-ttl-seconds: 21600');
|
||||||
|
var token = request.put(AWS.metadata + 'api/token');
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200 || token === null || token === '') {
|
||||||
|
throw 'Error getting IMDSv2 session token.';
|
||||||
|
}
|
||||||
|
request.addHeader('X-aws-ec2-metadata-token: ' + token);
|
||||||
|
var IamRoleName = request.get(AWS.metadata + 'meta-data/iam/security-credentials');
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200 || IamRoleName === null || IamRoleName === '') {
|
||||||
|
throw 'Error getting security credentials from instance metadata. Role not found.';
|
||||||
|
}
|
||||||
|
|
||||||
|
credentials = request.get(AWS.metadata + 'meta-data/iam/security-credentials/' + encodeURI(IamRoleName));
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200 || credentials === null || credentials === '') {
|
||||||
|
throw 'Error getting security credentials from instance metadata.';
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
credentials = JSON.parse(credentials);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from instance metadata. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
['AccessKeyId', 'SecretAccessKey', 'Token'].forEach(function (field) {
|
||||||
|
if (typeof credentials !== 'object' || typeof credentials[field] === 'undefined' || credentials[field] === '') {
|
||||||
|
throw 'Required credentials are not set: "' + field + '".';
|
||||||
|
};
|
||||||
|
AWS.params[field] = credentials[field];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
setParams: function (params) {
|
||||||
|
AWS.tls = new CTlsConfig(params.tls_verify);
|
||||||
|
AWS.params['proxy'] = params.proxy;
|
||||||
|
switch (AWS.getField(params, 'auth_type')) {
|
||||||
|
case 'role_base':
|
||||||
|
AWS.getRoleBaseCredentials();
|
||||||
|
break;
|
||||||
|
case 'assume_role':
|
||||||
|
if (typeof params.metadata_auth === 'undefined' || params.metadata_auth === '' || (params.metadata_auth !== 'true' && params.metadata_auth !== 'false')) {
|
||||||
|
throw 'Required param metadata_auth for assume_role is not set or has invalid value: "' + params.metadata_auth + '". Expected "true" or "false".';
|
||||||
|
}
|
||||||
|
if (params.metadata_auth === 'true') {
|
||||||
|
AWS.getRoleBaseCredentials();
|
||||||
|
AWS.params['SessionToken'] = AWS.params['Token'];
|
||||||
|
AWS.params['auth_type'] = 'assume_role_metadata';
|
||||||
|
|
||||||
|
['sts_region', 'role_arn'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.metadata_auth === 'false') {
|
||||||
|
AWS.params['auth_type'] = 'assume_role';
|
||||||
|
|
||||||
|
['AccessKeyId', 'SecretAccessKey', 'sts_region', 'role_arn'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const role_arn_regex = /role\/(.+)$/;
|
||||||
|
const match = AWS.params.role_arn.match(role_arn_regex);
|
||||||
|
if (!match) {
|
||||||
|
throw 'Invalid role ARN format.';
|
||||||
|
}
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
'Action': 'AssumeRole',
|
||||||
|
'Version': '2011-06-15',
|
||||||
|
'RoleArn': AWS.params.role_arn,
|
||||||
|
'RoleSessionName': match[1] + 'Session',
|
||||||
|
};
|
||||||
|
|
||||||
|
credentials = AWS.getField(AWS.request('POST', AWS.params.sts_region, 'sts', AWS.prepareParams(payload), ''), 'AssumeRoleResponse.AssumeRoleResult.Credentials');
|
||||||
|
|
||||||
|
['AccessKeyId', 'SecretAccessKey', 'SessionToken'].forEach(function (field) {
|
||||||
|
if (typeof credentials !== 'object' || typeof credentials[field] === 'undefined' || credentials[field] === '') {
|
||||||
|
throw 'Required credentials are not set: "' + field + '".';
|
||||||
|
};
|
||||||
|
AWS.params[field] = credentials[field];
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
AWS.params['auth_type'] = 'access_key';
|
||||||
|
['AccessKeyId', 'SecretAccessKey'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
['region', 'month'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
AWS.params[field] = params[field];
|
||||||
|
});
|
||||||
|
|
||||||
|
today = new Date();
|
||||||
|
AWS.params.end_date = today.toDateString();
|
||||||
|
month = today.getMonth();
|
||||||
|
today.setMonth(month - params.month);
|
||||||
|
AWS.params.start_time = new Date(today.getFullYear(), today.getMonth()).toDateString();
|
||||||
|
},
|
||||||
|
|
||||||
|
sign: function (key, message) {
|
||||||
|
var hex = hmac('sha256', key, message);
|
||||||
|
|
||||||
|
if ((hex.length % 2) === 1) {
|
||||||
|
throw 'Invalid length of a hex string!';
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = new Int8Array(hex.length / 2);
|
||||||
|
for (var i = 0, b = 0; i < hex.length; i += 2, b++) {
|
||||||
|
result[b] = parseInt(hex.substring(i, i + 2), 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
prepareParams: function (params) {
|
||||||
|
var result = [];
|
||||||
|
|
||||||
|
Object.keys(params).sort().forEach(function (key) {
|
||||||
|
if (typeof params[key] !== 'object') {
|
||||||
|
result.push(key + '=' + encodeURIComponent(params[key]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result.push(prepareObject(key, params[key]));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result.join('&');
|
||||||
|
},
|
||||||
|
|
||||||
|
getField: function (data, path) {
|
||||||
|
var steps = path.split('.');
|
||||||
|
for (var i = 0; i < steps.length; i++) {
|
||||||
|
var step = steps[i];
|
||||||
|
if (typeof data !== 'object' || typeof data[step] === 'undefined') {
|
||||||
|
throw 'Required field was not found: ' + path;
|
||||||
|
}
|
||||||
|
data = data[step];
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
request: function (method, region, service, params, data, target) {
|
||||||
|
if (typeof data === 'undefined' || data === null) {
|
||||||
|
data = '';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data = JSON.stringify(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
var amzdate = (new Date()).toISOString().replace(/\.\d+Z/, 'Z').replace(/[-:]/g, ''),
|
||||||
|
date = amzdate.replace(/T\d+Z/, ''),
|
||||||
|
canonical_uri = '/',
|
||||||
|
host = service + '.' + region + '.amazonaws.com',
|
||||||
|
canonical_headers = 'content-encoding:amz-1.0\n' + 'host:' + host + '\n' + 'x-amz-date:' + amzdate + '\n',
|
||||||
|
signed_headers = 'content-encoding;host;x-amz-date',
|
||||||
|
canonical_request = method + '\n' + canonical_uri + '\n' + params + '\n' + canonical_headers + '\n' + signed_headers + '\n' + sha256(data),
|
||||||
|
credential_scope = date + '/' + region + '/' + service + '/' + 'aws4_request',
|
||||||
|
request_string = 'AWS4-HMAC-SHA256' + '\n' + amzdate + '\n' + credential_scope + '\n' + sha256(canonical_request),
|
||||||
|
key = AWS.sign('AWS4' + AWS.params.SecretAccessKey, date),
|
||||||
|
key = AWS.sign(key, region),
|
||||||
|
key = AWS.sign(key, service),
|
||||||
|
key = AWS.sign(key, 'aws4_request'),
|
||||||
|
request = new HttpRequest(AWS.tls.options),
|
||||||
|
url = 'https://' + host + canonical_uri + '?' + params;
|
||||||
|
|
||||||
|
if (typeof AWS.params.proxy !== 'undefined' && AWS.params.proxy !== '') {
|
||||||
|
request.setProxy(AWS.params.proxy);
|
||||||
|
}
|
||||||
|
request.addHeader('x-amz-date: ' + amzdate);
|
||||||
|
request.addHeader('x-amz-content-sha256:' + sha256(data));
|
||||||
|
request.addHeader('Accept: application/json');
|
||||||
|
request.addHeader('Content-Type: application/x-amz-json-1.1');
|
||||||
|
request.addHeader('Content-Encoding: amz-1.0');
|
||||||
|
request.addHeader('X-Amz-Target: ' + target);
|
||||||
|
request.addHeader('Authorization: ' + 'AWS4-HMAC-SHA256 Credential=' + AWS.params.AccessKeyId + '/' + credential_scope + ', ' + 'SignedHeaders=' + signed_headers + ', ' + 'Signature=' + hmac('sha256', key, request_string));
|
||||||
|
if (AWS.params.auth_type === 'role_base' || AWS.params.auth_type === 'assume_role_metadata' || (AWS.params.auth_type === 'assume_role' & !params.includes('AssumeRole'))) {
|
||||||
|
request.addHeader('X-Amz-Security-Token: ' + (AWS.params.auth_type === 'role_base' ? AWS.params.Token : AWS.params.SessionToken));
|
||||||
|
}
|
||||||
|
|
||||||
|
Zabbix.log(4, '[ AWS Billing ] Sending request: ' + url);
|
||||||
|
response = request.post(url, data);
|
||||||
|
Zabbix.log(4, '[ AWS Billing ] Received response with the status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200) {
|
||||||
|
throw 'Request failed with the status code ' + request.getStatus() + ': ' + response;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse the response received from AWS API. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
},
|
||||||
|
|
||||||
|
getCostMonth: function () {
|
||||||
|
var body_raw_cost = {
|
||||||
|
'TimePeriod': {
|
||||||
|
'Start': AWS.params.start_time,
|
||||||
|
'End': AWS.params.end_date
|
||||||
|
},
|
||||||
|
'Granularity': 'MONTHLY',
|
||||||
|
'Metrics': ['BlendedCost']
|
||||||
|
};
|
||||||
|
result = AWS.getField(AWS.request('POST', AWS.params.region, 'ce', '', body_raw_cost, 'AWSInsightsIndexService.GetCostAndUsage'), 'ResultsByTime');
|
||||||
|
|
||||||
|
return result.map(function (data) {
|
||||||
|
return {
|
||||||
|
'amount': AWS.getField(data, 'Total.BlendedCost.Amount'),
|
||||||
|
'unit': AWS.getField(data, 'Total.BlendedCost.Unit'),
|
||||||
|
'month': AWS.getField(data, 'TimePeriod.Start').slice(0, 7)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getCostMonthService: function () {
|
||||||
|
var body_raw_cost = {
|
||||||
|
'TimePeriod': {
|
||||||
|
'Start': AWS.params.start_time,
|
||||||
|
'End': AWS.params.end_date
|
||||||
|
},
|
||||||
|
'GroupBy': [
|
||||||
|
{
|
||||||
|
'Type': 'DIMENSION',
|
||||||
|
'Key': 'SERVICE'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'Granularity': 'MONTHLY',
|
||||||
|
'Metrics': ['BlendedCost']
|
||||||
|
};
|
||||||
|
MetricData = AWS.getField(AWS.request('POST', AWS.params.region, 'ce', '', body_raw_cost, 'AWSInsightsIndexService.GetCostAndUsage'), 'ResultsByTime');
|
||||||
|
var services = [];
|
||||||
|
MetricData.forEach(function (data) {
|
||||||
|
month = AWS.getField(data, 'TimePeriod.Start').slice(0, 7);
|
||||||
|
groups = AWS.getField(data, 'Groups');
|
||||||
|
groups.forEach(function (group) {
|
||||||
|
group.month = month;
|
||||||
|
services.push(group);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
AWS.setParams(JSON.parse(value));
|
||||||
|
|
||||||
|
monthly_costs = AWS.getCostMonth();
|
||||||
|
monthly_service_costs = AWS.getCostMonthService();
|
||||||
|
|
||||||
|
return JSON.stringify({ monthly_costs, monthly_service_costs });
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
error += (String(error).endsWith('.')) ? '' : '.';
|
||||||
|
Zabbix.log(3, '[ AWS Billing ] ERROR: ' + error);
|
||||||
|
|
||||||
|
return JSON.stringify({ 'error': error });
|
||||||
|
}
|
||||||
|
description: 'Get raw data on the monthly costs by service.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHECK_NOT_SUPPORTED
|
||||||
|
parameters:
|
||||||
|
- '-1'
|
||||||
|
timeout: 15s
|
||||||
|
parameters:
|
||||||
|
- name: AccessKeyId
|
||||||
|
value: '{$AWS.ACCESS.KEY.ID}'
|
||||||
|
- name: auth_type
|
||||||
|
value: '{$AWS.AUTH_TYPE}'
|
||||||
|
- name: metadata_auth
|
||||||
|
value: '{$AWS.ASSUME.ROLE.AUTH.METADATA}'
|
||||||
|
- name: month
|
||||||
|
value: '{$AWS.BILLING.MONTH}'
|
||||||
|
- name: proxy
|
||||||
|
value: '{$AWS.PROXY}'
|
||||||
|
- name: region
|
||||||
|
value: '{$AWS.BILLING.REGION}'
|
||||||
|
- name: role_arn
|
||||||
|
value: '{$AWS.ASSUME.ROLE.ARN}'
|
||||||
|
- name: SecretAccessKey
|
||||||
|
value: '{$AWS.SECRET.ACCESS.KEY}'
|
||||||
|
- name: sts_region
|
||||||
|
value: '{$AWS.STS.REGION}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"AWS Cost Explorer"}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 5773c41da90d4a38aff02fccec733741
|
||||||
|
name: 'AWS monthly costs by services discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: aws.cost.service.monthly.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
value: '{$AWS.BILLING.LLD.FILTER.SERVICE.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
value: '{$AWS.BILLING.LLD.FILTER.SERVICE.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery of monthly costs by services.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: d01ee8df0e204f1a857b8188df47402a
|
||||||
|
name: '[{#AWS.BILLING.SERVICE.NAME}]: Month [{#AWS.BILLING.MONTH}] Blended cost'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'aws.monthly.service.cost["{#AWS.BILLING.SERVICE.NAME}", "{#AWS.BILLING.MONTH}"]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '!{#AWS.BILLING.UNIT}'
|
||||||
|
description: 'The monthly cost by service {#AWS.BILLING.SERVICE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.monthly_service_costs.[?(@.month == "{#AWS.BILLING.MONTH}")]'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@.Keys =~ "{#AWS.BILLING.SERVICE.NAME}")]..Metrics.BlendedCost.Amount.first()'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: aws.get.monthly.costs
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: billing
|
||||||
|
- tag: month
|
||||||
|
value: '{#AWS.BILLING.MONTH}'
|
||||||
|
- tag: service
|
||||||
|
value: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: b267e0ae08d34a7dae730848577aea68
|
||||||
|
name: 'AWS Cost: [{#AWS.BILLING.SERVICE.NAME}]: Month [{#AWS.BILLING.MONTH}] Blended cost'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 2E7D32
|
||||||
|
item:
|
||||||
|
host: 'AWS Cost Explorer by HTTP'
|
||||||
|
key: 'aws.monthly.service.cost["{#AWS.BILLING.SERVICE.NAME}", "{#AWS.BILLING.MONTH}"]'
|
||||||
|
master_item:
|
||||||
|
key: aws.get.monthly.costs
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#AWS.BILLING.MONTH}'
|
||||||
|
path: $..month.first()
|
||||||
|
- lld_macro: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
path: $..Keys.first().first()
|
||||||
|
- lld_macro: '{#AWS.BILLING.UNIT}'
|
||||||
|
path: $..Metrics.BlendedCost.Unit.first()
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.monthly_service_costs
|
||||||
|
- uuid: 6e65d15251ea4355ac41ed7956f9e5b0
|
||||||
|
name: 'AWS daily costs by services discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: aws.daily.services.costs.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
value: '{$AWS.BILLING.LLD.FILTER.SERVICE.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
value: '{$AWS.BILLING.LLD.FILTER.SERVICE.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery of daily blended costs by services.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: b6e121c3a1eb49858e942beab12660e2
|
||||||
|
name: 'Service [{#AWS.BILLING.SERVICE.NAME}]: Blended daily cost'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'aws.daily.service.cost["{#AWS.BILLING.SERVICE.NAME}"]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '!{#AWS.BILLING.UNIT}'
|
||||||
|
description: 'The daily blended cost of the {#AWS.BILLING.SERVICE.NAME} service for the previous day.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$..Groups..[?(@.Keys =~ "{#AWS.BILLING.SERVICE.NAME}")]..Metrics.BlendedCost.Amount.first()'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: aws.get.daily.costs
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: billing
|
||||||
|
- tag: service
|
||||||
|
value: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 71646982ab55405dbc10f200e8050c93
|
||||||
|
name: 'AWS Cost: Service [{#AWS.BILLING.SERVICE.NAME}]: Blended daily cost'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 2E7D32
|
||||||
|
item:
|
||||||
|
host: 'AWS Cost Explorer by HTTP'
|
||||||
|
key: 'aws.daily.service.cost["{#AWS.BILLING.SERVICE.NAME}"]'
|
||||||
|
master_item:
|
||||||
|
key: aws.get.daily.costs
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#AWS.BILLING.SERVICE.NAME}'
|
||||||
|
path: $..Keys.first().first()
|
||||||
|
- lld_macro: '{#AWS.BILLING.UNIT}'
|
||||||
|
path: $..Metrics.BlendedCost.Unit.first()
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $..Groups.first()
|
||||||
|
- uuid: b554f00ba68e4ea391f7c7d029efde4f
|
||||||
|
name: 'AWS monthly costs discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: aws.monthly.cost.discovery
|
||||||
|
delay: '0'
|
||||||
|
description: 'Discovery of monthly costs.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: aaf85a53d1804c858fc20189f0483bad
|
||||||
|
name: '[{#AWS.BILLING.MONTH}]: Blended cost per month'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'aws.monthly.cost["{#AWS.BILLING.MONTH}"]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '!{#AWS.BILLING.UNIT}'
|
||||||
|
description: 'The blended cost by month {#AWS.BILLING.MONTH}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.monthly_costs.[?(@.month == "{#AWS.BILLING.MONTH}")].amount.first()'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
master_item:
|
||||||
|
key: aws.get.monthly.costs
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: billing
|
||||||
|
- tag: month
|
||||||
|
value: '{#AWS.BILLING.MONTH}'
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 3e01a98ed70149e3a6a083bb103aa496
|
||||||
|
name: 'AWS Cost: [{#AWS.BILLING.MONTH}]: Monthly blended cost'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 2E7D32
|
||||||
|
item:
|
||||||
|
host: 'AWS Cost Explorer by HTTP'
|
||||||
|
key: 'aws.monthly.cost["{#AWS.BILLING.MONTH}"]'
|
||||||
|
master_item:
|
||||||
|
key: aws.get.monthly.costs
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#AWS.BILLING.MONTH}'
|
||||||
|
path: $..month.first()
|
||||||
|
- lld_macro: '{#AWS.BILLING.UNIT}'
|
||||||
|
path: $..unit.first()
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.monthly_costs
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: cloud
|
||||||
|
- tag: target
|
||||||
|
value: aws
|
||||||
|
- tag: target
|
||||||
|
value: cost
|
||||||
|
macros:
|
||||||
|
- macro: '{$AWS.ACCESS.KEY.ID}'
|
||||||
|
description: 'Access key ID.'
|
||||||
|
- macro: '{$AWS.ASSUME.ROLE.ARN}'
|
||||||
|
description: 'ARN assume role; add when using the `assume_role` authorization method.'
|
||||||
|
- macro: '{$AWS.ASSUME.ROLE.AUTH.METADATA}'
|
||||||
|
value: 'false'
|
||||||
|
description: 'Add when using the `assume_role` through instance metadata or environment authorization method. Possible values: `false`, `true`.'
|
||||||
|
- macro: '{$AWS.AUTH_TYPE}'
|
||||||
|
value: access_key
|
||||||
|
description: 'Authorization method. Possible values: `access_key`, `assume_role`, `role_base`.'
|
||||||
|
- macro: '{$AWS.BILLING.LLD.FILTER.SERVICE.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'Filter of discoverable discovered billing service by name.'
|
||||||
|
- macro: '{$AWS.BILLING.LLD.FILTER.SERVICE.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'Filter to exclude discovered billing service by name.'
|
||||||
|
- macro: '{$AWS.BILLING.MONTH}'
|
||||||
|
value: '11'
|
||||||
|
description: 'Months to get historical data from AWS Cost Explore API, no more than 12 months.'
|
||||||
|
- macro: '{$AWS.BILLING.REGION}'
|
||||||
|
value: us-east-1
|
||||||
|
description: 'Amazon Billing region code.'
|
||||||
|
- macro: '{$AWS.PROXY}'
|
||||||
|
description: 'Sets HTTP proxy value. If this macro is empty, then no proxy is used.'
|
||||||
|
- macro: '{$AWS.SECRET.ACCESS.KEY}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Secret access key.'
|
||||||
|
- macro: '{$AWS.STS.REGION}'
|
||||||
|
value: us-east-1
|
||||||
|
description: 'Region used in assume role request.'
|
||||||
|
- 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 "AWS Cost Explorer", e.g. {$HTTP.TLS.VERIFY:"AWS Cost Explorer"}.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: e1e4edbf129142b4b27a9471db1ed8e2
|
||||||
|
name: 'Overview AWS Costs'
|
||||||
|
pages:
|
||||||
|
- name: 'Monthly costs'
|
||||||
|
widgets:
|
||||||
|
- type: graphprototype
|
||||||
|
width: '72'
|
||||||
|
height: '25'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'AWS Cost Explorer by HTTP'
|
||||||
|
name: 'AWS Cost: [{#AWS.BILLING.MONTH}]: Monthly blended cost'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '6'
|
||||||
|
- name: 'Monthly costs by service'
|
||||||
|
widgets:
|
||||||
|
- type: graphprototype
|
||||||
|
width: '72'
|
||||||
|
height: '25'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'AWS Cost Explorer by HTTP'
|
||||||
|
name: 'AWS Cost: [{#AWS.BILLING.SERVICE.NAME}]: Month [{#AWS.BILLING.MONTH}] Blended cost'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '6'
|
||||||
|
- name: 'Daily costs by service'
|
||||||
|
widgets:
|
||||||
|
- type: graphprototype
|
||||||
|
width: '72'
|
||||||
|
height: '20'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'AWS Cost Explorer by HTTP'
|
||||||
|
name: 'AWS Cost: Service [{#AWS.BILLING.SERVICE.NAME}]: Blended daily cost'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAC
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '5'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+2962
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,116 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
host_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Applications
|
||||||
|
templates:
|
||||||
|
- uuid: d0571c5f2c204b7ab244843040288a35
|
||||||
|
template: 'Acronis Cyber Protect Cloud by HTTP'
|
||||||
|
name: 'Acronis Cyber Protect Cloud by HTTP'
|
||||||
|
description: |
|
||||||
|
Requests Acronis Cyber Protect Cloud API access token and creates host prototype for MSP.
|
||||||
|
|
||||||
|
Template uses HTTP item to query Acronis Cyber Protect Cloud API client for authorization.
|
||||||
|
|
||||||
|
Read the template documentation prior to using this template.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-0
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: bce642c2c6e743ccb618c96f6ca533da
|
||||||
|
name: 'Get access token'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: acronis.cpc.account_manager.get_token
|
||||||
|
delay: '{$ACRONIS.CPC.AUTH.INTERVAL}'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
authtype: BASIC
|
||||||
|
username: '{$ACRONIS.CPC.AUTH.CLIENT.ID}'
|
||||||
|
password: '{$ACRONIS.CPC.AUTH.SECRET}'
|
||||||
|
description: 'Authorizes API user and receives access token.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
value = JSON.parse(value)
|
||||||
|
|
||||||
|
var list = []
|
||||||
|
list.push({'scope': value['scope'].split(':')[3], 'access_token': value['access_token']})
|
||||||
|
return JSON.stringify(list);
|
||||||
|
timeout: 15s
|
||||||
|
url: '{$ACRONIS.CPC.DATACENTER.URL}{$ACRONIS.CPC.PATH.ACCOUNT.MANAGEMENT}/idp/token'
|
||||||
|
status_codes: ''
|
||||||
|
posts: grant_type=client_credentials
|
||||||
|
http_proxy: '{$ACRONIS.CPC.HTTP.PROXY}'
|
||||||
|
headers:
|
||||||
|
- name: Content-Type
|
||||||
|
value: application/x-www-form-urlencoded
|
||||||
|
- name: X-Application-Secret
|
||||||
|
value: 5619386d-de56-49ec-8508-f5c399d3b9bd
|
||||||
|
request_method: POST
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: authorization
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: d2c30d84c5f44734bc2f0ef38e99a959
|
||||||
|
name: 'Acronis CPC: MSP Discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: acronis.cpc.lld.msp_discovery
|
||||||
|
delay: '0'
|
||||||
|
description: 'Discovers MSP and creates host prototype based on that.'
|
||||||
|
host_prototypes:
|
||||||
|
- uuid: bbdc747270f64876bc701dd87c27dbbe
|
||||||
|
host: 'Acronis CPC MSP {#SCOPE}'
|
||||||
|
name: 'Acronis CPC MSP {#SCOPE}'
|
||||||
|
group_links:
|
||||||
|
- group:
|
||||||
|
name: Applications
|
||||||
|
templates:
|
||||||
|
- name: 'Acronis Cyber Protect Cloud MSP by HTTP'
|
||||||
|
macros:
|
||||||
|
- macro: '{$ACRONIS.CPC.ACCESS_TOKEN}'
|
||||||
|
value: '{#ACCESS_TOKEN}'
|
||||||
|
description: 'Acronis CPC API access token.'
|
||||||
|
- macro: '{$ACRONIS.CPC.MSP.TENANT.UUID}'
|
||||||
|
value: '{#SCOPE}'
|
||||||
|
description: 'UUID of API client tenant.'
|
||||||
|
master_item:
|
||||||
|
key: acronis.cpc.account_manager.get_token
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#ACCESS_TOKEN}'
|
||||||
|
path: $.access_token
|
||||||
|
- lld_macro: '{#SCOPE}'
|
||||||
|
path: $.scope
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: application
|
||||||
|
- tag: target
|
||||||
|
value: acronis
|
||||||
|
- tag: target
|
||||||
|
value: cyber-protect-cloud
|
||||||
|
macros:
|
||||||
|
- macro: '{$ACRONIS.CPC.AUTH.CLIENT.ID}'
|
||||||
|
description: 'Client ID for API user access.'
|
||||||
|
- macro: '{$ACRONIS.CPC.AUTH.INTERVAL}'
|
||||||
|
value: 110m
|
||||||
|
description: 'API token regeneration interval, in minutes. By default, Acronis Cyber Protect Cloud tokens expire after 2 hours.'
|
||||||
|
- macro: '{$ACRONIS.CPC.AUTH.SECRET}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Secret for API user access.'
|
||||||
|
- macro: '{$ACRONIS.CPC.DATACENTER.URL}'
|
||||||
|
description: 'Acronis Cyber Protect Cloud datacenter URL, e.g., https://eu2-cloud.acronis.com.'
|
||||||
|
- macro: '{$ACRONIS.CPC.HTTP.PROXY}'
|
||||||
|
description: 'Sets the HTTP proxy for the authorization item. Host prototypes will also use this value for HTTP proxy. If this parameter is empty, then no proxy is used.'
|
||||||
|
- macro: '{$ACRONIS.CPC.PATH.ACCOUNT.MANAGEMENT}'
|
||||||
|
value: /api/2
|
||||||
|
description: 'Sub-path for the Account Management API.'
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,777 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: c87e0a2e0683483ab7c6f3c380e9f840
|
||||||
|
template: 'Apache ActiveMQ by JMX'
|
||||||
|
name: 'Apache ActiveMQ by JMX'
|
||||||
|
description: |
|
||||||
|
The template to monitor Apache ActiveMQ by Zabbix that work without any external scripts.
|
||||||
|
The metrics are collected by JMX.
|
||||||
|
You can set macro values and add macros with context for specific brokers or destinations following macro description.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/411049-discussion-thread-for-official-zabbix-template-amq
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: cbd9f98c2c1e412081a546e18066a868
|
||||||
|
name: 'Brokers discovery'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx.discovery[beans,"org.apache.activemq:type=Broker,brokerName=*"]'
|
||||||
|
delay: 1h
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
filter:
|
||||||
|
evaltype: FORMULA
|
||||||
|
formula: 'A and B'
|
||||||
|
conditions:
|
||||||
|
- macro: '{#JMXBROKERNAME}'
|
||||||
|
value: '{$ACTIVEMQ.LLD.FILTER.BROKER.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#JMXBROKERNAME}'
|
||||||
|
value: '{$ACTIVEMQ.LLD.FILTER.BROKER.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery of brokers'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 29a0f197bfe847d596dad4923364490e
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Version'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},BrokerVersion]'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'The version of the broker.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: inventory
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 7902d81681874aa3acf33d90316f9864
|
||||||
|
expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},BrokerVersion],#1)<>last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},BrokerVersion],#2) and length(last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},BrokerVersion]))>0'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Version has been changed'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Version has changed (new version: {ITEM.VALUE})'
|
||||||
|
priority: INFO
|
||||||
|
description: 'The Broker {#JMXBROKERNAME} version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 85c19ccb8b6a4242a8ba699e76836427
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Memory limit'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},MemoryLimit]'
|
||||||
|
units: B
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Memory limit, in bytes, used for holding undelivered messages before paging to temporary storage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: 5e2a5638adf6405087014bfcfc8ffc93
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Memory usage in percents'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ}, MemoryPercentUsage]'
|
||||||
|
units: '%'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Percent of memory limit used.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: e805b8cca9744940affc3bdd234a7587
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ}, MemoryPercentUsage],{$ACTIVEMQ.MEM.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Memory usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}%)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 3e741e339fff422fae67b5333faa1e20
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ}, MemoryPercentUsage],{$ACTIVEMQ.MEM.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.MEM.MAX.WARN:"{#JMXBROKERNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Memory usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.WARN:"{#JMXBROKERNAME}"}%)'
|
||||||
|
priority: AVERAGE
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Memory usage is too high'
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ}, MemoryPercentUsage],{$ACTIVEMQ.MEM.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 78806476b5cb4ce48f8ca8dbd173c7c3
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Storage limit'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},StoreLimit]'
|
||||||
|
units: B
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Disk limit, in bytes, used for persistent messages before producers are blocked.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: fc4c79543a6f4b7b9c22f11b61b644c9
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Storage usage in percents'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},StorePercentUsage]'
|
||||||
|
units: '%'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Percent of store limit used.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 2e1c9f92c87f446ebab68ac638c713c5
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},StorePercentUsage],{$ACTIVEMQ.STORE.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Storage usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Storage usage is too high (over {$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}%)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: capacity
|
||||||
|
- uuid: 271b33edce84439a91d6a253f45e5bf6
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},StorePercentUsage],{$ACTIVEMQ.STORE.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.STORE.MAX.WARN:"{#JMXBROKERNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Storage usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Storage usage is too high (over {$ACTIVEMQ.STORE.MAX.WARN:"{#JMXBROKERNAME}"}%)'
|
||||||
|
priority: AVERAGE
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Storage usage is too high'
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},StorePercentUsage],{$ACTIVEMQ.STORE.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: capacity
|
||||||
|
- uuid: 09db80ee80ea47189142130d35a8e1c2
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Temp limit'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},TempLimit]'
|
||||||
|
units: B
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Disk limit, in bytes, used for non-persistent messages and temporary data before producers are blocked.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 95354144839e4d22a82c4e9a1fab83d9
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Temp usage in percents'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},TempPercentUsage]'
|
||||||
|
units: '%'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Percent of temp limit used.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 422252a81e3e4261bbd7f331f48c6257
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TempPercentUsage],{$ACTIVEMQ.TEMP.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.TEMP.MAX.HIGH}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Temp usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Temp usage is too high (over {$ACTIVEMQ.TEMP.MAX.WARN:"{#JMXBROKERNAME}"}%)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: capacity
|
||||||
|
- uuid: acb8f6e0762f48c2bd4c03f2a55b2f44
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TempPercentUsage],{$ACTIVEMQ.TEMP.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.TEMP.MAX.WARN}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Temp usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Temp usage is too high (over {$ACTIVEMQ.TEMP.MAX.WARN:"{#JMXBROKERNAME}"}%)'
|
||||||
|
priority: AVERAGE
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Temp usage is too high'
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TempPercentUsage],{$ACTIVEMQ.TEMP.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.TEMP.MAX.HIGH}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: capacity
|
||||||
|
- uuid: 64ab04e456804e10a6c78c3190807506
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Consumers count total'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalConsumerCount]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of consumers attached to this broker.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: broker
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 6906f0a1ef804da4a1203ca9d96ab8a0
|
||||||
|
expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalConsumerCount],{$ACTIVEMQ.BROKER.CONSUMERS.MIN.TIME:"{#JMXBROKERNAME}"})<{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Consumers count is too low'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Consumers count is too low (below {$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH:"{#JMXBROKERNAME}"} for {$ACTIVEMQ.BROKER.CONSUMERS.MIN.TIME:"{#JMXBROKERNAME}"})'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 48bc7dab4a1a40d8a823e880018cf8e7
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Messages dequeue rate'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalDequeueCount]'
|
||||||
|
units: messages/sec
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Rate of messages that have been delivered by the broker and acknowledged by consumers.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: broker
|
||||||
|
- uuid: a462499eecbd443e931a9aa831240f65
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Messages enqueue rate'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalEnqueueCount]'
|
||||||
|
units: messages/sec
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Rate of messages that have been sent to the broker.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: broker
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: a3ab7bca031c45059418fa82a3c67369
|
||||||
|
expression: 'avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalEnqueueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXBROKERNAME}"})>avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalEnqueueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXBROKERNAME}"})'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Message enqueue rate is higher than dequeue rate'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Message enqueue rate is higher than dequeue rate for {$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXBROKERNAME}"}'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'Enqueue rate is higher than dequeue rate. It may indicate performance problems.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 2453d8221cec4e1ead6622c001ac9a8c
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Producers count total'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalProducerCount]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of producers attached to this broker.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: broker
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 2ee6ad72a98143b59d8d1136fffdbe50
|
||||||
|
expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalProducerCount],{$ACTIVEMQ.BROKER.PRODUCERS.MIN.TIME:"{#JMXBROKERNAME}"})<{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Producers count is too low'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Producers count is too low (below {$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH:"{#JMXBROKERNAME}"} for {$ACTIVEMQ.BROKER.PRODUCERS.MIN.TIME:"{#JMXBROKERNAME}"})'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: a46d7281cb234ccaadacbb7d311cbd39
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Uptime'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},UptimeMillis]'
|
||||||
|
units: s
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'The uptime of the broker.'
|
||||||
|
preprocessing:
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '0.001'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 6abb3813bb52465aa4a5f4bebfe999c3
|
||||||
|
expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},UptimeMillis])<10m'
|
||||||
|
name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Broker has been restarted'
|
||||||
|
event_name: 'Apache ActiveMQ: Broker {#JMXBROKERNAME}: Broker has been restarted (uptime < 10m)'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Uptime is less than 10 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 465b9319e0dc4728a2733c69521e9e81
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Messages rate'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalEnqueueCount]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalDequeueCount]'
|
||||||
|
- uuid: 9cdb5b2bed724f45a305a8434d28c105
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Producers and consumers'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalProducerCount]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},TotalConsumerCount]'
|
||||||
|
- uuid: 6b018bbe9d154d2d865b7922eaa7ae28
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Resources usage'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ}, MemoryPercentUsage]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},StorePercentUsage]'
|
||||||
|
- sortorder: '2'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},TempPercentUsage]'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
- uuid: 14432547793d42d2b75c7b08fcbb3545
|
||||||
|
name: 'Destinations discovery'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx.discovery[beans,"org.apache.activemq:type=Broker,brokerName=*,destinationType=*,destinationName=*"]'
|
||||||
|
delay: 1h
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
filter:
|
||||||
|
evaltype: FORMULA
|
||||||
|
formula: 'A and B'
|
||||||
|
conditions:
|
||||||
|
- macro: '{#JMXDESTINATIONNAME}'
|
||||||
|
value: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#JMXDESTINATIONNAME}'
|
||||||
|
value: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery of destinations'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: fd8129c9a66043d896a70c91c8b0d471
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count total on {#JMXBROKERNAME}'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.CONSUMERS.COUNT: "{#JMXDESTINATIONNAME}"}]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of consumers attached to the broker of this destination. Used to suppress destination''s triggers when the count of consumers on the broker is lower than threshold.'
|
||||||
|
preprocessing:
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH}'
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH}'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
- uuid: 99f2094b02f848e785e40296958c5450
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count total on {#JMXBROKERNAME}'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.PRODUCERS.COUNT: "{#JMXDESTINATIONNAME}"}]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of producers attached to the broker of this destination. Used to suppress destination''s triggers when the count of producers on the broker is lower than threshold.'
|
||||||
|
preprocessing:
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH}'
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH}'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
- uuid: 5e93e53a0c2d49a49d421ded87b6b1f8
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},ConsumerCount]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of consumers attached to this destination.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
- uuid: 3536ec77069a434e854415f0a3270e67
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Messages dequeue rate'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},DequeueCount]'
|
||||||
|
units: messages/sec
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Rate of messages that has been acknowledged (and removed) from the destination.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
- uuid: a6dacc8c4d1f4724bf49c63449992035
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Messages enqueue rate'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},EnqueueCount]'
|
||||||
|
units: messages/sec
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Rate of messages that have been sent to the destination.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
- uuid: 1c4ea913a9564d74b31ef82314203a15
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Expired messages count'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},ExpiredCount]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of messages that have been expired.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: a498405c5b764c1ea9f0e151adf94ed7
|
||||||
|
expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ExpiredCount])>{$ACTIVEMQ.EXPIRED.WARN:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Expired messages count is high'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Expired messages count higher than {$ACTIVEMQ.EXPIRED.WARN:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'This metric represents the number of messages that expired before they could be delivered. If you expect all messages to be delivered and acknowledged within a certain amount of time, you can set an expiration for each message, and investigate if your ExpiredCount metric rises above zero.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 158fac5a1b3c4f07a4004a733f9b6995
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage in percents'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},MemoryPercentUsage]'
|
||||||
|
units: '%'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'The percentage of the memory limit used.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 197ab32730a84f79ba1b1e827a10e175
|
||||||
|
expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},MemoryPercentUsage])>{$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXDESTINATIONNAME}"}%)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 1e4e3a969b434c6d972251f8c9b3f2a7
|
||||||
|
expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},MemoryPercentUsage])>{$ACTIVEMQ.MEM.MAX.WARN:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage is too high'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.WARN:"{#JMXDESTINATIONNAME}"}%)'
|
||||||
|
priority: AVERAGE
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 82ee74872f6e46efbf16ae0705bcf2a6
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},ProducerCount]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of producers attached to this destination.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
- uuid: fdc1e26fbe6545d3bdfc86f6f8c91b8b
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Queue size'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},QueueSize]'
|
||||||
|
username: '{$ACTIVEMQ.USER}'
|
||||||
|
password: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
description: 'Number of messages on this destination, including any that have been dispatched but not acknowledged.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: destination
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: f1c49943152c407088e3bf288b650b41
|
||||||
|
expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},QueueSize],{$ACTIVEMQ.QUEUE.TIME:"{#JMXDESTINATIONNAME}"})>{$ACTIVEMQ.QUEUE.WARN:"{#JMXDESTINATIONNAME}"} and {$ACTIVEMQ.QUEUE.ENABLED:"{#JMXDESTINATIONNAME}"}=1'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Queue size is high'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Queue size higher than {$ACTIVEMQ.QUEUE.WARN:"{#JMXDESTINATIONNAME}"} for {$ACTIVEMQ.QUEUE.TIME:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'Queue size is higher than threshold. It may indicate performance problems.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: c366d4b329c0471386566d6795c5787f
|
||||||
|
expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ConsumerCount],{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})<{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} and last(/Apache ActiveMQ by JMX/jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.CONSUMERS.COUNT: "{#JMXDESTINATIONNAME}"}])>{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
recovery_mode: RECOVERY_EXPRESSION
|
||||||
|
recovery_expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ConsumerCount],{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})>={$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count is too low'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count is too low (below {$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} for {$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})'
|
||||||
|
priority: AVERAGE
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 344a0b83a5444d009aa56e97c1c0171b
|
||||||
|
expression: 'avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},EnqueueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXDESTINATIONNAME}"})>avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},DequeueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXDESTINATIONNAME}"})'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Message enqueue rate is higher than dequeue rate'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Message enqueue rate is higher than dequeue rate for {$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'Enqueue rate is higher than dequeue rate. It may indicate performance problems.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 725d0270554e4fe59d138becfa3e6377
|
||||||
|
expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ProducerCount],{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})<{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} and last(/Apache ActiveMQ by JMX/jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.PRODUCERS.COUNT: "{#JMXDESTINATIONNAME}"}])>{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
|
||||||
|
recovery_mode: RECOVERY_EXPRESSION
|
||||||
|
recovery_expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ProducerCount],{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})>={$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"}'
|
||||||
|
name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count is too low'
|
||||||
|
event_name: 'Apache ActiveMQ: {#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count is too low (below {$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} for {$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})'
|
||||||
|
priority: AVERAGE
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 006f397fbb664f9981b9228808870239
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},MemoryPercentUsage]'
|
||||||
|
- uuid: 1c9a999ec2b94942ad10f408b470b1a2
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Messages rate'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},EnqueueCount]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},DequeueCount]'
|
||||||
|
- uuid: 0854230a67bc4d29b3b3dc2cb7eeaefa
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers and consumers'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},ProducerCount]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},ConsumerCount]'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: application
|
||||||
|
- tag: target
|
||||||
|
value: apache-activemq
|
||||||
|
macros:
|
||||||
|
- macro: '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH}'
|
||||||
|
value: '1'
|
||||||
|
description: 'Minimum amount of consumers for broker. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.TIME}'
|
||||||
|
value: 5m
|
||||||
|
description: 'Time during which there may be no consumers on destination. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH}'
|
||||||
|
value: '1'
|
||||||
|
description: 'Minimum amount of producers for broker. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.TIME}'
|
||||||
|
value: 5m
|
||||||
|
description: 'Time during which there may be no producers on broker. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH}'
|
||||||
|
value: '1'
|
||||||
|
description: 'Minimum amount of consumers for destination. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME}'
|
||||||
|
value: 10m
|
||||||
|
description: 'Time during which there may be no consumers in destination. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH}'
|
||||||
|
value: '1'
|
||||||
|
description: 'Minimum amount of producers for destination. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME}'
|
||||||
|
value: 10m
|
||||||
|
description: 'Time during which there may be no producers on destination. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.EXPIRED.WARN}'
|
||||||
|
value: '0'
|
||||||
|
description: 'Threshold for expired messages count. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.LLD.FILTER.BROKER.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'Filter of discoverable discovered brokers'
|
||||||
|
- macro: '{$ACTIVEMQ.LLD.FILTER.BROKER.NOT_MATCHES}'
|
||||||
|
value: 'CHANGE IF NEEDED'
|
||||||
|
description: 'Filter to exclude discovered brokers'
|
||||||
|
- macro: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'Filter of discoverable discovered destinations'
|
||||||
|
- macro: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.NOT_MATCHES}'
|
||||||
|
value: 'CHANGE IF NEEDED'
|
||||||
|
description: 'Filter to exclude discovered destinations'
|
||||||
|
- macro: '{$ACTIVEMQ.MEM.MAX.HIGH}'
|
||||||
|
value: '90'
|
||||||
|
description: 'Memory threshold for HIGH trigger. Can be used with destination or broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.MEM.MAX.WARN}'
|
||||||
|
value: '75'
|
||||||
|
description: 'Memory threshold for AVERAGE trigger. Can be used with destination or broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.MEM.TIME}'
|
||||||
|
value: 5m
|
||||||
|
description: 'Time during which the metric can be above the threshold. Can be used with destination or broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.MSG.RATE.WARN.TIME}'
|
||||||
|
value: 15m
|
||||||
|
description: 'The time for message enqueue/dequeue rate. Can be used with destination or broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.PASSWORD}'
|
||||||
|
value: activemq
|
||||||
|
description: 'Password for JMX'
|
||||||
|
- macro: '{$ACTIVEMQ.PORT}'
|
||||||
|
value: '1099'
|
||||||
|
description: 'Port for JMX'
|
||||||
|
- macro: '{$ACTIVEMQ.QUEUE.ENABLED}'
|
||||||
|
value: '1'
|
||||||
|
description: 'Use this to disable alerting for specific destination. 1 = enabled, 0 = disabled. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.QUEUE.TIME}'
|
||||||
|
value: 10m
|
||||||
|
description: 'Time during which the QueueSize can be higher than threshold. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.QUEUE.WARN}'
|
||||||
|
value: '100'
|
||||||
|
description: 'Threshold for QueueSize. Can be used with destination name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.STORE.MAX.HIGH}'
|
||||||
|
value: '90'
|
||||||
|
description: 'Storage threshold for HIGH trigger. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.STORE.MAX.WARN}'
|
||||||
|
value: '75'
|
||||||
|
description: 'Storage threshold for AVERAGE trigger. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.STORE.TIME}'
|
||||||
|
value: 5m
|
||||||
|
description: 'Time during which the metric can be above the threshold. Can be used with destination or broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.TEMP.MAX.HIGH}'
|
||||||
|
value: '90'
|
||||||
|
description: 'Temp threshold for HIGH trigger. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.TEMP.MAX.WARN}'
|
||||||
|
value: '75'
|
||||||
|
description: 'Temp threshold for AVERAGE trigger. Can be used with broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.TEMP.TIME}'
|
||||||
|
value: 5m
|
||||||
|
description: 'Time during which the metric can be above the threshold. Can be used with destination or broker name as context.'
|
||||||
|
- macro: '{$ACTIVEMQ.TOTAL.CONSUMERS.COUNT}'
|
||||||
|
value: TotalConsumerCount
|
||||||
|
description: 'Attribute for TotalConsumerCount per destination. Used to suppress destination''s triggers when the count of consumers on the broker is lower than threshold.'
|
||||||
|
- macro: '{$ACTIVEMQ.TOTAL.PRODUCERS.COUNT}'
|
||||||
|
value: TotalProducerCount
|
||||||
|
description: 'Attribute for TotalProducerCount per destination. Used to suppress destination''s triggers when the count of consumers on the broker is lower than threshold.'
|
||||||
|
- macro: '{$ACTIVEMQ.USER}'
|
||||||
|
value: admin
|
||||||
|
description: 'User for JMX'
|
||||||
|
dashboards:
|
||||||
|
- uuid: 292193a9f5fc4a40a78aa304a6ceb536
|
||||||
|
name: 'Apache ActiveMQ: Overview'
|
||||||
|
pages:
|
||||||
|
- name: General
|
||||||
|
widgets:
|
||||||
|
- type: graphprototype
|
||||||
|
width: '36'
|
||||||
|
height: '15'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '3'
|
||||||
|
- type: graphprototype
|
||||||
|
x: '36'
|
||||||
|
width: '36'
|
||||||
|
height: '15'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache ActiveMQ by JMX'
|
||||||
|
name: 'Broker {#JMXBROKERNAME}: Resources usage'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '3'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,543 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: 3cc8c9ae7055458c9a803597007f70bd
|
||||||
|
template: 'Apache Tomcat by JMX'
|
||||||
|
name: 'Apache Tomcat by JMX'
|
||||||
|
description: |
|
||||||
|
The template to monitor Apache Tomcat by Zabbix that work without any external scripts.
|
||||||
|
The metrics are collected by JMX.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/411862-discussion-thread-for-official-zabbix-template-tomcat
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: 7f6ec0e48d41456896799f487cd8243e
|
||||||
|
name: Version
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx["Catalina:type=Server",serverInfo]'
|
||||||
|
value_type: CHAR
|
||||||
|
trends: '0'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'The version of the Tomcat.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1d
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 152d235652914aa2af78334385334214
|
||||||
|
expression: 'last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0'
|
||||||
|
name: 'Apache Tomcat: Version has been changed'
|
||||||
|
event_name: 'Apache Tomcat: Version has changed (new version: {ITEM.VALUE})'
|
||||||
|
priority: INFO
|
||||||
|
description: 'The Tomcat version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: a478be537e5f48fe95310997d0df0eda
|
||||||
|
name: 'Protocol handlers discovery'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"]'
|
||||||
|
delay: 1h
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#JMXATTR}'
|
||||||
|
value: ^name$
|
||||||
|
formulaid: A
|
||||||
|
description: 'Discovery for ProtocolHandler'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 830f58f8ad6640d989a70c01f7aa2ad8
|
||||||
|
name: '{#JMXVALUE}: Gzip compression status'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},compression]'
|
||||||
|
value_type: CHAR
|
||||||
|
trends: '0'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: protocol-handler
|
||||||
|
- tag: protocol-handler
|
||||||
|
value: '{#JMXVALUE}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 7d707de73a164f1db6b69e4dcb8c6ae9
|
||||||
|
expression: 'find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1'
|
||||||
|
name: 'Apache Tomcat: {#JMXVALUE}: Gzip compression is disabled'
|
||||||
|
priority: INFO
|
||||||
|
description: 'gzip compression is disabled for connector {#JMXVALUE}.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
- uuid: 77175f79fe844bb8bca66de437a3ba32
|
||||||
|
name: 'Global request processors discovery'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"]'
|
||||||
|
delay: 1h
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#JMXNAME}'
|
||||||
|
value: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#JMXNAME}'
|
||||||
|
value: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery for GlobalRequestProcessor'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: d7cb07f3f5e04792850332c416284dd9
|
||||||
|
name: '{#JMXNAME}: Bytes received per second'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},bytesReceived]'
|
||||||
|
units: B
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Bytes received rate by processor {#JMXNAME}'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: request
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
- uuid: abad7332ed6b417c92f6038ce12ae000
|
||||||
|
name: '{#JMXNAME}: Bytes sent per second'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},bytesSent]'
|
||||||
|
units: B
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Bytes sent rate by processor {#JMXNAME}'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: request
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
- uuid: 1596a335401d47d6b2bde7a5b0de7b07
|
||||||
|
name: '{#JMXNAME}: Errors per second'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},errorCount]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Error rate of request processor {#JMXNAME}'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: request
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
- uuid: 985d3eeacd9d404385bfcef693add39a
|
||||||
|
name: '{#JMXNAME}: Requests processing time'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},processingTime]'
|
||||||
|
units: s
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: |
|
||||||
|
The total time to process all incoming requests of request processor
|
||||||
|
{#JMXNAME}
|
||||||
|
preprocessing:
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '0.001'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: request
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
- uuid: 8e0307b5063549dab118e0e374a62aad
|
||||||
|
name: '{#JMXNAME}: Requests per second'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},requestCount]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Rate of requests served by request processor {#JMXNAME}'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: request
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 87de97d55baa4be1964652957a051fc2
|
||||||
|
name: '{#JMXNAME}: Traffic'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},bytesSent]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},bytesReceived]'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
- uuid: cf1badf064714d9b9e3b7110696432f9
|
||||||
|
name: 'Contexts discovery'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx.discovery[beans,"Catalina:type=Manager,host=*,context=*"]'
|
||||||
|
delay: 1h
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#JMXHOST}'
|
||||||
|
value: '{$TOMCAT.LLD.FILTER.MANAGER.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#JMXHOST}'
|
||||||
|
value: '{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery for contexts'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: c20bb67db247471ba686d2ea371b7c73
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions active'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},activeSessions]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Active sessions of the application.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: context
|
||||||
|
- tag: jmx-context
|
||||||
|
value: '{#JMXCONTEXT}'
|
||||||
|
- tag: jmx-host
|
||||||
|
value: '{#JMXHOST}'
|
||||||
|
- uuid: bc3c2a3cff614f3eaf001463df1b2364
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},maxActiveSessions]'
|
||||||
|
value_type: FLOAT
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'The maximum number of active Sessions allowed, or -1 for no limit.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: context
|
||||||
|
- tag: jmx-context
|
||||||
|
value: '{#JMXCONTEXT}'
|
||||||
|
- tag: jmx-host
|
||||||
|
value: '{#JMXHOST}'
|
||||||
|
- uuid: fd8678e68cf440939af2dd8f3568a42f
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},maxActive]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Maximum number of active sessions so far.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: context
|
||||||
|
- tag: jmx-context
|
||||||
|
value: '{#JMXCONTEXT}'
|
||||||
|
- tag: jmx-host
|
||||||
|
value: '{#JMXHOST}'
|
||||||
|
- uuid: 34702e2d6b2142ec9aa43bea1059a98a
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},rejectedSessions]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Rate of sessions we rejected due to maxActive being reached.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: context
|
||||||
|
- tag: jmx-context
|
||||||
|
value: '{#JMXCONTEXT}'
|
||||||
|
- tag: jmx-host
|
||||||
|
value: '{#JMXHOST}'
|
||||||
|
- uuid: eb28f9bd99d440f4a50d1c24ae758029
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions created per second'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},sessionCounter]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Rate of sessions created by this application per second.'
|
||||||
|
preprocessing:
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: context
|
||||||
|
- tag: jmx-context
|
||||||
|
value: '{#JMXCONTEXT}'
|
||||||
|
- tag: jmx-host
|
||||||
|
value: '{#JMXHOST}'
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: dfd46f5443f9438fb21ae23dfd4010c0
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},maxActive]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},activeSessions]'
|
||||||
|
- sortorder: '2'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},rejectedSessions]'
|
||||||
|
- sortorder: '3'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},maxActiveSessions]'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
- uuid: 05752834671f416fb2fdac1006308c3e
|
||||||
|
name: 'Thread pools discovery'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"]'
|
||||||
|
delay: 1h
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#JMXNAME}'
|
||||||
|
value: '{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#JMXNAME}'
|
||||||
|
value: '{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovery for ThreadPool'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 7d7418c72ced48eca2a92e30021b611b
|
||||||
|
name: '{#JMXNAME}: Threads count'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},currentThreadCount]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Amount of threads the thread pool has right now, both busy and free.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 10m
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: thread-pool
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
- uuid: 35b1e99fbc44448083b5aad0ce1239a1
|
||||||
|
name: '{#JMXNAME}: Threads busy'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},currentThreadsBusy]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Number of the requests that are being currently handled.'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: thread-pool
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
- uuid: 32e316ce567c4f94aecb89d9763e4d27
|
||||||
|
name: '{#JMXNAME}: Threads limit'
|
||||||
|
type: JMX
|
||||||
|
key: 'jmx[{#JMXOBJ},maxThreads]'
|
||||||
|
username: '{$TOMCAT.USER}'
|
||||||
|
password: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 10m
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: thread-pool
|
||||||
|
- tag: jmx-name
|
||||||
|
value: '{#JMXNAME}'
|
||||||
|
- tag: jmx-type
|
||||||
|
value: '{#JMXTYPE}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 7a15296553a447f6aebf4958631b6704
|
||||||
|
expression: 'min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100'
|
||||||
|
name: 'Apache Tomcat: {#JMXNAME}: Busy worker threads count is high'
|
||||||
|
event_name: 'Apache Tomcat: {#JMXNAME}: Busy worker threads count are more than {$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}% of the limit for {$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"}'
|
||||||
|
priority: HIGH
|
||||||
|
description: 'When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: d8236335204a42488c6221c8b2d31e77
|
||||||
|
name: '{#JMXNAME}: Worker threads'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},maxThreads]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},currentThreadCount]'
|
||||||
|
- sortorder: '2'
|
||||||
|
drawtype: GRADIENT_LINE
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
key: 'jmx[{#JMXOBJ},currentThreadsBusy]'
|
||||||
|
jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: tomcat
|
||||||
|
macros:
|
||||||
|
- macro: '{$TOMCAT.LLD.FILTER.MANAGER.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'Filter for discoverable managers.'
|
||||||
|
- macro: '{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'Filter to exclude managers.'
|
||||||
|
- macro: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'Filter for discoverable global request processors.'
|
||||||
|
- macro: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'Filter to exclude global request processors.'
|
||||||
|
- macro: '{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'Filter for discoverable thread pools.'
|
||||||
|
- macro: '{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'Filter to exclude thread pools.'
|
||||||
|
- macro: '{$TOMCAT.PASSWORD}'
|
||||||
|
description: 'Password for JMX'
|
||||||
|
- macro: '{$TOMCAT.THREADS.MAX.PCT}'
|
||||||
|
value: '75'
|
||||||
|
description: 'Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context.'
|
||||||
|
- macro: '{$TOMCAT.THREADS.MAX.TIME}'
|
||||||
|
value: 5m
|
||||||
|
description: 'The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context.'
|
||||||
|
- macro: '{$TOMCAT.USER}'
|
||||||
|
description: 'User for JMX'
|
||||||
|
dashboards:
|
||||||
|
- uuid: 330fa4902aed4d45b8747ddb2c8c7d70
|
||||||
|
name: 'Tomcat: Overview'
|
||||||
|
pages:
|
||||||
|
- name: General
|
||||||
|
widgets:
|
||||||
|
- type: graphprototype
|
||||||
|
width: '36'
|
||||||
|
height: '15'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
name: '{#JMXHOST}{#JMXCONTEXT}: Sessions'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '3'
|
||||||
|
- type: graphprototype
|
||||||
|
x: '36'
|
||||||
|
width: '36'
|
||||||
|
height: '15'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache Tomcat by JMX'
|
||||||
|
name: '{#JMXNAME}: Worker threads'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: INTEGER
|
||||||
|
name: rows
|
||||||
|
value: '3'
|
||||||
@@ -0,0 +1,821 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: 86702e8bc514434e8c914d50c206cb94
|
||||||
|
template: 'Apache by HTTP'
|
||||||
|
name: 'Apache by HTTP'
|
||||||
|
description: |
|
||||||
|
This template is designed for the effortless deployment of Apache monitoring by Zabbix via HTTP and doesn't require any external scripts.
|
||||||
|
|
||||||
|
The template collects metrics by polling 'mod_status' with HTTP agent remotely.
|
||||||
|
|
||||||
|
Setup:
|
||||||
|
|
||||||
|
1. See the setup instructions for mod_status:
|
||||||
|
https://httpd.apache.org/docs/current/mod/mod_status.html
|
||||||
|
|
||||||
|
Check the availability of the module with this command line:
|
||||||
|
httpd -M 2>/dev/null | grep status_module
|
||||||
|
|
||||||
|
This is an example configuration of the Apache web server:
|
||||||
|
|
||||||
|
<Location "/server-status">
|
||||||
|
SetHandler server-status
|
||||||
|
Require host example.com
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
2. Set the hostname or IP address of the Apache status page host in the '{$APACHE.STATUS.HOST}' macro. You can also change the status page port in the '{$APACHE.STATUS.PORT}' macro and status page path in the '{$APACHE.STATUS.PATH}' macro if necessary.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384764-discussion-thread-for-official-zabbix-template-apache
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: b9fe6f0bbe174e9f81af84a3bc0b0e7c
|
||||||
|
name: 'Total bytes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.bytes
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: B
|
||||||
|
description: 'The total bytes served.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total kBytes"]'
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '1024'
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: b36010be10874cf188eeacc81f2c366f
|
||||||
|
name: 'Bytes per second'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.bytes.rate
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: Bps
|
||||||
|
description: |
|
||||||
|
It is calculated as a rate of change for total bytes statistics.
|
||||||
|
`BytesPerSec` is not used, as it counts the average since the last Apache server start.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total kBytes"]'
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '1024'
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: e61be8ad92004100aca55fcedd2a3807
|
||||||
|
name: 'Get status'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: apache.get_status
|
||||||
|
history: 1h
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: |
|
||||||
|
Getting data from a machine-readable version of the Apache status page.
|
||||||
|
For more information see Apache Module [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
var lines = value.split('\n');
|
||||||
|
var output = {},
|
||||||
|
workers = {
|
||||||
|
'_': 0, 'S': 0, 'R': 0, 'W': 0,
|
||||||
|
'K': 0, 'D': 0, 'C': 0, 'L': 0,
|
||||||
|
'G': 0, 'I': 0, '.': 0
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var i = 0; i < lines.length; i++) {
|
||||||
|
var line = lines[i].match(/([A-z0-9 ]+): (.*)/);
|
||||||
|
|
||||||
|
if (line !== null) {
|
||||||
|
output[line[1]] = isNaN(line[2]) ? line[2] : Number(line[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.ServerUptimeSeconds = output.ServerUptimeSeconds || output.Uptime;
|
||||||
|
output.ServerVersion = output.ServerVersion || output.Server;
|
||||||
|
|
||||||
|
if (typeof output.Scoreboard === 'string') {
|
||||||
|
for (var i = 0; i < output.Scoreboard.length; i++) {
|
||||||
|
var char = output.Scoreboard[i];
|
||||||
|
|
||||||
|
workers[char]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.Workers = {
|
||||||
|
waiting: workers['_'], starting: workers['S'], reading: workers['R'],
|
||||||
|
sending: workers['W'], keepalive: workers['K'], dnslookup: workers['D'],
|
||||||
|
closing: workers['C'], logging: workers['L'], finishing: workers['G'],
|
||||||
|
cleanup: workers['I'], slot: workers['.']
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(output);
|
||||||
|
url: '{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}'
|
||||||
|
retrieve_mode: BOTH
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
triggers:
|
||||||
|
- uuid: db396445cc5042f89f31dc12cb99c32e
|
||||||
|
expression: 'nodata(/Apache by HTTP/apache.get_status,30m)=1'
|
||||||
|
name: 'Apache: Failed to fetch status page'
|
||||||
|
event_name: 'Apache: Failed to fetch status page (or no data for 30m)'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Zabbix has not received any data for items for the last 30 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache: Service is down'
|
||||||
|
expression: 'last(/Apache by HTTP/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 5fb5101de70a43fab50d55f418462255
|
||||||
|
name: 'Total requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.requests
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of the Apache server accesses.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total Accesses"]'
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: ee15f4958040459da53251cc3561ed39
|
||||||
|
name: 'Requests per second'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.requests.rate
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
description: |
|
||||||
|
It is calculated as a rate of change for the "Total requests" statistics.
|
||||||
|
`ReqPerSec` is not used, as it counts the average since the last Apache server start.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total Accesses"]'
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 3dd8ba505d584b028c7ac08d8b959eb3
|
||||||
|
name: Uptime
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.uptime
|
||||||
|
delay: '0'
|
||||||
|
units: uptime
|
||||||
|
description: 'The service uptime expressed in seconds.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ServerUptimeSeconds
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 76cfa6ebf39f4c8fbd8fde9e0f36d3ed
|
||||||
|
expression: 'last(/Apache by HTTP/apache.uptime)<10m'
|
||||||
|
name: 'Apache: Service has been restarted'
|
||||||
|
event_name: 'Apache: Service has been restarted (uptime < 10m)'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Uptime is less than 10 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: fe0de2eb1478482f99b38c13bd20564c
|
||||||
|
name: Version
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.version
|
||||||
|
delay: '0'
|
||||||
|
value_type: CHAR
|
||||||
|
trends: '0'
|
||||||
|
description: 'The Apache service version.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ServerVersion
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1d
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 5296d69af0704d0e8a07398f0b4c9685
|
||||||
|
expression: 'last(/Apache by HTTP/apache.version,#1)<>last(/Apache by HTTP/apache.version,#2) and length(last(/Apache by HTTP/apache.version))>0'
|
||||||
|
name: 'Apache: Version has changed'
|
||||||
|
event_name: 'Apache: Version has changed (new version: {ITEM.VALUE})'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Apache version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: f74ffb92e30e48958b5b82f7dfbe5147
|
||||||
|
name: 'Workers idle cleanup'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.cleanup
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in cleanup state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.cleanup
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: d664bee9a330480bbaee7273b871a8d3
|
||||||
|
name: 'Workers closing connection'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.closing
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in closing state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.closing
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: a6fb3444585749be998ec840cd8e4511
|
||||||
|
name: 'Workers DNS lookup'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.dnslookup
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in `dnslookup` state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.dnslookup
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: fcf771f2a9b64a81a37db679f0494ed3
|
||||||
|
name: 'Workers finishing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.finishing
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in finishing state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.finishing
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: cb81a6a77395444283bc5e065fcbfc2e
|
||||||
|
name: 'Workers keepalive (read)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.keepalive
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in `keepalive` state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.keepalive
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 7fc0002a279b4541af569a03c1aca2ac
|
||||||
|
name: 'Workers logging'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.logging
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in logging state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.logging
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 78b0bd7d8bec49549fc003d460af9177
|
||||||
|
name: 'Workers reading request'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.reading
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in reading state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.reading
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 379ac66397b94463ad17b24fbd20c615
|
||||||
|
name: 'Workers sending reply'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.sending
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in sending state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.sending
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 1c90055e02a244fc8d18e73b23daa0f1
|
||||||
|
name: 'Workers slot with no current process'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.slot
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of slots with no current process.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.slot
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: ae21ea113e8840349aff81ab582d92b4
|
||||||
|
name: 'Workers starting up'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.starting
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in starting state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.starting
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: be1a05a6eab84b64ac4d51c966ea91e8
|
||||||
|
name: 'Workers waiting for connection'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.waiting
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in waiting state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.waiting
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 1752b9bcf7b34abbaf105f5261638271
|
||||||
|
name: 'Total workers busy'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers_total.busy
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of busy worker threads/processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.BusyWorkers
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: b1b1c86a12964ae2813c63481e464ec7
|
||||||
|
name: 'Total workers idle'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers_total.idle
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of idle worker threads/processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.IdleWorkers
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 5039d11bc3964d6e9928a0a46dd0b402
|
||||||
|
name: 'Service response time'
|
||||||
|
type: SIMPLE
|
||||||
|
key: 'net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: application
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
triggers:
|
||||||
|
- uuid: ffbb564032c7462eb0bb9b4c2f700559
|
||||||
|
expression: 'min(/Apache by HTTP/net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"],5m)>{$APACHE.RESPONSE_TIME.MAX.WARN}'
|
||||||
|
name: 'Apache: Service response time is too high'
|
||||||
|
event_name: 'Apache: Service response time is too high (over {$APACHE.RESPONSE_TIME.MAX.WARN}s for 5m)'
|
||||||
|
priority: WARNING
|
||||||
|
manual_close: 'YES'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache: Service is down'
|
||||||
|
expression: 'last(/Apache by HTTP/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: fb65918695094026838e2b9e4ca00402
|
||||||
|
name: 'Service ping'
|
||||||
|
type: SIMPLE
|
||||||
|
key: 'net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
||||||
|
valuemap:
|
||||||
|
name: 'Service state'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 10m
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: application
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
triggers:
|
||||||
|
- uuid: afe2fde35d054333adc8369a0f9af778
|
||||||
|
expression: 'last(/Apache by HTTP/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0'
|
||||||
|
name: 'Apache: Service is down'
|
||||||
|
priority: AVERAGE
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: eee8abd3174d426092e8bca9b3ba982e
|
||||||
|
name: 'Event MPM discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.mpm.event.discovery
|
||||||
|
delay: '0'
|
||||||
|
description: |
|
||||||
|
The discovery of additional metrics if the event Multi-Processing Module (MPM) is used.
|
||||||
|
For more details see [Apache MPM event](https://httpd.apache.org/docs/current/mod/event.html).
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: f52700379f9a4ee8b378a2eb9caea070
|
||||||
|
name: 'Bytes per request'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.bytes[per_request{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: B
|
||||||
|
description: 'The average number of client requests per second.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.BytesPerReq
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 062d7c941f0c468d8b63fa76ae0610f6
|
||||||
|
name: 'Connections async closing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in closing state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncClosing
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 6cb8b255ad8343a48e622912bc298366
|
||||||
|
name: 'Connections async keepalive'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in keepalive state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncKeepAlive
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 997b3452aac24ad6afbad775d649c727
|
||||||
|
name: 'Connections async writing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in writing state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncWriting
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 31cb044eed904ca19150921fe36f3285
|
||||||
|
name: 'Connections total'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[total{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of total connections.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsTotal
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 34555340f3ad4b878504df188f54a9c9
|
||||||
|
name: 'Number of async processes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.process[num{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Processes
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 066b53ed2244414ca3090498eb035c27
|
||||||
|
name: 'Apache: Current async connections{#SINGLETON}'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
||||||
|
- sortorder: '3'
|
||||||
|
drawtype: BOLD_LINE
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: 'apache.connections[total{#SINGLETON}]'
|
||||||
|
- uuid: dbaa0c2468cc40fca977fb382d19cb78
|
||||||
|
name: 'Apache: Current async processes{#SINGLETON}'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: 'apache.process[num{#SINGLETON}]'
|
||||||
|
master_item:
|
||||||
|
key: apache.get_status
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
return JSON.stringify(JSON.parse(value).ServerMPM === 'event'
|
||||||
|
? [{'{#SINGLETON}': ''}] : []);
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: apache
|
||||||
|
macros:
|
||||||
|
- macro: '{$APACHE.RESPONSE_TIME.MAX.WARN}'
|
||||||
|
value: '10'
|
||||||
|
description: 'The maximum Apache response time expressed in seconds for a trigger expression.'
|
||||||
|
- macro: '{$APACHE.STATUS.HOST}'
|
||||||
|
value: '<SET APACHE HOST>'
|
||||||
|
description: 'The hostname or IP address of the Apache status page host.'
|
||||||
|
- macro: '{$APACHE.STATUS.PATH}'
|
||||||
|
value: 'server-status?auto'
|
||||||
|
description: 'The URL path.'
|
||||||
|
- macro: '{$APACHE.STATUS.PORT}'
|
||||||
|
value: '80'
|
||||||
|
description: 'The port of the Apache status page.'
|
||||||
|
- macro: '{$APACHE.STATUS.SCHEME}'
|
||||||
|
value: http
|
||||||
|
description: 'The request scheme, which may be either HTTP or HTTPS.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: a328c9e713424465a8e1adec7322b0dc
|
||||||
|
name: 'Apache performance'
|
||||||
|
pages:
|
||||||
|
- name: General
|
||||||
|
widgets:
|
||||||
|
- type: graph
|
||||||
|
width: '72'
|
||||||
|
height: '7'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
name: 'Apache: Worker states'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: graph
|
||||||
|
'y': '7'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
name: 'Apache: Requests per second'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: graphprototype
|
||||||
|
'y': '12'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
name: 'Apache: Current async connections{#SINGLETON}'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAD
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
'y': '7'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
name: 'Apache: Workers total'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAC
|
||||||
|
- type: graphprototype
|
||||||
|
x: '36'
|
||||||
|
'y': '12'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
name: 'Apache: Current async processes{#SINGLETON}'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAE
|
||||||
|
valuemaps:
|
||||||
|
- uuid: a5d1f911fb264bd4bc087ea582626d7f
|
||||||
|
name: 'Service state'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: Down
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Up
|
||||||
|
graphs:
|
||||||
|
- uuid: a3998992f7504a12826e3c4d592836b5
|
||||||
|
name: 'Apache: Requests per second'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.requests.rate
|
||||||
|
- uuid: 1629062b5cd74b67af9a60226a79f8f1
|
||||||
|
name: 'Apache: Worker states'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.dnslookup
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.cleanup
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.logging
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.reading
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.sending
|
||||||
|
- sortorder: '5'
|
||||||
|
color: 6C59DC
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.starting
|
||||||
|
- sortorder: '6'
|
||||||
|
color: C7A72D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.closing
|
||||||
|
- sortorder: '7'
|
||||||
|
color: BA2A5D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.finishing
|
||||||
|
- sortorder: '8'
|
||||||
|
color: F230E0
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.keepalive
|
||||||
|
- sortorder: '9'
|
||||||
|
color: 5CCD18
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.slot
|
||||||
|
- sortorder: '10'
|
||||||
|
color: BB2A02
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers.waiting
|
||||||
|
- uuid: 78e59f1b5eb747019f92921ac5ef48b0
|
||||||
|
name: 'Apache: Workers total'
|
||||||
|
type: STACKED
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers_total.busy
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by HTTP'
|
||||||
|
key: apache.workers_total.idle
|
||||||
@@ -0,0 +1,968 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: a8d91e4f36794e32b73090d5edf3d7ae
|
||||||
|
template: 'Apache by Zabbix agent'
|
||||||
|
name: 'Apache by Zabbix agent'
|
||||||
|
description: |
|
||||||
|
Get metrics from mod_status module using HTTP agent.
|
||||||
|
https://httpd.apache.org/docs/current/mod/mod_status.html
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384764-discussion-thread-for-official-zabbix-template-apache
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-2
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: 2d3ebb059bd944ee8a7b95e2c60b08f0
|
||||||
|
name: 'Total bytes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.bytes
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: B
|
||||||
|
description: 'The total bytes served.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total kBytes"]'
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '1024'
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: be97c53d82f846cdbc2d0ec640435b6f
|
||||||
|
name: 'Bytes per second'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.bytes.rate
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: Bps
|
||||||
|
description: |
|
||||||
|
It is calculated as a rate of change for total bytes statistics.
|
||||||
|
`BytesPerSec` is not used, as it counts the average since the last Apache server start.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total kBytes"]'
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '1024'
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 5919f29c692b468fb5642e83f408c2e5
|
||||||
|
name: 'Total requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.requests
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of the Apache server accesses.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total Accesses"]'
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 7e1e674a23d24fafa31b76a048fe9fd0
|
||||||
|
name: 'Requests per second'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.requests.rate
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
description: |
|
||||||
|
It is calculated as a rate of change for the "Total requests" statistics.
|
||||||
|
`ReqPerSec` is not used, as it counts the average since the last Apache server start.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total Accesses"]'
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 5a4bd2d6c2874d888ec4c82409e1c711
|
||||||
|
name: Uptime
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.uptime
|
||||||
|
delay: '0'
|
||||||
|
units: uptime
|
||||||
|
description: 'The service uptime expressed in seconds.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ServerUptimeSeconds
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 7872d9665c234f45941ca26206e0255c
|
||||||
|
expression: 'last(/Apache by Zabbix agent/apache.uptime)<10m'
|
||||||
|
name: 'Apache: Service has been restarted'
|
||||||
|
event_name: 'Apache: Service has been restarted (uptime < 10m)'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Uptime is less than 10 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 78a611c2b15c4ae8949257b6fdf922f1
|
||||||
|
name: Version
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.version
|
||||||
|
delay: '0'
|
||||||
|
value_type: CHAR
|
||||||
|
trends: '0'
|
||||||
|
description: 'The Apache service version.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ServerVersion
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1d
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 5124b17918f545758ca5c936332f51cd
|
||||||
|
expression: 'last(/Apache by Zabbix agent/apache.version,#1)<>last(/Apache by Zabbix agent/apache.version,#2) and length(last(/Apache by Zabbix agent/apache.version))>0'
|
||||||
|
name: 'Apache: Version has changed'
|
||||||
|
event_name: 'Apache: Version has changed (new version: {ITEM.VALUE})'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Apache version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 35f48761ec6d451bbb8b0d80cd0ccd91
|
||||||
|
name: 'Workers idle cleanup'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.cleanup
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in cleanup state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.cleanup
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: ebd391702cbd432ab458578a3cb45361
|
||||||
|
name: 'Workers closing connection'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.closing
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in closing state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.closing
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 6a961707e7084d8ebc09f572b15ef1fd
|
||||||
|
name: 'Workers DNS lookup'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.dnslookup
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in `dnslookup` state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.dnslookup
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: fd383c9ace4647deb9d3e3882554b8d0
|
||||||
|
name: 'Workers finishing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.finishing
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in finishing state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.finishing
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 2a02413c0e9144b4a70b8a5a71d680e0
|
||||||
|
name: 'Workers keepalive (read)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.keepalive
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in `keepalive` state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.keepalive
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: ed71fb2ec75f4537a2937293add75274
|
||||||
|
name: 'Workers logging'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.logging
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in logging state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.logging
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 6c38147f9f3449a194f36a6e6d828865
|
||||||
|
name: 'Workers reading request'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.reading
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in reading state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.reading
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 47856ac3b68644e0861b593d3083d35b
|
||||||
|
name: 'Workers sending reply'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.sending
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in sending state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.sending
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 60cf954a40594cf69afdd1bf0319c031
|
||||||
|
name: 'Workers slot with no current process'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.slot
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of slots with no current process.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.slot
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 441c797164bf4c8da8112d78240abc43
|
||||||
|
name: 'Workers starting up'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.starting
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in starting state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.starting
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: ec87e89ee9304acd8c7a76e863cb4443
|
||||||
|
name: 'Workers waiting for connection'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.waiting
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in waiting state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.waiting
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: b52addb50ccb415fb63eaf67076991c1
|
||||||
|
name: 'Total workers busy'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers_total.busy
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of busy worker threads/processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.BusyWorkers
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 6955f78c203b435987b5ab75a1114867
|
||||||
|
name: 'Total workers idle'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers_total.idle
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of idle worker threads/processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.IdleWorkers
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 267ca6fe038346e5be1113f3bf9b4023
|
||||||
|
name: 'Service response time'
|
||||||
|
key: 'net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: application
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
- uuid: 369f00e2970048c786ce3bd609e65566
|
||||||
|
name: 'Service ping'
|
||||||
|
key: 'net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
||||||
|
valuemap:
|
||||||
|
name: 'Service state'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 10m
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: application
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
- uuid: 99b1a38ed45b4212974b0bea72b076d2
|
||||||
|
name: 'Get processes summary'
|
||||||
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'The aggregated data of summary metrics for all processes.'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 115413a0f5ab4caba418ab841ad81eba
|
||||||
|
name: 'Get status'
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
history: 1h
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: |
|
||||||
|
Getting data from a machine-readable version of the Apache status page.
|
||||||
|
For more information see Apache Module [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
var lines = value.split('\n');
|
||||||
|
var output = {},
|
||||||
|
workers = {
|
||||||
|
'_': 0, 'S': 0, 'R': 0, 'W': 0,
|
||||||
|
'K': 0, 'D': 0, 'C': 0, 'L': 0,
|
||||||
|
'G': 0, 'I': 0, '.': 0
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var i = 0; i < lines.length; i++) {
|
||||||
|
var line = lines[i].match(/([A-z0-9 ]+): (.*)/);
|
||||||
|
|
||||||
|
if (line !== null) {
|
||||||
|
output[line[1]] = isNaN(line[2]) ? line[2] : Number(line[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.ServerUptimeSeconds = output.ServerUptimeSeconds || output.Uptime;
|
||||||
|
output.ServerVersion = output.ServerVersion || output.Server;
|
||||||
|
|
||||||
|
if (typeof output.Scoreboard === 'string') {
|
||||||
|
for (var i = 0; i < output.Scoreboard.length; i++) {
|
||||||
|
var char = output.Scoreboard[i];
|
||||||
|
|
||||||
|
workers[char]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.Workers = {
|
||||||
|
waiting: workers['_'], starting: workers['S'], reading: workers['R'],
|
||||||
|
sending: workers['W'], keepalive: workers['K'], dnslookup: workers['D'],
|
||||||
|
closing: workers['C'], logging: workers['L'], finishing: workers['G'],
|
||||||
|
cleanup: workers['I'], slot: workers['.']
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(output);
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 36a82bdda7754c51a05da3bb0b65b83e
|
||||||
|
name: 'Event MPM discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.mpm.event.discovery
|
||||||
|
delay: '0'
|
||||||
|
description: |
|
||||||
|
The discovery of additional metrics if the event Multi-Processing Module (MPM) is used.
|
||||||
|
For more details see [Apache MPM event](https://httpd.apache.org/docs/current/mod/event.html).
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 99df2ff5970b4497887371bcd16d5ada
|
||||||
|
name: 'Bytes per request'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.bytes[per_request{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: B
|
||||||
|
description: 'The average number of client requests per second.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.BytesPerReq
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 2e0692f36b924b52ab7b2ff7788b641d
|
||||||
|
name: 'Connections async closing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in closing state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncClosing
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 33d3fec8f45c493097bab986d5ea1e55
|
||||||
|
name: 'Connections async keepalive'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in keepalive state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncKeepAlive
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 9ad0e5c49e7c4b939eb7977a5158953f
|
||||||
|
name: 'Connections async writing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in writing state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncWriting
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 0fbfbfae187040c790bb4d68f9e2fae5
|
||||||
|
name: 'Connections total'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[total{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of total connections.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsTotal
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 778a1bfeaa1b474ba529e6c0a55a9949
|
||||||
|
name: 'Number of async processes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.process[num{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Processes
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 4845e6716bd74e7698406e6d8389eba5
|
||||||
|
name: 'Apache: Current async connections{#SINGLETON}'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
||||||
|
- sortorder: '3'
|
||||||
|
drawtype: BOLD_LINE
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.connections[total{#SINGLETON}]'
|
||||||
|
- uuid: 19ecb4e04c3742daac1a0e06d5f98c0c
|
||||||
|
name: 'Apache: Current async processes{#SINGLETON}'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.process[num{#SINGLETON}]'
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
return JSON.stringify(JSON.parse(value).ServerMPM === 'event'
|
||||||
|
? [{'{#SINGLETON}': ''}] : []);
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
- uuid: 357a2a1f056a4f59985e858d72e0bdae
|
||||||
|
name: 'Apache process discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.proc.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#APACHE.NAME}'
|
||||||
|
value: '{$APACHE.PROCESS_NAME}'
|
||||||
|
formulaid: A
|
||||||
|
description: 'The discovery of the Apache process summary.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 458bfecc83f64540838e3ffc3a7f3cb1
|
||||||
|
name: 'Get process data'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'The summary metrics aggregated by a process {#APACHE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@["name"]=="{#APACHE.NAME}")].first()'
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: 'Failed to retrieve process {#APACHE.NAME} data'
|
||||||
|
master_item:
|
||||||
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 233b5466014640e4b990ffd81fa19fa1
|
||||||
|
name: 'Number of running processes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.num[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of running processes {#APACHE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.processes
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '0'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: b62f49b09d6b4c6ca01ff60cd9dd2209
|
||||||
|
expression: 'last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])=0'
|
||||||
|
name: 'Apache: Process is not running'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 683d4489dbb549f3bb5b45d3c2696c4f
|
||||||
|
name: 'Memory usage, %'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.pmem[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The percentage of real memory used by a process {#APACHE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.pmem
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- ''
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: 384bf197e6a241b3b63bb89d009bba6b
|
||||||
|
name: 'Memory usage (rss)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.rss[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The summary of resident set size memory used by a process {#APACHE.NAME} expressed in bytes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.rss
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- ''
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: f20b7a01ff134a128c54ea83af8557e2
|
||||||
|
name: 'Memory usage (vsize)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.vmem[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The summary of virtual memory used by a process {#APACHE.NAME} expressed in bytes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.vsize
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- ''
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: b73280fb0af64c7899abfc74cc074b13
|
||||||
|
name: 'CPU utilization'
|
||||||
|
key: 'proc.cpu.util[{#APACHE.NAME}]'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The percentage of the CPU utilization by a process {#APACHE.NAME}.'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: cpu
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 0166ec63913e4bbea25c54b458b3213a
|
||||||
|
expression: 'nodata(/Apache by Zabbix agent/web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"],30m)=1 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
name: 'Apache: Failed to fetch status page'
|
||||||
|
event_name: 'Apache: Failed to fetch status page (or no data for 30m)'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Zabbix has not received any data for items for the last 30 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache: Service is down'
|
||||||
|
expression: 'last(/Apache by Zabbix agent/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: e24dbf9b89c34d839cb12a22b1103df3
|
||||||
|
expression: 'last(/Apache by Zabbix agent/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
name: 'Apache: Service is down'
|
||||||
|
priority: AVERAGE
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 128905793a4b4a1db5a49f87e87d3383
|
||||||
|
expression: 'min(/Apache by Zabbix agent/net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"],5m)>{$APACHE.RESPONSE_TIME.MAX.WARN} and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
name: 'Apache: Service response time is too high'
|
||||||
|
event_name: 'Apache: Service response time is too high (over {$APACHE.RESPONSE_TIME.MAX.WARN}s for 5m)'
|
||||||
|
priority: WARNING
|
||||||
|
manual_close: 'YES'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache: Service is down'
|
||||||
|
expression: 'last(/Apache by Zabbix agent/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: d317a2ccde4f4a2ab20e983b27ae64e2
|
||||||
|
name: 'Apache: Memory usage[{#APACHE.NAME}]'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: BOLD_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.proc.vmem[{#APACHE.NAME}]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: BOLD_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: 'apache.proc.rss[{#APACHE.NAME}]'
|
||||||
|
master_item:
|
||||||
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#APACHE.NAME}'
|
||||||
|
path: $.name
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: apache
|
||||||
|
macros:
|
||||||
|
- macro: '{$APACHE.PROCESS.NAME.PARAMETER}'
|
||||||
|
description: 'The process name of the Apache web server used in the item key `proc.get`. It could be specified if the correct process name is known.'
|
||||||
|
- macro: '{$APACHE.PROCESS_NAME}'
|
||||||
|
value: (httpd|apache2)
|
||||||
|
description: 'The process name filter for the Apache process discovery.'
|
||||||
|
- macro: '{$APACHE.RESPONSE_TIME.MAX.WARN}'
|
||||||
|
value: '10'
|
||||||
|
description: 'The maximum Apache response time expressed in seconds for a trigger expression.'
|
||||||
|
- macro: '{$APACHE.STATUS.HOST}'
|
||||||
|
value: 127.0.0.1
|
||||||
|
description: 'The hostname or IP address of the Apache status page.'
|
||||||
|
- macro: '{$APACHE.STATUS.PATH}'
|
||||||
|
value: 'server-status?auto'
|
||||||
|
description: 'The URL path.'
|
||||||
|
- macro: '{$APACHE.STATUS.PORT}'
|
||||||
|
value: '80'
|
||||||
|
description: 'The port of the Apache status page.'
|
||||||
|
- macro: '{$APACHE.STATUS.SCHEME}'
|
||||||
|
value: http
|
||||||
|
description: 'The request scheme, which may be either HTTP or HTTPS.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: c27c68fb9c234a09b4023076b45affc1
|
||||||
|
name: 'Apache performance'
|
||||||
|
pages:
|
||||||
|
- name: General
|
||||||
|
widgets:
|
||||||
|
- type: graph
|
||||||
|
width: '72'
|
||||||
|
height: '7'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
name: 'Apache: Worker states'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: graph
|
||||||
|
'y': '7'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
name: 'Apache: Requests per second'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: graphprototype
|
||||||
|
'y': '12'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
name: 'Apache: Current async connections{#SINGLETON}'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAD
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
'y': '7'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
name: 'Apache: Workers total'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAC
|
||||||
|
- type: graphprototype
|
||||||
|
x: '36'
|
||||||
|
'y': '12'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
name: 'Apache: Current async processes{#SINGLETON}'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAE
|
||||||
|
valuemaps:
|
||||||
|
- uuid: 452297e814a84b08a72730a7b777e378
|
||||||
|
name: 'Service state'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: Down
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Up
|
||||||
|
graphs:
|
||||||
|
- uuid: dfc5334e77ce45d286145cc08d036f38
|
||||||
|
name: 'Apache: Requests per second'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.requests.rate
|
||||||
|
- uuid: 6f646e8c11b04e8a835b81bc17824593
|
||||||
|
name: 'Apache: Worker states'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.dnslookup
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.cleanup
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.logging
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.reading
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.sending
|
||||||
|
- sortorder: '5'
|
||||||
|
color: 6C59DC
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.starting
|
||||||
|
- sortorder: '6'
|
||||||
|
color: C7A72D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.closing
|
||||||
|
- sortorder: '7'
|
||||||
|
color: BA2A5D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.finishing
|
||||||
|
- sortorder: '8'
|
||||||
|
color: F230E0
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.keepalive
|
||||||
|
- sortorder: '9'
|
||||||
|
color: 5CCD18
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.slot
|
||||||
|
- sortorder: '10'
|
||||||
|
color: BB2A02
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers.waiting
|
||||||
|
- uuid: 121c2d4feb0b4b53b027f1566107ab29
|
||||||
|
name: 'Apache: Workers total'
|
||||||
|
type: STACKED
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers_total.busy
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent'
|
||||||
|
key: apache.workers_total.idle
|
||||||
@@ -0,0 +1,973 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: aa3286a824464020863ead141e8f0afc
|
||||||
|
template: 'Apache by Zabbix agent active'
|
||||||
|
name: 'Apache by Zabbix agent active'
|
||||||
|
description: |
|
||||||
|
Get metrics from mod_status module using HTTP agent.
|
||||||
|
https://httpd.apache.org/docs/current/mod/mod_status.html
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384764-discussion-thread-for-official-zabbix-template-apache
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-2
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: 4f77b3a553d446619715e681799ea92c
|
||||||
|
name: 'Total bytes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.bytes
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: B
|
||||||
|
description: 'The total bytes served.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total kBytes"]'
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '1024'
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: a15b5f65e81440a49fc5918afd31d73b
|
||||||
|
name: 'Bytes per second'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.bytes.rate
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: Bps
|
||||||
|
description: |
|
||||||
|
It is calculated as a rate of change for total bytes statistics.
|
||||||
|
`BytesPerSec` is not used, as it counts the average since the last Apache server start.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total kBytes"]'
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '1024'
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: b0726bf9933a4349854bce2005e66f77
|
||||||
|
name: 'Total requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.requests
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of the Apache server accesses.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total Accesses"]'
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 864887722e62444a8d8f0756f161fc23
|
||||||
|
name: 'Requests per second'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.requests.rate
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
description: |
|
||||||
|
It is calculated as a rate of change for the "Total requests" statistics.
|
||||||
|
`ReqPerSec` is not used, as it counts the average since the last Apache server start.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$["Total Accesses"]'
|
||||||
|
- type: CHANGE_PER_SECOND
|
||||||
|
parameters:
|
||||||
|
- ''
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: af675fca551a45659f823cdf2e06175c
|
||||||
|
name: Uptime
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.uptime
|
||||||
|
delay: '0'
|
||||||
|
units: uptime
|
||||||
|
description: 'The service uptime expressed in seconds.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ServerUptimeSeconds
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 2f9e1d5e188f4f6190088986f6fc3f70
|
||||||
|
expression: 'last(/Apache by Zabbix agent active/apache.uptime)<10m'
|
||||||
|
name: 'Apache: Service has been restarted'
|
||||||
|
event_name: 'Apache: Service has been restarted (uptime < 10m)'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Uptime is less than 10 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 67523f1351814d388f95178363a106ff
|
||||||
|
name: Version
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.version
|
||||||
|
delay: '0'
|
||||||
|
value_type: CHAR
|
||||||
|
trends: '0'
|
||||||
|
description: 'The Apache service version.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ServerVersion
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1d
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 80d8c27a060347a4a852c3f6481244c3
|
||||||
|
expression: 'last(/Apache by Zabbix agent active/apache.version,#1)<>last(/Apache by Zabbix agent active/apache.version,#2) and length(last(/Apache by Zabbix agent active/apache.version))>0'
|
||||||
|
name: 'Apache: Version has changed'
|
||||||
|
event_name: 'Apache: Version has changed (new version: {ITEM.VALUE})'
|
||||||
|
priority: INFO
|
||||||
|
description: 'Apache version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 93beadab3d194772ac1a6f1950b20cad
|
||||||
|
name: 'Workers idle cleanup'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.cleanup
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in cleanup state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.cleanup
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 657a21b70a104778b32805226a05b27a
|
||||||
|
name: 'Workers closing connection'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.closing
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in closing state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.closing
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 86afd9d804f146b1adeed8844223d38b
|
||||||
|
name: 'Workers DNS lookup'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.dnslookup
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in `dnslookup` state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.dnslookup
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 70565d82384a439587ff6a32fa09ee1e
|
||||||
|
name: 'Workers finishing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.finishing
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in finishing state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.finishing
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 7a2c9e6039b942c09ff30d8ff77b9658
|
||||||
|
name: 'Workers keepalive (read)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.keepalive
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in `keepalive` state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.keepalive
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 0c3f9385fcc047d6ae8ee523f7bebb79
|
||||||
|
name: 'Workers logging'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.logging
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in logging state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.logging
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 7a4580dcfd974c7f9d59b8703054e77f
|
||||||
|
name: 'Workers reading request'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.reading
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in reading state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.reading
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 63d775979b934e72a2ed474419cf5c03
|
||||||
|
name: 'Workers sending reply'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.sending
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in sending state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.sending
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 8acd6c143a074c6faa46aa64869afc9b
|
||||||
|
name: 'Workers slot with no current process'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.slot
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of slots with no current process.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.slot
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 86200cce3b7d47798cc35bab713f87aa
|
||||||
|
name: 'Workers starting up'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.starting
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in starting state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.starting
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 64b26283b39946fe92d729ac00afeca0
|
||||||
|
name: 'Workers waiting for connection'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers.waiting
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of workers in waiting state.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Workers.waiting
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 90757d625da543b18e136da7a0099be6
|
||||||
|
name: 'Total workers busy'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers_total.busy
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of busy worker threads/processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.BusyWorkers
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 87be88163d4940658400ddf762faaeb6
|
||||||
|
name: 'Total workers idle'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.workers_total.idle
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of idle worker threads/processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.IdleWorkers
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 3ac09d338f0847288eda20732bf5aa10
|
||||||
|
name: 'Service response time'
|
||||||
|
type: ZABBIX_ACTIVE
|
||||||
|
key: 'net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: application
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
- uuid: e4252071d0864fd5bf7c60c4d6e4915d
|
||||||
|
name: 'Service ping'
|
||||||
|
type: ZABBIX_ACTIVE
|
||||||
|
key: 'net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
||||||
|
valuemap:
|
||||||
|
name: 'Service state'
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 10m
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: application
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
- uuid: 37f15f5a28364399aa66aad31d0acc08
|
||||||
|
name: 'Get processes summary'
|
||||||
|
type: ZABBIX_ACTIVE
|
||||||
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'The aggregated data of summary metrics for all processes.'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: d103e519e5044dfd982d535a0981bc84
|
||||||
|
name: 'Get status'
|
||||||
|
type: ZABBIX_ACTIVE
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
history: 1h
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: |
|
||||||
|
Getting data from a machine-readable version of the Apache status page.
|
||||||
|
For more information see Apache Module [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
var lines = value.split('\n');
|
||||||
|
var output = {},
|
||||||
|
workers = {
|
||||||
|
'_': 0, 'S': 0, 'R': 0, 'W': 0,
|
||||||
|
'K': 0, 'D': 0, 'C': 0, 'L': 0,
|
||||||
|
'G': 0, 'I': 0, '.': 0
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var i = 0; i < lines.length; i++) {
|
||||||
|
var line = lines[i].match(/([A-z0-9 ]+): (.*)/);
|
||||||
|
|
||||||
|
if (line !== null) {
|
||||||
|
output[line[1]] = isNaN(line[2]) ? line[2] : Number(line[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.ServerUptimeSeconds = output.ServerUptimeSeconds || output.Uptime;
|
||||||
|
output.ServerVersion = output.ServerVersion || output.Server;
|
||||||
|
|
||||||
|
if (typeof output.Scoreboard === 'string') {
|
||||||
|
for (var i = 0; i < output.Scoreboard.length; i++) {
|
||||||
|
var char = output.Scoreboard[i];
|
||||||
|
|
||||||
|
workers[char]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.Workers = {
|
||||||
|
waiting: workers['_'], starting: workers['S'], reading: workers['R'],
|
||||||
|
sending: workers['W'], keepalive: workers['K'], dnslookup: workers['D'],
|
||||||
|
closing: workers['C'], logging: workers['L'], finishing: workers['G'],
|
||||||
|
cleanup: workers['I'], slot: workers['.']
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(output);
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 973011cd85cb4ef58d25bc5e0a1118b6
|
||||||
|
name: 'Event MPM discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.mpm.event.discovery
|
||||||
|
delay: '0'
|
||||||
|
description: |
|
||||||
|
The discovery of additional metrics if the event Multi-Processing Module (MPM) is used.
|
||||||
|
For more details see [Apache MPM event](https://httpd.apache.org/docs/current/mod/event.html).
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: a640f7cba9314dd595d609ef79286548
|
||||||
|
name: 'Bytes per request'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.bytes[per_request{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: B
|
||||||
|
description: 'The average number of client requests per second.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.BytesPerReq
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 3f1daaa5642545f1bdd5ab9b50ec49c9
|
||||||
|
name: 'Connections async closing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in closing state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncClosing
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: 0beb4c6e7915408691264f8aa8073d67
|
||||||
|
name: 'Connections async keepalive'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in keepalive state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncKeepAlive
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: da590c6635484f178d4d26de5863f00e
|
||||||
|
name: 'Connections async writing'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous connections in writing state (applicable only to the event MPM).'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsAsyncWriting
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: c11f36a9483444e38cecb5e7ae667735
|
||||||
|
name: 'Connections total'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.connections[total{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of total connections.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.ConnsTotal
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: connection
|
||||||
|
- uuid: ca00fe11b10140f6ad791c8fcc012082
|
||||||
|
name: 'Number of async processes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.process[num{#SINGLETON}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of asynchronous processes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.Processes
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 43fb144dfa5b47afbdd146231e185c13
|
||||||
|
name: 'Apache: Current async connections{#SINGLETON}'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
||||||
|
- sortorder: '3'
|
||||||
|
drawtype: BOLD_LINE
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.connections[total{#SINGLETON}]'
|
||||||
|
- uuid: 1ab50e84f1d94ea98bb7e5c9d0cf159c
|
||||||
|
name: 'Apache: Current async processes{#SINGLETON}'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.process[num{#SINGLETON}]'
|
||||||
|
master_item:
|
||||||
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
return JSON.stringify(JSON.parse(value).ServerMPM === 'event'
|
||||||
|
? [{'{#SINGLETON}': ''}] : []);
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 3h
|
||||||
|
- uuid: 7c4b0d02427b4cf199817b5d5ae66378
|
||||||
|
name: 'Apache process discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: apache.proc.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#APACHE.NAME}'
|
||||||
|
value: '{$APACHE.PROCESS_NAME}'
|
||||||
|
formulaid: A
|
||||||
|
description: 'The discovery of the Apache process summary.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 68c53fcf8d8545ac98e923c04945aec4
|
||||||
|
name: 'Get process data'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'The summary metrics aggregated by a process {#APACHE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@["name"]=="{#APACHE.NAME}")].first()'
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: 'Failed to retrieve process {#APACHE.NAME} data'
|
||||||
|
master_item:
|
||||||
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 5f29e764f0024047bd955388b6585442
|
||||||
|
name: 'Number of running processes'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.num[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of running processes {#APACHE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.processes
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '0'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 653a0f021ece4993aaaef441172366b3
|
||||||
|
expression: 'last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])=0'
|
||||||
|
name: 'Apache: Process is not running'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 77f232c075384a11a3aefd31a55c0113
|
||||||
|
name: 'Memory usage, %'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.pmem[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The percentage of real memory used by a process {#APACHE.NAME}.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.pmem
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- ''
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: 0ded808ba0b34d03865a288dd9bb0672
|
||||||
|
name: 'Memory usage (rss)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.rss[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The summary of resident set size memory used by a process {#APACHE.NAME} expressed in bytes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.rss
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- ''
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: ba4d0197f2cb484597175ffd8f693dce
|
||||||
|
name: 'Memory usage (vsize)'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'apache.proc.vmem[{#APACHE.NAME}]'
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The summary of virtual memory used by a process {#APACHE.NAME} expressed in bytes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.vsize
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: IN_RANGE
|
||||||
|
parameters:
|
||||||
|
- '0'
|
||||||
|
- ''
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: memory
|
||||||
|
- uuid: b1e48077179f4e439e2d3c3b918c9a03
|
||||||
|
name: 'CPU utilization'
|
||||||
|
type: ZABBIX_ACTIVE
|
||||||
|
key: 'proc.cpu.util[{#APACHE.NAME}]'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The percentage of the CPU utilization by a process {#APACHE.NAME}.'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: cpu
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: c848c1449cef42bd90af13e6767bd2c9
|
||||||
|
expression: 'nodata(/Apache by Zabbix agent active/web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"],30m)=1 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
name: 'Apache: Failed to fetch status page'
|
||||||
|
event_name: 'Apache: Failed to fetch status page (or no data for 30m)'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Zabbix has not received any data for items for the last 30 minutes.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache: Service is down'
|
||||||
|
expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 4b460b835cb14513b5aace3275827c79
|
||||||
|
expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
name: 'Apache: Service is down'
|
||||||
|
priority: AVERAGE
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 93157365ee90446fa8191dfc5d623874
|
||||||
|
expression: 'min(/Apache by Zabbix agent active/net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"],5m)>{$APACHE.RESPONSE_TIME.MAX.WARN} and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
name: 'Apache: Service response time is too high'
|
||||||
|
event_name: 'Apache: Service response time is too high (over {$APACHE.RESPONSE_TIME.MAX.WARN}s for 5m)'
|
||||||
|
priority: WARNING
|
||||||
|
manual_close: 'YES'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Apache: Service is down'
|
||||||
|
expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 5427aef4eaad4519b193b38cdc71fde1
|
||||||
|
name: 'Apache: Memory usage[{#APACHE.NAME}]'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: BOLD_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.proc.vmem[{#APACHE.NAME}]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: BOLD_LINE
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: 'apache.proc.rss[{#APACHE.NAME}]'
|
||||||
|
master_item:
|
||||||
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#APACHE.NAME}'
|
||||||
|
path: $.name
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: apache
|
||||||
|
macros:
|
||||||
|
- macro: '{$APACHE.PROCESS.NAME.PARAMETER}'
|
||||||
|
description: 'The process name of the Apache web server used in the item key `proc.get`. It could be specified if the correct process name is known.'
|
||||||
|
- macro: '{$APACHE.PROCESS_NAME}'
|
||||||
|
value: (httpd|apache2)
|
||||||
|
description: 'The process name filter for the Apache process discovery.'
|
||||||
|
- macro: '{$APACHE.RESPONSE_TIME.MAX.WARN}'
|
||||||
|
value: '10'
|
||||||
|
description: 'The maximum Apache response time expressed in seconds for a trigger expression.'
|
||||||
|
- macro: '{$APACHE.STATUS.HOST}'
|
||||||
|
value: 127.0.0.1
|
||||||
|
description: 'The hostname or IP address of the Apache status page.'
|
||||||
|
- macro: '{$APACHE.STATUS.PATH}'
|
||||||
|
value: 'server-status?auto'
|
||||||
|
description: 'The URL path.'
|
||||||
|
- macro: '{$APACHE.STATUS.PORT}'
|
||||||
|
value: '80'
|
||||||
|
description: 'The port of the Apache status page.'
|
||||||
|
- macro: '{$APACHE.STATUS.SCHEME}'
|
||||||
|
value: http
|
||||||
|
description: 'The request scheme, which may be either HTTP or HTTPS.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: dd69695bb88241e6b457d06da37967fc
|
||||||
|
name: 'Apache performance'
|
||||||
|
pages:
|
||||||
|
- name: General
|
||||||
|
widgets:
|
||||||
|
- type: graph
|
||||||
|
width: '72'
|
||||||
|
height: '7'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
name: 'Apache: Worker states'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: graph
|
||||||
|
'y': '7'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
name: 'Apache: Requests per second'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: graphprototype
|
||||||
|
'y': '12'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
name: 'Apache: Current async connections{#SINGLETON}'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAD
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
'y': '7'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
name: 'Apache: Workers total'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAC
|
||||||
|
- type: graphprototype
|
||||||
|
x: '36'
|
||||||
|
'y': '12'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: columns
|
||||||
|
value: '1'
|
||||||
|
- type: GRAPH_PROTOTYPE
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
name: 'Apache: Current async processes{#SINGLETON}'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAE
|
||||||
|
valuemaps:
|
||||||
|
- uuid: 872ac3dadab34de9a69acd71d68cd7ea
|
||||||
|
name: 'Service state'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: Down
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Up
|
||||||
|
graphs:
|
||||||
|
- uuid: 3461ebdbfb024405a8e8da6c3e970d0d
|
||||||
|
name: 'Apache: Requests per second'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: GRADIENT_LINE
|
||||||
|
color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.requests.rate
|
||||||
|
- uuid: 0183d7d9c05843b19db5b4ba94f99350
|
||||||
|
name: 'Apache: Worker states'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.dnslookup
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.cleanup
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.logging
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.reading
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.sending
|
||||||
|
- sortorder: '5'
|
||||||
|
color: 6C59DC
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.starting
|
||||||
|
- sortorder: '6'
|
||||||
|
color: C7A72D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.closing
|
||||||
|
- sortorder: '7'
|
||||||
|
color: BA2A5D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.finishing
|
||||||
|
- sortorder: '8'
|
||||||
|
color: F230E0
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.keepalive
|
||||||
|
- sortorder: '9'
|
||||||
|
color: 5CCD18
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.slot
|
||||||
|
- sortorder: '10'
|
||||||
|
color: BB2A02
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers.waiting
|
||||||
|
- uuid: c82c849b07564ca29e58df3b984c1da9
|
||||||
|
name: 'Apache: Workers total'
|
||||||
|
type: STACKED
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers_total.busy
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Apache by Zabbix agent active'
|
||||||
|
key: apache.workers_total.idle
|
||||||
+1573
File diff suppressed because it is too large
Load Diff
+2428
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,801 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: c2c162144c2d4c5491c8801193af4945
|
||||||
|
name: Templates/Cloud
|
||||||
|
templates:
|
||||||
|
- uuid: 29325098807848aa928b4192ad5e020f
|
||||||
|
template: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
name: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
description: |
|
||||||
|
This template is designed to monitor Microsoft Azure Cosmos DB for MongoDB by HTTP.
|
||||||
|
It works without any external scripts and uses the script item.
|
||||||
|
|
||||||
|
Setup:
|
||||||
|
1. Create an Azure service principal via the Azure command-line interface (Azure CLI) for your subscription.
|
||||||
|
`az ad sp create-for-rbac --name zabbix --role reader --scope /subscriptions/<subscription_id>`
|
||||||
|
See https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli for more details.
|
||||||
|
2. Link the template to a host.
|
||||||
|
3. Configure the macros: {$AZURE.APP.ID}, {$AZURE.PASSWORD}, {$AZURE.TENANT.ID}, {$AZURE.SUBSCRIPTION.ID}, and {$AZURE.RESOURCE.ID}.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-3
|
||||||
|
groups:
|
||||||
|
- name: Templates/Cloud
|
||||||
|
items:
|
||||||
|
- uuid: 9e247bdb17f44630b9440b59d5ef251b
|
||||||
|
name: 'Autoscale max throughput'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.autoscale.max.throughput
|
||||||
|
delay: '0'
|
||||||
|
description: 'The autoscale max throughput.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.AutoscaleMaxThroughput.maximum
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 35a7d2c96990407f937e07fd160266a9
|
||||||
|
name: 'Get errors'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.data.errors
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'A list of errors from API requests.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.error
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
triggers:
|
||||||
|
- uuid: dfd484aa8a4e4b759e4e34c5318c7176
|
||||||
|
expression: 'length(last(/Azure Cosmos DB for MongoDB by HTTP/azure.cosmosdb.data.errors))>0'
|
||||||
|
name: 'Azure Cosmos DB: There are errors in requests to API'
|
||||||
|
opdata: '{ITEM.LASTVALUE1}'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'Zabbix has received errors in response to API requests.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 647faea1597c4da6a3cd78694be8e77e
|
||||||
|
name: 'Get data'
|
||||||
|
type: SCRIPT
|
||||||
|
key: azure.cosmosdb.data.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 AzureCosmosDB = {
|
||||||
|
params: {},
|
||||||
|
token: null,
|
||||||
|
|
||||||
|
setParams: function (params) {
|
||||||
|
['app_id', 'password', 'tenant_id', 'subscription_id', 'resource_id'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
|
||||||
|
throw 'Required param is not set: ' + field + '.';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
AzureCosmosDB.params = params;
|
||||||
|
AzureCosmosDB.tls = new CTlsConfig(params.tls_verify);
|
||||||
|
},
|
||||||
|
|
||||||
|
login: function () {
|
||||||
|
var response, login = new HttpRequest(AzureCosmosDB.tls.options);
|
||||||
|
if (typeof AzureCosmosDB.params.proxy !== 'undefined' && AzureCosmosDB.params.proxy !== '') {
|
||||||
|
login.setProxy(AzureCosmosDB.params.proxy);
|
||||||
|
}
|
||||||
|
login.addHeader('Content-Type: application/x-www-form-urlencoded');
|
||||||
|
response = login.post(
|
||||||
|
'https://login.microsoftonline.com/' + encodeURIComponent(AzureCosmosDB.params.tenant_id) + '/oauth2/token',
|
||||||
|
'grant_type=client_credentials&resource=' + encodeURIComponent('https://management.azure.com/') + '&client_id=' + encodeURIComponent(AzureCosmosDB.params.app_id) + '&client_secret=' + encodeURIComponent(AzureCosmosDB.params.password)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (login.getStatus() !== 200) {
|
||||||
|
throw 'Login failed with status code ' + login.getStatus() + ': ' + response;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse login session response.';
|
||||||
|
}
|
||||||
|
if (!response.hasOwnProperty('access_token')) {
|
||||||
|
throw 'Authentication response does not contain access token.';
|
||||||
|
}
|
||||||
|
AzureCosmosDB.token = response['access_token'];
|
||||||
|
},
|
||||||
|
|
||||||
|
request: function (url) {
|
||||||
|
var response, request = new HttpRequest(AzureCosmosDB.tls.options);
|
||||||
|
if (typeof AzureCosmosDB.params.proxy !== 'undefined' && AzureCosmosDB.params.proxy !== '') {
|
||||||
|
request.setProxy(AzureCosmosDB.params.proxy);
|
||||||
|
}
|
||||||
|
if (!AzureCosmosDB.token) {
|
||||||
|
throw 'Request does not contain access token.';
|
||||||
|
}
|
||||||
|
request.addHeader('Accept: application/json');
|
||||||
|
request.addHeader('Authorization: Bearer ' + AzureCosmosDB.token);
|
||||||
|
Zabbix.log(4, '[ AzureCosmosDB ] request url: ' + url);
|
||||||
|
response = request.get(url);
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200) {
|
||||||
|
throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from API.';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getField: function (data, path) {
|
||||||
|
var steps = path.split('.');
|
||||||
|
for (var i = 0; i < steps.length; i++) {
|
||||||
|
var step = steps[i];
|
||||||
|
if (typeof data !== 'object' || typeof data[step] === 'undefined') {
|
||||||
|
throw 'Required field was not found: ' + path;
|
||||||
|
}
|
||||||
|
|
||||||
|
data = data[step];
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
|
||||||
|
getMetricsData: function () {
|
||||||
|
var data = {};
|
||||||
|
start_date = new Date((new Date().getTime()) - 600000).toISOString().replace(/\.\d+/, '');
|
||||||
|
end_date = new Date(new Date().getTime()).toISOString().replace(/\.\d+/, '');
|
||||||
|
endpoints = {
|
||||||
|
'availability': '/providers/Microsoft.Insights/metrics?metricnames=ServiceAvailability&api-version=2021-05-01&interval=PT1H×pan=' + encodeURIComponent(start_date) + '/' + encodeURIComponent(end_date),
|
||||||
|
'requests': '/providers/Microsoft.Insights/metrics?metricnames=DataUsage,IndexUsage,DocumentQuota,AvailableStorage,DocumentCount,NormalizedRUConsumption,PhysicalPartitionThroughputInfo,PhysicalPartitionSizeInfo,AutoscaleMaxThroughput,ProvisionedThroughput,TotalRequests,TotalRequestUnits,MetadataRequests,MongoRequests,MongoRequestCharge,ServerSideLatency,ServerSideLatencyGateway,ServerSideLatencyDirect,ReplicationLatency&api-version=2021-05-01×pan=' + encodeURIComponent(start_date) + '/' + encodeURIComponent(end_date),
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.keys(endpoints).forEach(function (field) {
|
||||||
|
data[field] = {};
|
||||||
|
try {
|
||||||
|
metrics = AzureCosmosDB.request('https://management.azure.com' + AzureCosmosDB.params.resource_id + endpoints[field]);
|
||||||
|
if (!metrics.hasOwnProperty('value')) {
|
||||||
|
throw 'Failed getting required field. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
for (k in metrics.value) {
|
||||||
|
key = AzureCosmosDB.getField(metrics.value[k], 'name.value')
|
||||||
|
if (metrics.value[k].timeseries.length === 0) {
|
||||||
|
metrics.value[k].timeseries.push({ 'data': ['nodata'] })
|
||||||
|
}
|
||||||
|
data[field][key] = AzureCosmosDB.getField(metrics.value[k], 'timeseries.0.data.0');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
data.error = error.toString();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
AzureCosmosDB.setParams(JSON.parse(value));
|
||||||
|
AzureCosmosDB.login();
|
||||||
|
return JSON.stringify(AzureCosmosDB.getMetricsData());
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
error += (String(error).endsWith('.')) ? '' : '.';
|
||||||
|
Zabbix.log(3, '[ AzureCosmosDB ] ERROR: ' + error);
|
||||||
|
return JSON.stringify({ 'error': error });
|
||||||
|
}
|
||||||
|
description: 'The result of API requests is expressed in the JSON.'
|
||||||
|
timeout: '{$AZURE.DATA.TIMEOUT}'
|
||||||
|
parameters:
|
||||||
|
- name: app_id
|
||||||
|
value: '{$AZURE.APP.ID}'
|
||||||
|
- name: password
|
||||||
|
value: '{$AZURE.PASSWORD}'
|
||||||
|
- name: proxy
|
||||||
|
value: '{$AZURE.PROXY}'
|
||||||
|
- name: resource_id
|
||||||
|
value: '{$AZURE.RESOURCE.ID}'
|
||||||
|
- name: subscription_id
|
||||||
|
value: '{$AZURE.SUBSCRIPTION.ID}'
|
||||||
|
- name: tenant_id
|
||||||
|
value: '{$AZURE.TENANT.ID}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"Azure Cosmos DB for MongoDB"}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 947a2eb530754a609fa81c59e29fe7b7
|
||||||
|
name: 'Data usage'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.data.usage
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The total data usage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.DataUsage.total
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 0bf3da9168144016b663c9b8e76447fa
|
||||||
|
name: 'Document count'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.document.count
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total document count.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.DocumentCount.total
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 7fa0f59f8cfa4d9e83086b203e4f71ea
|
||||||
|
name: 'Document quota'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.document.quota
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The total storage quota.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.DocumentQuota.total
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: b09f9445d960415185457b89b6a73452
|
||||||
|
name: 'Index usage'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.index.usage
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The total index usage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.IndexUsage.total
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: cd35f04b180542cda50dc5d4e979e54e
|
||||||
|
name: 'Metadata requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.metadata.requests
|
||||||
|
delay: '0'
|
||||||
|
description: |
|
||||||
|
The count of metadata requests.
|
||||||
|
Cosmos DB maintains system metadata collection for each account, which allows you to enumerate collections, databases, etc., and their configurations, free of charge.
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.MetadataRequests.count
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: e42cf83e456a490295a84cfe9eb288ef
|
||||||
|
name: 'Mongo requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.mongo.requests
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of Mongo requests made.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.MongoRequests.count
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 8fd4068986af444799ae64c6bc8f16a6
|
||||||
|
name: 'Mongo request charge'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.mongo.requests.charge
|
||||||
|
delay: '0'
|
||||||
|
description: 'The Mongo request units consumed.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.MongoRequestCharge.total
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: fda6b39ce6ef4b8c8418b2e123ecdd17
|
||||||
|
name: 'Normalized RU consumption'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.normalized.ru.consumption
|
||||||
|
delay: '0'
|
||||||
|
units: '%'
|
||||||
|
description: 'The max RU consumption percentage per minute.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.NormalizedRUConsumption.maximum
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: be6800214a0443e899c40f8a4b6c3f21
|
||||||
|
name: 'Physical partition size'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.physical.partition.size
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The physical partition size in bytes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.PhysicalPartitionSizeInfo.maximum
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: e30d5eadde15427484e7a0d1cb38e9e3
|
||||||
|
name: 'Physical partition throughput'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.physical.partition.throughput
|
||||||
|
delay: '0'
|
||||||
|
description: 'The physical partition throughput.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.PhysicalPartitionThroughputInfo.maximum
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 49311bbfb2584a46b42ed1a7d8fcfd94
|
||||||
|
name: 'Provisioned throughput'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.provisioned.throughput
|
||||||
|
delay: '0'
|
||||||
|
description: 'The provisioned throughput.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.ProvisionedThroughput.maximum
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 6d7175e27d10406191c883dc2e5949e4
|
||||||
|
name: 'Replication latency, P99'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.replication.latency
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
description: 'The P99 replication latency across source and target regions for geo-enabled account.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.ReplicationLatency.average
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '0.001'
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: d9b5af0c71874114b48464ce20f8cf3d
|
||||||
|
name: 'Server side latency'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.server.side.latency
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
description: 'The server side latency.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.ServerSideLatency.average
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '0.001'
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 7587d3750d1643f085db5931670dc2f3
|
||||||
|
name: 'Server side latency, direct'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.server.side.latency.direct
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
description: 'The server side latency in direct connection mode.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.ServerSideLatencyDirect.average
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '0.001'
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 0aefdc3101fe4bcba4743d6e32671554
|
||||||
|
name: 'Server side latency, gateway'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.server.side.latency.gateway
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: s
|
||||||
|
description: 'The server side latency in gateway connection mode.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.ServerSideLatencyGateway.average
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: MULTIPLIER
|
||||||
|
parameters:
|
||||||
|
- '0.001'
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: network
|
||||||
|
- uuid: 42bd03c1753b4f19bc9793b03834cd3d
|
||||||
|
name: 'Service availability'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.service.availability
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The account requests availability at one hour granularity.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.availability.ServiceAvailability.average
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: health
|
||||||
|
triggers:
|
||||||
|
- uuid: c7649cd317f04a3d8fec0eebe3df6766
|
||||||
|
expression: '(min(/Azure Cosmos DB for MongoDB by HTTP/azure.cosmosdb.service.availability,#3))<{$AZURE.DB.COSMOS.MONGO.AVAILABILITY}'
|
||||||
|
name: 'Azure Cosmos DB: Cosmos DB for MongoDB account: Availability is low'
|
||||||
|
opdata: '{ITEM.LASTVALUE1}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: f4d4d2def5e945ab9048ada4813b7f04
|
||||||
|
name: 'Total request units'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.total.request.units
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
description: 'The request units consumed per minute.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.TotalRequestUnits.total
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
- uuid: 3dd2cd4edb7746edb9d917c83b280ca3
|
||||||
|
name: 'Total requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: azure.cosmosdb.total.requests
|
||||||
|
delay: '0'
|
||||||
|
description: 'Number of requests per minute.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.TotalRequests.count
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: azure.cosmosdb.data.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: storage
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: azure
|
||||||
|
- tag: target
|
||||||
|
value: cosmosdb
|
||||||
|
- tag: target
|
||||||
|
value: mongodb
|
||||||
|
macros:
|
||||||
|
- macro: '{$AZURE.APP.ID}'
|
||||||
|
description: 'The App ID of Microsoft Azure.'
|
||||||
|
- macro: '{$AZURE.DATA.TIMEOUT}'
|
||||||
|
value: 15s
|
||||||
|
description: 'API response timeout.'
|
||||||
|
- macro: '{$AZURE.DB.COSMOS.MONGO.AVAILABILITY}'
|
||||||
|
value: '70'
|
||||||
|
description: 'The warning threshold of the Cosmos DB for MongoDB service availability.'
|
||||||
|
- macro: '{$AZURE.PASSWORD}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Microsoft Azure password.'
|
||||||
|
- macro: '{$AZURE.PROXY}'
|
||||||
|
description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
|
||||||
|
- macro: '{$AZURE.RESOURCE.ID}'
|
||||||
|
description: 'Microsoft Azure Cosmos DB ID.'
|
||||||
|
- macro: '{$AZURE.SUBSCRIPTION.ID}'
|
||||||
|
description: 'Microsoft Azure subscription ID.'
|
||||||
|
- macro: '{$AZURE.TENANT.ID}'
|
||||||
|
description: 'Microsoft Azure tenant ID.'
|
||||||
|
- 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 "Azure Cosmos DB for MongoDB", e.g. {$HTTP.TLS.VERIFY:"Azure Cosmos DB for MongoDB"}.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: 323fb91b388a44bfbd4b7d634f6e6b6c
|
||||||
|
name: 'Overview Azure Cosmos DB for MongoDB'
|
||||||
|
pages:
|
||||||
|
- widgets:
|
||||||
|
- type: item
|
||||||
|
name: 'Service Availability'
|
||||||
|
width: '18'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: decimal_places
|
||||||
|
value: '0'
|
||||||
|
- type: STRING
|
||||||
|
name: down_color
|
||||||
|
value: FF0000
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.service.availability
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.1
|
||||||
|
value: '4'
|
||||||
|
- type: STRING
|
||||||
|
name: units
|
||||||
|
value: '%'
|
||||||
|
- type: STRING
|
||||||
|
name: units_color
|
||||||
|
value: 66BB6A
|
||||||
|
- type: STRING
|
||||||
|
name: up_color
|
||||||
|
value: 4CAF50
|
||||||
|
- type: STRING
|
||||||
|
name: value_color
|
||||||
|
value: 66BB6A
|
||||||
|
- type: graph
|
||||||
|
'y': '4'
|
||||||
|
width: '72'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
name: 'Azure MongoDB: Usage'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAC
|
||||||
|
- type: graph
|
||||||
|
'y': '9'
|
||||||
|
width: '72'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
name: 'Azure MongoDB: Requests'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: graph
|
||||||
|
'y': '14'
|
||||||
|
width: '72'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
name: 'Azure MongoDB: Latency'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: item
|
||||||
|
name: 'Provisioned Throughput'
|
||||||
|
x: '18'
|
||||||
|
width: '18'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.provisioned.throughput
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'Normalized RU Consumption'
|
||||||
|
x: '36'
|
||||||
|
width: '18'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.normalized.ru.consumption
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '4'
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.1
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'Document Count'
|
||||||
|
x: '54'
|
||||||
|
width: '18'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.document.count
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
graphs:
|
||||||
|
- uuid: 89256a1eba8c49d2b7469a68ff050ac5
|
||||||
|
name: 'Azure MongoDB: Latency'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.server.side.latency.gateway
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.server.side.latency
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.server.side.latency.direct
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.replication.latency
|
||||||
|
- uuid: a1225fc27d334c5bbb5043e3d468bf02
|
||||||
|
name: 'Azure MongoDB: Requests'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.total.requests
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.total.request.units
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.metadata.requests
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.mongo.requests
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.mongo.requests.charge
|
||||||
|
- uuid: 07168aaf3abb42f6b61746cc6e2d2910
|
||||||
|
name: 'Azure MongoDB: Usage'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.data.usage
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.index.usage
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Azure Cosmos DB for MongoDB by HTTP'
|
||||||
|
key: azure.cosmosdb.document.quota
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+2911
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,306 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: e960332b3f6c46a1956486d4f3f99fce
|
||||||
|
name: 'Templates/Server hardware'
|
||||||
|
templates:
|
||||||
|
- uuid: 02f35169a5a54a5aad8b3f06e798ab1f
|
||||||
|
template: 'Chassis by IPMI'
|
||||||
|
name: 'Chassis by IPMI'
|
||||||
|
description: |
|
||||||
|
Template for monitoring servers with BMC over IPMI that work without any external scripts.
|
||||||
|
All metrics are collected at once, thanks to Zabbix's bulk data collection. The template is available starting from Zabbix version 5.0.
|
||||||
|
It collects metrics by polling BMC remotely using an IPMI agent.
|
||||||
|
|
||||||
|
|
||||||
|
Known Issues:
|
||||||
|
|
||||||
|
Description: If the BMC has a sensor with an empty threshold value, we get the LLD error "Cannot create trigger...".
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/398023-discussion-thread-for-official-zabbix-template-ipmi
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: 'Templates/Server hardware'
|
||||||
|
items:
|
||||||
|
- uuid: dbcf45cb09284fc19a17e7369c8fda43
|
||||||
|
name: 'Get IPMI sensors'
|
||||||
|
type: IPMI
|
||||||
|
key: ipmi.get
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'The master item that receives all sensors with values for LLD and dependent elements from BMC.'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: d0a3bd3c62d7438d8acde8ff0a9bb4db
|
||||||
|
name: 'Discrete sensors discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: ipmi.discrete.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#SENSOR_READING_TYPE}'
|
||||||
|
value: threshold
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#SENSOR_TYPE}'
|
||||||
|
value: '{$IPMI.SENSOR_TYPE.MATCHES}'
|
||||||
|
formulaid: B
|
||||||
|
- macro: '{#SENSOR_TYPE}'
|
||||||
|
value: '{$IPMI.SENSOR_TYPE.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: C
|
||||||
|
description: 'Discovery of the discrete IPMI sensors.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 6ce86fa51c614f94b2250e14af8d9385
|
||||||
|
name: '{#SENSOR_ID}'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'ipmi.state_text[{#SENSOR_ID}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: CHAR
|
||||||
|
trends: '0'
|
||||||
|
description: 'It is a state of the discrete IPMI sensor.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@.id==''{#SENSOR_ID}'')].state.text.first()'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1d
|
||||||
|
master_item:
|
||||||
|
key: ipmi.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: environment
|
||||||
|
- tag: sensor
|
||||||
|
value: '{#SENSOR_TYPE}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: efe107571d704895bbb43c95407e6689
|
||||||
|
expression: 'last(/Chassis by IPMI/ipmi.state_text[{#SENSOR_ID}],#1)<>last(/Chassis by IPMI/ipmi.state_text[{#SENSOR_ID}],#2)'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value has changed'
|
||||||
|
priority: INFO
|
||||||
|
description: 'The trigger is informing about changes in a state of the discrete IPMI sensor. A problem generated by this trigger can be manually closed.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
master_item:
|
||||||
|
key: ipmi.get
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#SENSOR_ID}'
|
||||||
|
path: $.id
|
||||||
|
- lld_macro: '{#SENSOR_READING_TYPE}'
|
||||||
|
path: $.reading.text
|
||||||
|
- lld_macro: '{#SENSOR_TYPE}'
|
||||||
|
path: $.sensor.text
|
||||||
|
- lld_macro: '{#SENSOR_UNIT}'
|
||||||
|
path: $.units
|
||||||
|
- uuid: bd5ceb5412d3462d90fa857b2d214788
|
||||||
|
name: 'Threshold sensors discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: ipmi.sensors.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#SENSOR_READING_TYPE}'
|
||||||
|
value: threshold
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#SENSOR_TYPE}'
|
||||||
|
value: '{$IPMI.SENSOR_TYPE.MATCHES}'
|
||||||
|
formulaid: B
|
||||||
|
- macro: '{#SENSOR_TYPE}'
|
||||||
|
value: '{$IPMI.SENSOR_TYPE.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: C
|
||||||
|
description: 'Discovery of the threshold IPMI sensors.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 77e8c8c6e2444667b5da698c802dbae0
|
||||||
|
name: '{#SENSOR_ID}, {#SENSOR_UNIT}'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'ipmi.value[{#SENSOR_ID}]'
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
description: 'It is a state of the threshold IPMI sensor.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@.id==''{#SENSOR_ID}'')].value.first()'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: ipmi.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: environment
|
||||||
|
- tag: sensor
|
||||||
|
value: '{#SENSOR_TYPE}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: e9c37c1847d64920b80a20cc764b6c81
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_CRIT}'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value is above critical high'
|
||||||
|
event_name: 'Chassis: {#SENSOR_ID} value is above critical high (greater than {#SENSOR_HI_CRIT} for 5m)'
|
||||||
|
priority: HIGH
|
||||||
|
description: 'The trigger is informing that a value higher than the upper critical threshold has been reached.'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Chassis: {#SENSOR_ID} value is above non-recoverable high'
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_DISAST}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 0fc9d9baa3dd4d3db841e2153b6c39b2
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_WARN}'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value is above non-critical high'
|
||||||
|
event_name: 'Chassis: {#SENSOR_ID} value is above non-critical high (greater than {#SENSOR_HI_WARN} for 5m)'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'The trigger is informing that a value higher than the upper non-critical threshold has been reached.'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Chassis: {#SENSOR_ID} value is above critical high'
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_CRIT}'
|
||||||
|
- name: 'Chassis: {#SENSOR_ID} value is above non-recoverable high'
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_DISAST}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 2c3dbc3f68db44f1924682a8241e0086
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_DISAST}'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value is above non-recoverable high'
|
||||||
|
event_name: 'Chassis: {#SENSOR_ID} value is above non-recoverable high (greater than {#SENSOR_HI_DISAST} for 5m)'
|
||||||
|
priority: DISASTER
|
||||||
|
description: 'The trigger is informing that a value higher than the upper non-recoverable threshold has been reached.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: adbb7e20a46d42329e4744548aa9d5f6
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_CRIT}'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value is below critical low'
|
||||||
|
event_name: 'Chassis: {#SENSOR_ID} value is below critical low (less than {#SENSOR_LO_CRIT} for 5m)'
|
||||||
|
priority: HIGH
|
||||||
|
description: 'The trigger is informing that a value less than the lower critical threshold has been reached.'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Chassis: {#SENSOR_ID} value is below non-recoverable low'
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_DISAST}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 7b712e7b11a34635948517467f77ad9d
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_WARN}'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value is below non-critical low'
|
||||||
|
event_name: 'Chassis: {#SENSOR_ID} value is below non-critical low (less than {#SENSOR_LO_WARN} for 5m)'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'The trigger is informing that a value less than the lower non-critical threshold has been reached.'
|
||||||
|
dependencies:
|
||||||
|
- name: 'Chassis: {#SENSOR_ID} value is below critical low'
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_CRIT}'
|
||||||
|
- name: 'Chassis: {#SENSOR_ID} value is below non-recoverable low'
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_DISAST}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: b078ee6b820f44f2871c2e3fcd0ce4cf
|
||||||
|
expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_DISAST}'
|
||||||
|
name: 'Chassis: {#SENSOR_ID} value is below non-recoverable low'
|
||||||
|
event_name: 'Chassis: {#SENSOR_ID} value is below non-recoverable low (less than {#SENSOR_LO_DISAST} for 5m)'
|
||||||
|
priority: DISASTER
|
||||||
|
description: 'The trigger is informing that a value less than the lower non-recoverable threshold has been reached.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 85099badf8d547d89f498cf29bcd51a8
|
||||||
|
name: 'IPMI: {#SENSOR_ID}'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Chassis by IPMI'
|
||||||
|
key: 'ipmi.value[{#SENSOR_ID}]'
|
||||||
|
master_item:
|
||||||
|
key: ipmi.get
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#SENSOR_HI_CRIT}'
|
||||||
|
path: $.threshold.upper.crit
|
||||||
|
- lld_macro: '{#SENSOR_HI_DISAST}'
|
||||||
|
path: $.threshold.upper.non_recover
|
||||||
|
- lld_macro: '{#SENSOR_HI_WARN}'
|
||||||
|
path: $.threshold.upper.non_crit
|
||||||
|
- lld_macro: '{#SENSOR_ID}'
|
||||||
|
path: $.id
|
||||||
|
- lld_macro: '{#SENSOR_LO_CRIT}'
|
||||||
|
path: $.threshold.lower.crit
|
||||||
|
- lld_macro: '{#SENSOR_LO_DISAST}'
|
||||||
|
path: $.threshold.lower.non_recover
|
||||||
|
- lld_macro: '{#SENSOR_LO_WARN}'
|
||||||
|
path: $.threshold.lower.non_crit
|
||||||
|
- lld_macro: '{#SENSOR_READING_TYPE}'
|
||||||
|
path: $.reading.text
|
||||||
|
- lld_macro: '{#SENSOR_TYPE}'
|
||||||
|
path: $.sensor.text
|
||||||
|
- lld_macro: '{#SENSOR_UNIT}'
|
||||||
|
path: $.units
|
||||||
|
overrides:
|
||||||
|
- name: 'trigger SENSOR_LO_WARN'
|
||||||
|
step: '1'
|
||||||
|
operations:
|
||||||
|
- operationobject: TRIGGER_PROTOTYPE
|
||||||
|
operator: LIKE
|
||||||
|
value: '{#SENSOR_LO_WARN}'
|
||||||
|
discover: NO_DISCOVER
|
||||||
|
- name: 'trigger SENSOR_LO_CRIT'
|
||||||
|
step: '2'
|
||||||
|
operations:
|
||||||
|
- operationobject: TRIGGER_PROTOTYPE
|
||||||
|
operator: LIKE
|
||||||
|
value: '{#SENSOR_LO_CRIT}'
|
||||||
|
discover: NO_DISCOVER
|
||||||
|
- name: 'trigger SENSOR_LO_DISAST'
|
||||||
|
step: '3'
|
||||||
|
operations:
|
||||||
|
- operationobject: TRIGGER_PROTOTYPE
|
||||||
|
operator: LIKE
|
||||||
|
value: '{#SENSOR_LO_DISAST}'
|
||||||
|
discover: NO_DISCOVER
|
||||||
|
- name: 'trigger SENSOR_HI_WARN'
|
||||||
|
step: '4'
|
||||||
|
operations:
|
||||||
|
- operationobject: TRIGGER_PROTOTYPE
|
||||||
|
operator: LIKE
|
||||||
|
value: '{#SENSOR_HI_WARN}'
|
||||||
|
discover: NO_DISCOVER
|
||||||
|
- name: 'trigger SENSOR_HI_CRIT'
|
||||||
|
step: '5'
|
||||||
|
operations:
|
||||||
|
- operationobject: TRIGGER_PROTOTYPE
|
||||||
|
operator: LIKE
|
||||||
|
value: '{#SENSOR_HI_CRIT}'
|
||||||
|
discover: NO_DISCOVER
|
||||||
|
- name: 'trigger SENSOR_HI_DISAST'
|
||||||
|
step: '6'
|
||||||
|
operations:
|
||||||
|
- operationobject: TRIGGER_PROTOTYPE
|
||||||
|
operator: LIKE
|
||||||
|
value: '{#SENSOR_HI_DISAST}'
|
||||||
|
discover: NO_DISCOVER
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: hardware
|
||||||
|
- tag: target
|
||||||
|
value: server
|
||||||
|
macros:
|
||||||
|
- macro: '{$IPMI.PASSWORD}'
|
||||||
|
description: 'This macro is used for access to BMC. It can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$IPMI.SENSOR_TYPE.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'This macro is used in sensors discovery. It can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$IPMI.SENSOR_TYPE.NOT_MATCHES}'
|
||||||
|
value: invalid
|
||||||
|
description: 'This macro is used in sensors discovery. It can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$IPMI.USER}'
|
||||||
|
description: 'This macro is used for access to BMC. It can be overridden on the host or linked template level.'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,409 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
- uuid: 36bff6c29af64692839d077febfc7079
|
||||||
|
name: 'Templates/Network devices'
|
||||||
|
host_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Applications
|
||||||
|
templates:
|
||||||
|
- uuid: 2fca6b60914b4fa98132b1a7885ab014
|
||||||
|
template: 'Cisco Meraki dashboard by HTTP'
|
||||||
|
name: 'Cisco Meraki dashboard by HTTP'
|
||||||
|
description: |
|
||||||
|
Template for monitoring Cisco Meraki dashboard https://meraki.cisco.com/products/meraki-dashboard/
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-6
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
- name: 'Templates/Network devices'
|
||||||
|
items:
|
||||||
|
- uuid: d1a5f3c79a604bae98c314d2aed64ff4
|
||||||
|
name: 'Get data'
|
||||||
|
type: SCRIPT
|
||||||
|
key: meraki.get.data
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var params = JSON.parse(value);
|
||||||
|
|
||||||
|
var tls = new CTlsConfig(params.tls_verify);
|
||||||
|
|
||||||
|
var r_match = '{$MERAKI.ORGANIZATION.NAME.MATCHES}';
|
||||||
|
var r_not_match = '{$MERAKI.ORGANIZATION.NAME.NOT_MATCHES}';
|
||||||
|
|
||||||
|
var request = new HttpRequest(tls.options);
|
||||||
|
|
||||||
|
request.addHeader('X-Cisco-Meraki-API-Key:' + params.token);
|
||||||
|
request.addHeader('User-Agent: ZabbixServer/1.2 Zabbix');
|
||||||
|
|
||||||
|
var response,
|
||||||
|
error_msg = '',
|
||||||
|
organizations = [],
|
||||||
|
devices = [];
|
||||||
|
|
||||||
|
function hasHeader(headers, name) {
|
||||||
|
if (typeof headers !== 'object' || headers === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var target = name.toLowerCase();
|
||||||
|
|
||||||
|
for (var key in headers) {
|
||||||
|
if (key.toLowerCase() === target) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHttpData(url) {
|
||||||
|
var startTime = new Date().getTime();
|
||||||
|
var maxWait = 1 * 60 * 60 * 1000;
|
||||||
|
var waitFor = 1000;
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
response = request.get(url);
|
||||||
|
Zabbix.log(4, '[ Meraki API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
var status = request.getStatus();
|
||||||
|
|
||||||
|
if (response !== null) {
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from Meraki API. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status === 429 && response && response.errors && Array.isArray(response.errors) &&
|
||||||
|
response.errors.indexOf("API rate limit exceeded for organization") !== -1) {
|
||||||
|
var now = new Date().getTime();
|
||||||
|
var headers = request.getHeaders(false);
|
||||||
|
|
||||||
|
if (hasHeader(headers, 'Retry-After')) {
|
||||||
|
var retryAfter = headers['Retry-After'];
|
||||||
|
Zabbix.log(4, '[ Meraki API ] API rate limit exceeded. Retrying after ' + retryAfter + ' seconds.');
|
||||||
|
waitFor = parseInt(retryAfter) * 1000;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Zabbix.log(4, '[ Meraki API ] API rate limit exceeded. No Retry-After header. Retrying after 1 second.');
|
||||||
|
}
|
||||||
|
if (now - startTime + waitFor > maxWait) {
|
||||||
|
throw 'Failed to receive data: API rate limit exceeded and retry timeout reached.';
|
||||||
|
}
|
||||||
|
Zabbix.sleep(waitFor);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status !== 200) {
|
||||||
|
if (response.errors) {
|
||||||
|
throw response.errors.join(', ');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw 'Failed to receive data: invalid response status code.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof (response) !== 'object' || response === null) {
|
||||||
|
throw 'Cannot process response data: received data is not an object.';
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (params.token === '{' + '$MERAKI.TOKEN}') {
|
||||||
|
throw 'Please change {' + '$MERAKI.TOKEN} macro to the proper value.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.url.indexOf('http://') === -1 && params.url.indexOf('https://') === -1) {
|
||||||
|
params.url = 'https://' + params.url;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!params.url.endsWith('/')) {
|
||||||
|
params.url += '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
tls.checkURL(params.url);
|
||||||
|
|
||||||
|
if (typeof params.httpproxy !== 'undefined' && params.httpproxy !== '') {
|
||||||
|
request.setProxy(params.httpproxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
organizations = getHttpData(params.url + 'organizations');
|
||||||
|
|
||||||
|
organizations = organizations.filter(function (x) {
|
||||||
|
return new RegExp(r_match).test(x.name) & !new RegExp(r_not_match).test(x.name);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (Array.isArray(organizations) && organizations.length > 0) {
|
||||||
|
for (i in organizations) {
|
||||||
|
if ('id' in organizations[i] && 'name' in organizations[i]) {
|
||||||
|
try {
|
||||||
|
organization_devices = getHttpData(params.url + 'organizations/' + encodeURIComponent(organizations[i].id) + '/devices/availabilities');
|
||||||
|
|
||||||
|
if (Array.isArray(organization_devices) && organization_devices.length > 0) {
|
||||||
|
for (j in organization_devices) {
|
||||||
|
organization_devices[j].organizationId = organizations[i].id;
|
||||||
|
organization_devices[j].organizationName = organizations[i].name;
|
||||||
|
if (!organization_devices[j].name) {
|
||||||
|
organization_devices[j].name = organization_devices[j].serial;
|
||||||
|
}
|
||||||
|
devices.push(organization_devices[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
error_msg += organizations[i].name + " organization's devices retrieval error: " + error + '\n';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error_msg += 'There is no ID or organization name in the API response.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
error_msg += 'Organizations data retrieval error: ' + error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
organizations: organizations,
|
||||||
|
devices: devices,
|
||||||
|
error: error_msg.toString()
|
||||||
|
});
|
||||||
|
description: 'Item for gathering all the organizations and devices from Meraki API.'
|
||||||
|
timeout: '{$MERAKI.DATA.TIMEOUT}'
|
||||||
|
parameters:
|
||||||
|
- name: httpproxy
|
||||||
|
value: '{$MERAKI.HTTP_PROXY}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"Cisco Meraki dashboard"}'
|
||||||
|
- name: token
|
||||||
|
value: '{$MERAKI.TOKEN}'
|
||||||
|
- name: url
|
||||||
|
value: '{$MERAKI.API.URL}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 6fdd764d820341e7bd2a24f42802c58a
|
||||||
|
name: 'Data item errors'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: meraki.get.data.errors
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Item for gathering all the data item errors.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.error
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: meraki.get.data
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: error
|
||||||
|
triggers:
|
||||||
|
- uuid: 2bf9355f548e4e9b9b8581fb43f175fe
|
||||||
|
expression: 'length(last(/Cisco Meraki dashboard by HTTP/meraki.get.data.errors))>0'
|
||||||
|
name: 'Meraki: There are errors in ''Get data'' metric'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 6488b49e692e4fe8b6a1c57f56b6ba7d
|
||||||
|
name: 'Devices discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: meraki.devices.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$MERAKI.DEVICE.NAME.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$MERAKI.DEVICE.NAME.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
- macro: '{#STATUS}'
|
||||||
|
value: '{$MERAKI.DEVICE.STATUS.MATCHES}'
|
||||||
|
formulaid: C
|
||||||
|
- macro: '{#STATUS}'
|
||||||
|
value: '{$MERAKI.DEVICE.STATUS.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: D
|
||||||
|
host_prototypes:
|
||||||
|
- uuid: 86d599f384d94b368508a170911213ec
|
||||||
|
host: '{#SERIAL}'
|
||||||
|
name: '[{#SERIAL}] [{#PRODUCT_TYPE}] {#NAME}'
|
||||||
|
group_links:
|
||||||
|
- group:
|
||||||
|
name: Applications
|
||||||
|
templates:
|
||||||
|
- name: 'Cisco Meraki device by HTTP'
|
||||||
|
macros:
|
||||||
|
- macro: '{$MAC}'
|
||||||
|
value: '{#MAC}'
|
||||||
|
description: 'MAC address of the device.'
|
||||||
|
- macro: '{$NETWORK.ID}'
|
||||||
|
value: '{#NETWORK.ID}'
|
||||||
|
description: 'Network ID of the device.'
|
||||||
|
- macro: '{$ORGANIZATION_ID}'
|
||||||
|
value: '{#ORGANIZATION_ID}'
|
||||||
|
description: 'Organization ID of the device.'
|
||||||
|
- macro: '{$SERIAL}'
|
||||||
|
value: '{#SERIAL}'
|
||||||
|
description: 'Serial number of the device.'
|
||||||
|
tags:
|
||||||
|
- tag: organization
|
||||||
|
value: '{#ORGANIZATION_NAME}'
|
||||||
|
- tag: serial-number
|
||||||
|
value: '{#SERIAL}'
|
||||||
|
- tag: type
|
||||||
|
value: '{#PRODUCT_TYPE}'
|
||||||
|
master_item:
|
||||||
|
key: meraki.get.data
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#MAC}'
|
||||||
|
path: $.mac
|
||||||
|
- lld_macro: '{#NAME}'
|
||||||
|
path: $.name
|
||||||
|
- lld_macro: '{#NETWORK.ID}'
|
||||||
|
path: $.network.id
|
||||||
|
- lld_macro: '{#ORGANIZATION_ID}'
|
||||||
|
path: $.organizationId
|
||||||
|
- lld_macro: '{#ORGANIZATION_NAME}'
|
||||||
|
path: $.organizationName
|
||||||
|
- lld_macro: '{#PRODUCT_TYPE}'
|
||||||
|
path: $.productType
|
||||||
|
- lld_macro: '{#SERIAL}'
|
||||||
|
path: $.serial
|
||||||
|
- lld_macro: '{#STATUS}'
|
||||||
|
path: $.status
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.devices
|
||||||
|
- uuid: 30f38d19659646009ca436d48f9598b0
|
||||||
|
name: 'Organizations discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: meraki.organization.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$MERAKI.ORGANIZATION.NAME.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$MERAKI.ORGANIZATION.NAME.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
host_prototypes:
|
||||||
|
- uuid: 59cd2e995b814d7e9f8411dbc7420c76
|
||||||
|
host: 'meraki-organization-{#ID}'
|
||||||
|
name: '[{#REGION}] {#NAME}'
|
||||||
|
group_links:
|
||||||
|
- group:
|
||||||
|
name: Applications
|
||||||
|
group_prototypes:
|
||||||
|
- name: '{#REGION}'
|
||||||
|
templates:
|
||||||
|
- name: 'Cisco Meraki organization by HTTP'
|
||||||
|
macros:
|
||||||
|
- macro: '{$ID}'
|
||||||
|
value: '{#ID}'
|
||||||
|
description: 'ID of the organization.'
|
||||||
|
master_item:
|
||||||
|
key: meraki.get.data
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#ID}'
|
||||||
|
path: $.id
|
||||||
|
- lld_macro: '{#NAME}'
|
||||||
|
path: $.name
|
||||||
|
- lld_macro: '{#REGION}'
|
||||||
|
path: $.cloud.region.name
|
||||||
|
- lld_macro: '{#URL}'
|
||||||
|
path: $.url
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.organizations
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: network
|
||||||
|
- tag: target
|
||||||
|
value: cisco-meraki-dashboard
|
||||||
|
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 "Cisco Meraki dashboard", e.g. {$HTTP.TLS.VERIFY:"Cisco Meraki dashboard"}.'
|
||||||
|
- macro: '{$MERAKI.API.URL}'
|
||||||
|
value: api.meraki.com/api/v1
|
||||||
|
description: 'Cisco Meraki dashboard API URL, e.g., api.meraki.com/api/v1'
|
||||||
|
- macro: '{$MERAKI.DATA.TIMEOUT}'
|
||||||
|
value: '60'
|
||||||
|
description: 'Response timeout for an API.'
|
||||||
|
- macro: '{$MERAKI.DEVICE.NAME.MATCHES}'
|
||||||
|
value: .+
|
||||||
|
description: 'This macro is used in devices discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$MERAKI.DEVICE.NAME.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'This macro is used in devices discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$MERAKI.DEVICE.STATUS.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'This macro is used in devices discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$MERAKI.DEVICE.STATUS.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'This macro is used in devices discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$MERAKI.HTTP_PROXY}'
|
||||||
|
description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. See documentation at https://www.zabbix.com/documentation/7.0/manual/config/items/itemtypes/http'
|
||||||
|
- macro: '{$MERAKI.ORGANIZATION.NAME.MATCHES}'
|
||||||
|
value: .+
|
||||||
|
description: 'This macro is used in organizations discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$MERAKI.ORGANIZATION.NAME.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'This macro is used in organizations discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$MERAKI.TOKEN}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Cisco Meraki dashboard API token.'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,677 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
- uuid: 36bff6c29af64692839d077febfc7079
|
||||||
|
name: 'Templates/Network devices'
|
||||||
|
host_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Applications
|
||||||
|
templates:
|
||||||
|
- uuid: e5cf4e7ac41a470b99e4262d1c5ee104
|
||||||
|
template: 'Cisco SD-WAN by HTTP'
|
||||||
|
name: 'Cisco SD-WAN by HTTP'
|
||||||
|
description: |
|
||||||
|
Discover Cisco SD-WAN devices by HTTP with script item usage.
|
||||||
|
|
||||||
|
Setup:
|
||||||
|
1. Put your username and password from Cisco SD-WAN vManage into {$SDWAN.API.USERNAME} and {$SDWAN.API.PASSWORD} macros.
|
||||||
|
2. Set your Cisco SD-WAN vManage URL as {$SDWAN.API.URL} macro value.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-2
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
- name: 'Templates/Network devices'
|
||||||
|
items:
|
||||||
|
- uuid: efc5456a02d04ade93cd54b145ebc24d
|
||||||
|
name: 'Authentication item errors'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.auth.errors
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Item for gathering all the data item errors.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.error
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.authentication
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: error
|
||||||
|
triggers:
|
||||||
|
- uuid: 9f98b660a10a4891910b0e3b42f90403
|
||||||
|
expression: 'length(last(/Cisco SD-WAN by HTTP/sd_wan.auth.errors))>0'
|
||||||
|
name: 'Cisco SD-WAN: Authentication has failed'
|
||||||
|
priority: AVERAGE
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 5aa5a643a3cf42148454507da22aeb17
|
||||||
|
name: Authentication
|
||||||
|
type: SCRIPT
|
||||||
|
key: sd_wan.authentication
|
||||||
|
delay: '{$SDWAN.AUTH.FREQUENCY}'
|
||||||
|
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 params = JSON.parse(value),
|
||||||
|
tls = new CTlsConfig(params.tls_verify),
|
||||||
|
request = new HttpRequest(tls.options),
|
||||||
|
cookies = [],
|
||||||
|
token = "",
|
||||||
|
error_msg = "";
|
||||||
|
|
||||||
|
function authenticate(url) {
|
||||||
|
tls.checkURL(url);
|
||||||
|
var payload = 'j_username=' + encodeURIComponent(params.username)
|
||||||
|
+ '&j_password=' + encodeURIComponent(params.password);
|
||||||
|
request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||||
|
response = request.post(url, payload);
|
||||||
|
Zabbix.log(4, '[ SD-WAN API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200) {
|
||||||
|
throw 'Failed to receive data: invalid response status code.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response !== null && response != "") {
|
||||||
|
throw 'Authentication failed.';
|
||||||
|
}
|
||||||
|
|
||||||
|
var headers = request.getHeaders();
|
||||||
|
for (key in headers) {
|
||||||
|
if (key.toLowerCase() == 'set-cookie') {
|
||||||
|
var entries = headers[key].split(',');
|
||||||
|
for (idx in entries) {
|
||||||
|
var value = entries[idx].split(';')[0];
|
||||||
|
cookies.push(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function getToken(url) {
|
||||||
|
tls.checkURL(url);
|
||||||
|
response = request.get(url);
|
||||||
|
Zabbix.log(4, '[ SD-WAN API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200) {
|
||||||
|
throw 'Failed to receive data: invalid response status code.';
|
||||||
|
}
|
||||||
|
|
||||||
|
var headers = request.getHeaders();
|
||||||
|
for (key in headers) {
|
||||||
|
if (key.toLowerCase() == 'content-type' && headers[key] != 'application/json') {
|
||||||
|
throw 'Something went wrong while getting the authentication token. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
['username', 'password', 'url'].forEach(function (field) {
|
||||||
|
var macro = '{$SDWAN.API.' + field.toUpperCase() + '}';
|
||||||
|
if (params[field] === macro || params[field] === '') {
|
||||||
|
throw 'Please change ' + macro + ' macro to the proper value.';
|
||||||
|
}
|
||||||
|
if (typeof params[field] === 'undefined') {
|
||||||
|
throw 'Please set \'' + field + '\' script input parameter to ' + macro + ' macro value.';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (params.url.indexOf('http://') === -1 && params.url.indexOf('https://') === -1) {
|
||||||
|
params.url = 'https://' + params.url;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!params.url.endsWith('/')) {
|
||||||
|
params.url += '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof params.http_proxy !== 'undefined' && params.http_proxy !== '{' + '$SDWAN.HTTP_PROXY}' && params.http_proxy !== '') {
|
||||||
|
request.setProxy(params.http_proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
authenticate(params.url + 'j_security_check');
|
||||||
|
token = getToken(params.url + 'dataservice/client/token');
|
||||||
|
|
||||||
|
} catch (err) {
|
||||||
|
error_msg = err;
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
'cookie': cookies.join('; '),
|
||||||
|
'token': token,
|
||||||
|
'error': error_msg.toString()
|
||||||
|
});
|
||||||
|
description: |
|
||||||
|
Cisco SD-WAN authentication with service account parameters and temporary-generated token usage.
|
||||||
|
Returns an authentication token and session id; it is required only once and is used for all dependent script items.
|
||||||
|
A session will expire after 30 minutes of inactivity or after 24 hours, which is the total lifespan of a session.
|
||||||
|
Check the template documentation for the details.
|
||||||
|
timeout: '{$SDWAN.DATA.TIMEOUT}'
|
||||||
|
parameters:
|
||||||
|
- name: http_proxy
|
||||||
|
value: '{$SDWAN.HTTP_PROXY}'
|
||||||
|
- name: password
|
||||||
|
value: '{$SDWAN.API.PASSWORD}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"Cisco SD-WAN"}'
|
||||||
|
- name: url
|
||||||
|
value: '{$SDWAN.API.URL}'
|
||||||
|
- name: username
|
||||||
|
value: '{$SDWAN.API.USERNAME}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: bbb2713e2e174c558315de8b2fd55f0f
|
||||||
|
name: 'Get devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Item for gathering all devices from Cisco SD-WAN API.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
var creds = JSON.parse(value);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse authentication data from input value.';
|
||||||
|
}
|
||||||
|
|
||||||
|
var tls = new CTlsConfig('{{$HTTP.TLS.VERIFY:"Cisco SD-WAN"}.regsub("^(none|peer|full)$", "\1")}'),
|
||||||
|
request = new HttpRequest(tls.options),
|
||||||
|
devices = [],
|
||||||
|
error_msg = "",
|
||||||
|
url = "{$SDWAN.API.URL}",
|
||||||
|
http_proxy = "{$SDWAN.HTTP_PROXY}";
|
||||||
|
|
||||||
|
function getHttpData(url, token, cookie) {
|
||||||
|
tls.checkURL(url);
|
||||||
|
request.addHeader('Cookie: ' + cookie);
|
||||||
|
request.addHeader('X-XSRF-TOKEN: ' + token);
|
||||||
|
response = request.get(url);
|
||||||
|
Zabbix.log(4, '[ SD-WAN API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() !== 200) {
|
||||||
|
throw 'Failed to receive data: invalid response status code.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response !== null) {
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from SD-WAN API. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof response !== 'object' || response === null) {
|
||||||
|
throw 'Cannot process response data: received data is not an object.';
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
['token', 'cookie'].forEach(function (field) {
|
||||||
|
if (creds[field] === null || creds[field] == "" || typeof creds[field] === 'undefined') {
|
||||||
|
throw 'Unexpected token value has been received'
|
||||||
|
+ ((typeof creds.error !== 'undefined' && creds.error != "") ? ': ' + creds.error : '');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (url === '{' + '$SDWAN.API.URL}') {
|
||||||
|
throw 'Please change {' + '$SDWAN.API.URL} macro to the proper value.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
|
||||||
|
url = 'https://' + url;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!url.endsWith('/')) {
|
||||||
|
url += '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (http_proxy !== '{' + '$SDWAN.HTTP_PROXY}' && http_proxy !== '') {
|
||||||
|
request.setProxy(http_proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
devices = getHttpData(
|
||||||
|
url + 'dataservice/device',
|
||||||
|
creds.token,
|
||||||
|
creds.cookie
|
||||||
|
);
|
||||||
|
|
||||||
|
if (Array.isArray(devices.data)) {
|
||||||
|
devices = devices.data;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw 'Failed to parse response received from SD-WAN API. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (err) {
|
||||||
|
error_msg = err;
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
'devices': devices.map(function (device) {
|
||||||
|
obj = {
|
||||||
|
'name': device['host-name'],
|
||||||
|
'token': creds.token,
|
||||||
|
'cookie': creds.cookie,
|
||||||
|
'id': device['deviceId'],
|
||||||
|
'uuid': device['uuid'],
|
||||||
|
'type': device['device-type'],
|
||||||
|
'model': device['device-model'],
|
||||||
|
'ip': device['system-ip'],
|
||||||
|
'int_ip': device['local-system-ip'],
|
||||||
|
'cert_valid': device['certificate-validity']
|
||||||
|
};
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}),
|
||||||
|
'error': error_msg.toString()
|
||||||
|
});
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.authentication
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 172dd697ad7b4b5d907b8d30faef7c52
|
||||||
|
name: 'Get devices item errors'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.get.devices.errors
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Item for gathering all the data item errors.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.error
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: error
|
||||||
|
triggers:
|
||||||
|
- uuid: 9cfcfbb6b6264c19a831a71cc47483a9
|
||||||
|
expression: 'length(last(/Cisco SD-WAN by HTTP/sd_wan.get.devices.errors))>0'
|
||||||
|
name: 'Cisco SD-WAN: There are errors in the ''Get devices'' metric'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: eb1ffb2430c8450981f86174ac71456e
|
||||||
|
name: 'Invalid certificates'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.invalid_certificates
|
||||||
|
delay: '0'
|
||||||
|
description: 'Number of invalid certificates.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.devices[?(@.cert_valid != "Valid")].length()'
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 6ad73678b22346849ce5df9656e6edae
|
||||||
|
name: 'Total devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.total.devices
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of all devices.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.devices.length()
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: aee4253ce4e143ddad3d7776ebe72055
|
||||||
|
name: 'Number of vBond devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.vbond.devices
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of vBond devices.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.devices[?(@.type == "vbond")].length()'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 8e0b166d7cac435bb74fba811c5881af
|
||||||
|
name: 'Number of vEdge devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.vedge.devices
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of vEdge devices.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.devices[?(@.type == "vedge")].length()'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: e419f8b060af44b0ad6f52d5613b0973
|
||||||
|
name: 'Number of vManage devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.vmanage.devices
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of vManage devices.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.devices[?(@.type == "vmanage")].length()'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: 385cb04360ea4d34b2ae04c6879ec8fa
|
||||||
|
name: 'Number of vSmart devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.vsmart.devices
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of vSmart devices.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.devices[?(@.type == "vsmart")].length()'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 2e445f8991f842e09fc206ed3e392038
|
||||||
|
name: 'Devices discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: sd_wan.devices.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$SDWAN.DEVICE.NAME.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$SDWAN.DEVICE.NAME.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovering devices from Cisco SD-WAN API.'
|
||||||
|
host_prototypes:
|
||||||
|
- uuid: 8c53a2dded4a47cba1eb3398aff888d7
|
||||||
|
host: '{#UUID}'
|
||||||
|
name: '[{#TYPE}] {#NAME}'
|
||||||
|
inventory_mode: AUTOMATIC
|
||||||
|
group_links:
|
||||||
|
- group:
|
||||||
|
name: Applications
|
||||||
|
group_prototypes:
|
||||||
|
- name: 'Cisco SD-WAN/{#TYPE}'
|
||||||
|
templates:
|
||||||
|
- name: 'Cisco SD-WAN device by HTTP'
|
||||||
|
macros:
|
||||||
|
- macro: '{$SDWAN.AUTH.SESSION}'
|
||||||
|
value: '{#COOKIE}'
|
||||||
|
description: 'Cisco SD-WAN authentication session.'
|
||||||
|
- macro: '{$SDWAN.AUTH.TOKEN}'
|
||||||
|
value: '{#TOKEN}'
|
||||||
|
description: 'Cisco SD-WAN authentication token.'
|
||||||
|
- macro: '{$SDWAN.DEVICE_ID}'
|
||||||
|
value: '{#ID}'
|
||||||
|
description: 'ID of the device.'
|
||||||
|
tags:
|
||||||
|
- tag: model
|
||||||
|
value: '{#MODEL}'
|
||||||
|
custom_interfaces: 'YES'
|
||||||
|
interfaces:
|
||||||
|
- default: 'NO'
|
||||||
|
ip: '{#INT.IP}'
|
||||||
|
dns: internal.ip
|
||||||
|
- ip: '{#IP}'
|
||||||
|
dns: external.ip
|
||||||
|
master_item:
|
||||||
|
key: sd_wan.get.devices
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#COOKIE}'
|
||||||
|
path: $.cookie
|
||||||
|
- lld_macro: '{#ID}'
|
||||||
|
path: $.id
|
||||||
|
- lld_macro: '{#INT.IP}'
|
||||||
|
path: $.int_ip
|
||||||
|
- lld_macro: '{#IP}'
|
||||||
|
path: $.ip
|
||||||
|
- lld_macro: '{#MODEL}'
|
||||||
|
path: $.model
|
||||||
|
- lld_macro: '{#NAME}'
|
||||||
|
path: $.name
|
||||||
|
- lld_macro: '{#TOKEN}'
|
||||||
|
path: $.token
|
||||||
|
- lld_macro: '{#TYPE}'
|
||||||
|
path: $.type
|
||||||
|
- lld_macro: '{#UUID}'
|
||||||
|
path: $.uuid
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.devices
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: network
|
||||||
|
- tag: target
|
||||||
|
value: cisco-sdwan-monitor
|
||||||
|
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 "Cisco SD-WAN", e.g. {$HTTP.TLS.VERIFY:"Cisco SD-WAN"}.'
|
||||||
|
- macro: '{$SDWAN.API.PASSWORD}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Cisco SD-WAN Monitor API password.'
|
||||||
|
- macro: '{$SDWAN.API.URL}'
|
||||||
|
description: 'Cisco SD-WAN Monitor API URL.'
|
||||||
|
- macro: '{$SDWAN.API.USERNAME}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Cisco SD-WAN Monitor API username.'
|
||||||
|
- macro: '{$SDWAN.AUTH.FREQUENCY}'
|
||||||
|
value: 1h
|
||||||
|
description: 'The update interval for the Cisco SD-WAN Authentication item, which also equals the access token regeneration request frequency. Check the template documentation notes carefully for more details.'
|
||||||
|
- macro: '{$SDWAN.DATA.TIMEOUT}'
|
||||||
|
value: 15s
|
||||||
|
description: 'A response timeout for an API.'
|
||||||
|
- macro: '{$SDWAN.DEVICE.NAME.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'This macro is used in device discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$SDWAN.DEVICE.NAME.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'This macro is used in device discovery. Can be overridden on the host or linked template level.'
|
||||||
|
- macro: '{$SDWAN.HTTP_PROXY}'
|
||||||
|
description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. See the documentation at https://www.zabbix.com/documentation/7.0/manual/config/items/itemtypes/http'
|
||||||
|
dashboards:
|
||||||
|
- uuid: 63a5053a13114e90b104d189bea96254
|
||||||
|
name: 'SD-WAN: Overview'
|
||||||
|
pages:
|
||||||
|
- name: Main
|
||||||
|
widgets:
|
||||||
|
- type: item
|
||||||
|
name: 'Total devices'
|
||||||
|
width: '36'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cisco SD-WAN by HTTP'
|
||||||
|
key: sd_wan.total.devices
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'vManage devices'
|
||||||
|
'y': '4'
|
||||||
|
width: '36'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cisco SD-WAN by HTTP'
|
||||||
|
key: sd_wan.vmanage.devices
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'vSmart devices'
|
||||||
|
'y': '8'
|
||||||
|
width: '36'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cisco SD-WAN by HTTP'
|
||||||
|
key: sd_wan.vsmart.devices
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'Invalid certificates'
|
||||||
|
x: '36'
|
||||||
|
width: '36'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cisco SD-WAN by HTTP'
|
||||||
|
key: sd_wan.invalid_certificates
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'vBond devices'
|
||||||
|
x: '36'
|
||||||
|
'y': '4'
|
||||||
|
width: '36'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cisco SD-WAN by HTTP'
|
||||||
|
key: sd_wan.vbond.devices
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'vEdge devices'
|
||||||
|
x: '36'
|
||||||
|
'y': '8'
|
||||||
|
width: '36'
|
||||||
|
height: '4'
|
||||||
|
fields:
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cisco SD-WAN by HTTP'
|
||||||
|
key: sd_wan.vedge.devices
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,962 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: 08ef3d687d754b0aba17e1dcbd77d4bd
|
||||||
|
template: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare by HTTP'
|
||||||
|
description: |
|
||||||
|
The template to monitor Cloudflare to see your web traffic and DNS metrics.
|
||||||
|
It works without any external scripts and uses Script item.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-2
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: 2be79391779a4cd395723e62694262e8
|
||||||
|
name: 'Total bandwidth'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.bandwidth.all
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The volume of all data.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.bandwidth.all
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: bandwidth
|
||||||
|
- uuid: 7f5900d6c707405789624f84f502b042
|
||||||
|
name: 'Cached bandwidth'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.bandwidth.cached
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The volume of cached data.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.bandwidth.cached
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: bandwidth
|
||||||
|
- uuid: c5ab8cc281ff4f75bd4ada79d2c0d1e8
|
||||||
|
name: 'Cache hit ratio of bandwidth'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.bandwidth.cache_hit_ratio
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The ratio of the amount cached bandwidth to the bandwidth in percentage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.bandwidth.cache_hit_ratio
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: bandwidth
|
||||||
|
triggers:
|
||||||
|
- uuid: acf573785c394924aae8ef74b2683fd1
|
||||||
|
expression: 'max(/Cloudflare by HTTP/cloudflare.bandwidth.cache_hit_ratio,#3) < {$CLOUDFLARE.CACHED_BANDWIDTH.MIN.WARN}'
|
||||||
|
name: 'Cloudflare: Cached bandwidth is too low'
|
||||||
|
event_name: 'Cloudflare: Cached bandwidth is too low (less than {$CLOUDFLARE.CACHED_BANDWIDTH.MIN.WARN}% for 3 last measurements)'
|
||||||
|
opdata: 'Current value: {ITEM.LASTVALUE1}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 901db6b121c7473485c91b0f27e7cf50
|
||||||
|
name: 'SSL encrypted bandwidth'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.bandwidth.ssl.encrypted
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The volume of encrypted data.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.bandwidth.encrypted
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: bandwidth
|
||||||
|
- uuid: 4637d88e62204f9d8fb9fc0f179c5319
|
||||||
|
name: 'Unencrypted bandwidth'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.bandwidth.ssl.unencrypted
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The volume of unencrypted data.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.bandwidth.unencrypted
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: bandwidth
|
||||||
|
- uuid: 96e88a64df014997b8c675cbc4bb97a1
|
||||||
|
name: 'Uncached bandwidth'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.bandwidth.uncached
|
||||||
|
delay: '0'
|
||||||
|
units: B
|
||||||
|
description: 'The volume of uncached data.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.bandwidth.uncached
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: bandwidth
|
||||||
|
- uuid: 6eff62f2786d42a7925bd516a1c2a958
|
||||||
|
name: 'DNS queries'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.dns.query.all
|
||||||
|
delay: '0'
|
||||||
|
units: conn
|
||||||
|
description: 'The amount of all DNS queries.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.dns.query.all
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: dns
|
||||||
|
- uuid: 4612a834ef054740ba5fea529a08e220
|
||||||
|
name: 'Stale DNS queries'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.dns.query.stale
|
||||||
|
delay: '0'
|
||||||
|
units: conn
|
||||||
|
description: 'The number of stale DNS queries.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.dns.query.stale
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: dns
|
||||||
|
- uuid: 4aeb289b631a402390a833e3c5227d38
|
||||||
|
name: 'Uncached DNS queries'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.dns.query.uncached
|
||||||
|
delay: '0'
|
||||||
|
units: conn
|
||||||
|
description: 'The number of uncached DNS queries.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.dns.query.uncached
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: dns
|
||||||
|
- uuid: 9450a68208fd4cb8bde009296d722064
|
||||||
|
name: 'Get data'
|
||||||
|
type: SCRIPT
|
||||||
|
key: cloudflare.get
|
||||||
|
delay: 0;m01
|
||||||
|
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 Cloudflare = {
|
||||||
|
params: {},
|
||||||
|
|
||||||
|
setParams: function (params) {
|
||||||
|
['api_endpoint', 'token', 'zone'].forEach(function (field) {
|
||||||
|
if (typeof params !== 'object' || typeof params[field] === 'undefined'
|
||||||
|
|| params[field] === '') {
|
||||||
|
throw 'Required param is not set: "' + field + '".';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Cloudflare.params = params;
|
||||||
|
if (typeof Cloudflare.params.api_endpoint === 'string') {
|
||||||
|
if (!Cloudflare.params.api_endpoint.endsWith('/')) {
|
||||||
|
Cloudflare.params.api_endpoint += '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Cloudflare.tls = new CTlsConfig(params.tls_verify);
|
||||||
|
Cloudflare.tls.checkURL(Cloudflare.params.api_endpoint);
|
||||||
|
},
|
||||||
|
|
||||||
|
request: function (method, query, data) {
|
||||||
|
var response,
|
||||||
|
request = new HttpRequest(Cloudflare.tls.options),
|
||||||
|
url = Cloudflare.params.api_endpoint + query;
|
||||||
|
|
||||||
|
request.addHeader('Content-Type: application/json');
|
||||||
|
request.addHeader('Authorization: Bearer ' + Cloudflare.params.token);
|
||||||
|
|
||||||
|
if (typeof data !== 'undefined') {
|
||||||
|
data = JSON.stringify(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
Zabbix.log(4, '[ Cloudflare ] Sending request: ' + url + ((typeof data === 'string') ? ('\n' + data) : ''));
|
||||||
|
|
||||||
|
switch (method) {
|
||||||
|
case 'get':
|
||||||
|
response = request.get(url, data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'post':
|
||||||
|
response = request.post(url, data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw 'Unsupported HTTP request method: ' + method;
|
||||||
|
}
|
||||||
|
|
||||||
|
Zabbix.log(4, '[ Cloudflare ] Received response with status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() < 200 || request.getStatus() >= 300) {
|
||||||
|
throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response !== null) {
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from Cloudflare. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (query === 'graphql/' && request.getStatus() == 200 && typeof response.errors !== 'undefined'
|
||||||
|
&& Array.isArray(response.errors)) {
|
||||||
|
throw 'Request failed with error "' + (getField(response, 'errors.0.message') || 'unknown') + '"';
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
status: request.getStatus(),
|
||||||
|
response: response
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getField(object, field, def) {
|
||||||
|
var names = field.split('.');
|
||||||
|
var name = names.shift();
|
||||||
|
|
||||||
|
while (typeof name !== 'undefined') {
|
||||||
|
if (typeof object === undefined || typeof object[name] === 'undefined') {
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
|
||||||
|
object = object[name];
|
||||||
|
name = names.shift();
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Cloudflare.setParams(JSON.parse(value));
|
||||||
|
|
||||||
|
var datetime_end = new Date(),
|
||||||
|
datetime_start = new Date();
|
||||||
|
|
||||||
|
datetime_start.setTime(datetime_end.getTime() - 3600000);
|
||||||
|
datetime_start.setMinutes(0, 0, 0);
|
||||||
|
datetime_end.setTime(datetime_start.getTime());
|
||||||
|
datetime_end.setMinutes(59, 59, 0);
|
||||||
|
|
||||||
|
var datetime_start_str = datetime_start.toISOString(),
|
||||||
|
datetime_end_str = datetime_end.toISOString();
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
"query": "{viewer {zones(filter: {zoneTag: \"" + Cloudflare.params.zone + "\"}) {\
|
||||||
|
httpRequests1hGroups(limit: 100 filter: {\
|
||||||
|
datetime_geq: \"" + datetime_start_str + "\", datetime_leq: \"" + datetime_end_str + "\"\
|
||||||
|
}) {\
|
||||||
|
sum{\
|
||||||
|
requests \
|
||||||
|
cachedRequests \
|
||||||
|
encryptedRequests \
|
||||||
|
responseStatusMap{ requests edgeResponseStatus } \
|
||||||
|
bytes \
|
||||||
|
cachedBytes \
|
||||||
|
encryptedBytes \
|
||||||
|
threats \
|
||||||
|
pageViews \
|
||||||
|
}\
|
||||||
|
uniq{uniques}\
|
||||||
|
}\
|
||||||
|
}}}", "variables": {}
|
||||||
|
}
|
||||||
|
var result = Cloudflare.request('post', 'graphql/', data),
|
||||||
|
cloudflare = {},
|
||||||
|
res = getField(result.response, 'data.viewer.zones.0.httpRequests1hGroups.0.sum');
|
||||||
|
|
||||||
|
if (typeof res === 'object') {
|
||||||
|
cloudflare = {
|
||||||
|
requests: {
|
||||||
|
all: res.requests || 0,
|
||||||
|
cached: res.cachedRequests || 0,
|
||||||
|
encrypted: res.encryptedRequests || 0,
|
||||||
|
cache_hit_ratio: 0,
|
||||||
|
success_ratio: 0,
|
||||||
|
others_ratio: 0,
|
||||||
|
response_100: 0,
|
||||||
|
response_200: 0,
|
||||||
|
response_300: 0,
|
||||||
|
response_400: 0,
|
||||||
|
response_500: 0
|
||||||
|
},
|
||||||
|
bandwidth: {
|
||||||
|
all: res.bytes || 0,
|
||||||
|
cached: res.cachedBytes || 0,
|
||||||
|
cache_hit_ratio: 0,
|
||||||
|
encrypted: res.encryptedBytes || 0,
|
||||||
|
},
|
||||||
|
threats: {
|
||||||
|
all: res.threats || 0
|
||||||
|
},
|
||||||
|
pageviews: {
|
||||||
|
all: res.pageViews || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cloudflare.requests.uncached = res.requests - res.cachedRequests;
|
||||||
|
cloudflare.requests.unencrypted = cloudflare.requests.all - cloudflare.requests.encrypted;
|
||||||
|
cloudflare.bandwidth.uncached = cloudflare.bandwidth.all - cloudflare.bandwidth.cached;
|
||||||
|
cloudflare.bandwidth.unencrypted = cloudflare.bandwidth.all - cloudflare.bandwidth.encrypted;
|
||||||
|
|
||||||
|
if (Array.isArray(res.responseStatusMap)) {
|
||||||
|
res.responseStatusMap.forEach(function (element) {
|
||||||
|
var group = Math.floor((element.edgeResponseStatus / 100)) * 100;
|
||||||
|
cloudflare.requests['response_' + group] += element.requests;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cloudflare.requests.all > 0) {
|
||||||
|
cloudflare.requests.success_ratio = (cloudflare.requests.response_200
|
||||||
|
/ cloudflare.requests.all * 100).toFixed(2);
|
||||||
|
cloudflare.requests.others_ratio = ((cloudflare.requests.all - cloudflare.requests.response_200)
|
||||||
|
/ cloudflare.requests.all * 100).toFixed(2);
|
||||||
|
cloudflare.requests.cache_hit_ratio = (cloudflare.requests.cached
|
||||||
|
/ cloudflare.requests.all * 100).toFixed(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cloudflare.bandwidth.all > 0) {
|
||||||
|
cloudflare.bandwidth.cache_hit_ratio = (cloudflare.bandwidth.cached / cloudflare.bandwidth.all * 100).toFixed(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = getField(result.response, 'data.viewer.zones.0.httpRequests1hGroups.0.uniq');
|
||||||
|
|
||||||
|
if (typeof res === 'object') {
|
||||||
|
cloudflare.uniques = {
|
||||||
|
all: res.uniques || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result = Cloudflare.request('get', 'zones/' + encodeURIComponent(Cloudflare.params.zone)
|
||||||
|
+ '/dns_analytics/report?dimensions=queryName&metrics=queryCount,uncachedCount,staleCount&since='
|
||||||
|
+ encodeURIComponent(datetime_start_str) + '&until=' + encodeURIComponent(datetime_end_str));
|
||||||
|
|
||||||
|
res = getField(result.response, 'result.totals');
|
||||||
|
|
||||||
|
if (typeof result.response.result === 'object') {
|
||||||
|
cloudflare.dns = {
|
||||||
|
query: {
|
||||||
|
all: res.queryCount || 0,
|
||||||
|
uncached: res.uncachedCount || 0,
|
||||||
|
stale: res.staleCount || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify(cloudflare);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
error += (String(error).endsWith('.')) ? '' : '.';
|
||||||
|
Zabbix.log(3, '[ Cloudflare ] ERROR: ' + error);
|
||||||
|
throw 'Requesting failed: ' + error;
|
||||||
|
}
|
||||||
|
description: 'The JSON with result of Cloudflare API request.'
|
||||||
|
parameters:
|
||||||
|
- name: api_endpoint
|
||||||
|
value: '{$CLOUDFLARE.API.URL}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"Cloudflare"}'
|
||||||
|
- name: token
|
||||||
|
value: '{$CLOUDFLARE.API.TOKEN}'
|
||||||
|
- name: zone
|
||||||
|
value: '{$CLOUDFLARE.ZONE_ID}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 71efacd9f1dc46a7aa29876c8bf7906c
|
||||||
|
name: 'Total page views'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.pageviews.all
|
||||||
|
delay: '0'
|
||||||
|
units: pg
|
||||||
|
description: 'The amount of all pageviews.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.pageviews.all
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: pageviews
|
||||||
|
- uuid: d4a7431b1f6a4d3ab11551a36c98fbf7
|
||||||
|
name: 'Total requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.all
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The amount of all requests.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.all
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: cc9d651cdec94afeb12ead87b3c3e8f3
|
||||||
|
name: 'Cached requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.cached
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.cached
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: e1c2a1280d25439f8020b3ebc451d892
|
||||||
|
name: 'Cache hit ratio % over time'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.cache_hit_ratio
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The ratio of the amount cached requests to all requests in percentage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.cache_hit_ratio
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 228912bdae724d70b1abe79510b69082
|
||||||
|
name: 'Non-2xx responses ratio'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.others_ratio
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The ratio of the amount requests with non-2xx response codes to all requests in percentage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.others_ratio
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
triggers:
|
||||||
|
- uuid: e76f4a61dd094419b6e0af706758e545
|
||||||
|
expression: 'min(/Cloudflare by HTTP/cloudflare.requests.others_ratio,#3) > {$CLOUDFLARE.ERRORS.MAX.WARN}'
|
||||||
|
name: 'Cloudflare: Ratio of non-2xx responses is too high'
|
||||||
|
event_name: 'Cloudflare: Ratio of non-2xx responses is too high (more than {$CLOUDFLARE.ERRORS.MAX.WARN}% for 3 last measurements)'
|
||||||
|
opdata: 'Current value: {ITEM.LASTVALUE1}'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'A large number of errors can indicate a malfunction of the site.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: performance
|
||||||
|
- uuid: 0f427419265a4ef09f052a03c539125d
|
||||||
|
name: 'Response codes 1xx'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.response_100
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number requests with 1xx response codes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.response_100
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 3ade3e726d314382a3e841b3d5cb5834
|
||||||
|
name: 'Response codes 2xx'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.response_200
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number requests with 2xx response codes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.response_200
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 2caff86e7ca5400889f3b2bd4b6ba986
|
||||||
|
name: 'Response codes 3xx'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.response_300
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number requests with 3xx response codes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.response_300
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: b3510ec2adc74e10824365012c13250f
|
||||||
|
name: 'Response codes 4xx'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.response_400
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number requests with 4xx response codes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.response_400
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 714ef2cbecbe4a93b20988a0bc6863a7
|
||||||
|
name: 'Response codes 5xx'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.response_500
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number requests with 5xx response codes.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.response_500
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: d39fcd4fdc594257bea91de0890d326b
|
||||||
|
name: 'SSL encrypted requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.ssl.encrypted
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number of encrypted requests.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.encrypted
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: acbbc431dfc3431583123380edb6da38
|
||||||
|
name: 'Unencrypted requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.ssl.unencrypted
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number of unencrypted requests.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.unencrypted
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 6100ff50001543ae83e84ab2c47260f3
|
||||||
|
name: '2xx responses ratio'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.success_ratio
|
||||||
|
delay: '0'
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: 'The ratio of the amount requests with 2xx response codes to all requests in percentage.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.success_ratio
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 7907f68e795b40fca1bd520556ea1fff
|
||||||
|
name: 'Uncached requests'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.requests.uncached
|
||||||
|
delay: '0'
|
||||||
|
units: req
|
||||||
|
description: 'The number of uncached requests.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.requests.uncached
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: requests
|
||||||
|
- uuid: 328051a78529494e943edda567aa0e24
|
||||||
|
name: 'Total threats'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.threats.all
|
||||||
|
delay: '0'
|
||||||
|
description: 'The number of all threats.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.threats.all
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: threats
|
||||||
|
- uuid: d1a2ec213b084701805f3f974af25a21
|
||||||
|
name: 'Unique visitors'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cloudflare.uniques.all
|
||||||
|
delay: '0'
|
||||||
|
units: conn
|
||||||
|
description: 'The number of all visitors IPs.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.uniques.all
|
||||||
|
master_item:
|
||||||
|
key: cloudflare.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: uniques
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: service
|
||||||
|
- tag: target
|
||||||
|
value: cloudflare
|
||||||
|
macros:
|
||||||
|
- macro: '{$CLOUDFLARE.API.TOKEN}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Your Cloudflare API Token.'
|
||||||
|
- macro: '{$CLOUDFLARE.API.URL}'
|
||||||
|
value: 'https://api.cloudflare.com/client/v4'
|
||||||
|
description: 'The URL of Cloudflare API endpoint.'
|
||||||
|
- macro: '{$CLOUDFLARE.CACHED_BANDWIDTH.MIN.WARN}'
|
||||||
|
value: '50'
|
||||||
|
description: 'Minimum of cached bandwidth in %.'
|
||||||
|
- macro: '{$CLOUDFLARE.ERRORS.MAX.WARN}'
|
||||||
|
value: '30'
|
||||||
|
description: 'Maximum responses with errors in %.'
|
||||||
|
- macro: '{$CLOUDFLARE.ZONE_ID}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'Your Cloudflare Site Zone ID.'
|
||||||
|
- macro: '{$HTTP.TLS.VERIFY}'
|
||||||
|
value: full
|
||||||
|
description: 'TLS certificate verification for the script item: "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 "Cloudflare", e.g. {$HTTP.TLS.VERIFY:"Cloudflare"}.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: 51f1013e8a3d492faed27fe80b68fc53
|
||||||
|
name: Overview
|
||||||
|
pages:
|
||||||
|
- widgets:
|
||||||
|
- type: graph
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: Bandwidth'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: graph
|
||||||
|
'y': '5'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: DNS requests'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAC
|
||||||
|
- type: graph
|
||||||
|
'y': '10'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: HTTP responses ratio over time'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAE
|
||||||
|
- type: graph
|
||||||
|
'y': '15'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: HTTP response codes over time'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAG
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: Web requests'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
'y': '5'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: Caching'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAD
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
'y': '10'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
name: 'Cloudflare: IPs and threats'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAF
|
||||||
|
graphs:
|
||||||
|
- uuid: 09e113216680490c9dd15805474bcac7
|
||||||
|
name: 'Cloudflare: Bandwidth'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.bandwidth.all
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.bandwidth.cached
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.bandwidth.uncached
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.bandwidth.ssl.encrypted
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.bandwidth.ssl.unencrypted
|
||||||
|
- uuid: ed4ef5ce4a6a4c5692c22079d8879e0e
|
||||||
|
name: 'Cloudflare: Caching'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.cache_hit_ratio
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.bandwidth.cache_hit_ratio
|
||||||
|
- uuid: 25df26cece41403d864f1ced5901bffa
|
||||||
|
name: 'Cloudflare: DNS requests'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.dns.query.all
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.dns.query.stale
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.dns.query.uncached
|
||||||
|
- uuid: 3fb3b089a115420bbc051c14fcd2f3aa
|
||||||
|
name: 'Cloudflare: HTTP response codes over time'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.response_100
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.response_200
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.response_300
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.response_400
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.response_500
|
||||||
|
- uuid: c9e1708427a84182a406faec327bb6f1
|
||||||
|
name: 'Cloudflare: HTTP responses ratio over time'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.others_ratio
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.success_ratio
|
||||||
|
- uuid: 6a0da78eec23423ab084a0760f1691be
|
||||||
|
name: 'Cloudflare: IPs and threats'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.threats.all
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.uniques.all
|
||||||
|
- uuid: 659df99629a341449c77baf7a9b99b77
|
||||||
|
name: 'Cloudflare: Web requests'
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.all
|
||||||
|
- sortorder: '1'
|
||||||
|
color: F63100
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.cached
|
||||||
|
- sortorder: '2'
|
||||||
|
color: 00611C
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.uncached
|
||||||
|
- sortorder: '3'
|
||||||
|
color: F7941D
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.ssl.encrypted
|
||||||
|
- sortorder: '4'
|
||||||
|
color: FC6EA3
|
||||||
|
item:
|
||||||
|
host: 'Cloudflare by HTTP'
|
||||||
|
key: cloudflare.requests.ssl.unencrypted
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,439 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
host_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Applications
|
||||||
|
templates:
|
||||||
|
- uuid: 24b64f6d22b446dabecc86ee3f199004
|
||||||
|
template: 'Control-M enterprise manager by HTTP'
|
||||||
|
name: 'Control-M enterprise manager by HTTP'
|
||||||
|
description: |
|
||||||
|
This template is designed to get metrics from the Control-M Enterprise Manager using the Control-M Automation API with HTTP agent.
|
||||||
|
|
||||||
|
This template monitors active Service Level Agreement (SLA) services, discovers Control-M servers using Low Level Discovery and also creates host prototypes for them in conjunction with the `Control-M server by HTTP` template.
|
||||||
|
|
||||||
|
To use this template, macros `{$API.TOKEN}` and `{$API.URI.ENDPOINT}` need to be set.
|
||||||
|
|
||||||
|
> See [Zabbix template operation](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box/http) for basic instructions.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: 7d9ed576aeb045798b78414c89f3e597
|
||||||
|
name: 'Get Control-M servers'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: controlm.servers
|
||||||
|
delay: 10m
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets a list of servers.'
|
||||||
|
url: '{$API.URI.ENDPOINT}/config/servers'
|
||||||
|
headers:
|
||||||
|
- name: x-api-key
|
||||||
|
value: '{$API.TOKEN}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 2bd2c27b8dc74656a00f6d2006399388
|
||||||
|
name: 'Get SLA services'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: controlm.services
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets all the SLA active services.'
|
||||||
|
url: '{$API.URI.ENDPOINT}/run/services/sla'
|
||||||
|
headers:
|
||||||
|
- name: x-api-key
|
||||||
|
value: '{$API.TOKEN}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 388824178c264d51be116a693c2640de
|
||||||
|
name: 'Server discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.server.discovery
|
||||||
|
delay: '0'
|
||||||
|
description: 'Discovers the Control-M servers.'
|
||||||
|
host_prototypes:
|
||||||
|
- uuid: 1ade45fcbb9e407ca32542564b12f2b1
|
||||||
|
host: '{#SERVER.NAME}'
|
||||||
|
name: 'Control-M server [{#SERVER.NAME}]'
|
||||||
|
group_links:
|
||||||
|
- group:
|
||||||
|
name: Applications
|
||||||
|
group_prototypes:
|
||||||
|
- name: 'Control-M/{#SERVER.NAME}'
|
||||||
|
templates:
|
||||||
|
- name: 'Control-M server by HTTP'
|
||||||
|
macros:
|
||||||
|
- macro: '{$SERVER.NAME}'
|
||||||
|
value: '{#SERVER.NAME}'
|
||||||
|
master_item:
|
||||||
|
key: controlm.servers
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#SERVER.NAME}'
|
||||||
|
path: $.name
|
||||||
|
preprocessing:
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 2h
|
||||||
|
- uuid: 567e5e0553c84ce2a9200d14dfc76593
|
||||||
|
name: 'SLA services discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.services.discovery
|
||||||
|
delay: '0'
|
||||||
|
lifetime: 1d
|
||||||
|
description: 'Discovers the SLA services in the Control-M environment.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: 9daecffe0dfd402fb7300d484c2e9b80
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''completed'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',completed]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `completed`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.completed
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-completed
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
- uuid: 27821e573ead422b830b4f9dba5c840f
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''error'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',error]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `error`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.error
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-error
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: c66f281b78e64c1c9c96ade1450eadbb
|
||||||
|
expression: 'last(/Control-M enterprise manager by HTTP/service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',error],#1)>0'
|
||||||
|
name: 'Control-M: Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs in ''error'' state'
|
||||||
|
opdata: 'Trigger value ''{ITEM.VALUE}'', Current value ''{ITEM.LASTVALUE}'''
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'There are services present which are in the state - `error`.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: fe58d60475bd49f2a4e3f0bfc5ae020f
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''executed'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',executed]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `executed`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.executed
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-executed
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
- uuid: 2843e6ba50584b27a66165f0accc5ed5
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''waitCondition'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitCondition]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `waitCondition`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.waitCondition
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-wait_condition
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
- uuid: 409961fd6fed4f208340dfdb978a2430
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''waitHost'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitHost]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `waitHost`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.waitHost
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-wait_host
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
- uuid: 6ae1bd92bd39446fbbea847088cd37e7
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''waitResource'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitResource]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `waitResource`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.waitResource
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-wait-resource
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
- uuid: 0299415dfbca4ba6881a890bb9e9658c
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs ''waitWorkload'''
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitWorkload]'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of jobs in the state - `waitWorkload`.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statusByJobs.waitWorkload
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-stats
|
||||||
|
- tag: service-metric
|
||||||
|
value: jobs-wait_workload
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
- uuid: 72516fca80024f9884efb7dd652f957e
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: stats'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the service statistics.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.activeServices.[?(@.serviceName == ''{#SERVICE.NAME}'')]'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@.serviceJob == ''{#SERVICE.JOB}'')].first()'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: controlm.services
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: a3f556bfb8d04a70b0c7407cdc458703
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: status'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'service.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the service status.'
|
||||||
|
valuemap:
|
||||||
|
name: 'Control-M service status'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.status
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
const idx = [
|
||||||
|
'Not Ok',
|
||||||
|
'Ok',
|
||||||
|
'Completed Ok',
|
||||||
|
'Ended Late'
|
||||||
|
].indexOf(value);
|
||||||
|
return idx !== -1 ? idx : 10;
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'service.stats[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: service
|
||||||
|
- tag: service-metric
|
||||||
|
value: status
|
||||||
|
- tag: service-name
|
||||||
|
value: '{#SERVICE.NAME}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: e032410a5384441989538ff6781ef848
|
||||||
|
expression: |
|
||||||
|
last(/Control-M enterprise manager by HTTP/service.status['{#SERVICE.NAME}','{#SERVICE.JOB}'],#1)=0 or
|
||||||
|
last(/Control-M enterprise manager by HTTP/service.status['{#SERVICE.NAME}','{#SERVICE.JOB}'],#1)=10
|
||||||
|
name: 'Control-M: Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: status [{ITEM.VALUE}]'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'The service has encountered an issue.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: f64b017b0cf9456eb0afdf908cf2258e
|
||||||
|
expression: 'last(/Control-M enterprise manager by HTTP/service.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}''],#1)=3'
|
||||||
|
name: 'Control-M: Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: status [{ITEM.VALUE}]'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'The service has finished its job late.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
graph_prototypes:
|
||||||
|
- uuid: 53190fc52e094018926ca5351198aace
|
||||||
|
name: 'Service [{#SERVICE.NAME}, {#SERVICE.JOB}]: jobs statuses'
|
||||||
|
graph_items:
|
||||||
|
- drawtype: DASHED_LINE
|
||||||
|
color: 29235c
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',executed]'
|
||||||
|
- sortorder: '1'
|
||||||
|
drawtype: DASHED_LINE
|
||||||
|
color: 7e286e
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitCondition]'
|
||||||
|
- sortorder: '2'
|
||||||
|
drawtype: DASHED_LINE
|
||||||
|
color: c73464
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitResource]'
|
||||||
|
- sortorder: '3'
|
||||||
|
drawtype: DASHED_LINE
|
||||||
|
color: f66343
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitHost]'
|
||||||
|
- sortorder: '4'
|
||||||
|
drawtype: DASHED_LINE
|
||||||
|
color: ffa600
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',waitWorkload]'
|
||||||
|
- sortorder: '5'
|
||||||
|
color: 00FF00
|
||||||
|
yaxisside: RIGHT
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',completed]'
|
||||||
|
- sortorder: '6'
|
||||||
|
color: FF0000
|
||||||
|
item:
|
||||||
|
host: 'Control-M enterprise manager by HTTP'
|
||||||
|
key: 'service.jobs.status[''{#SERVICE.NAME}'',''{#SERVICE.JOB}'',error]'
|
||||||
|
master_item:
|
||||||
|
key: controlm.services
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#SERVICE.JOB}'
|
||||||
|
path: $.serviceJob
|
||||||
|
- lld_macro: '{#SERVICE.NAME}'
|
||||||
|
path: $.serviceName
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.activeServices
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '[]'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: controlm
|
||||||
|
macros:
|
||||||
|
- macro: '{$API.TOKEN}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'A token to use for API connections.'
|
||||||
|
- macro: '{$API.URI.ENDPOINT}'
|
||||||
|
value: '<set the api uri endpoint here>'
|
||||||
|
description: 'The API endpoint is a URI - for example, `https://monitored.controlm.instance:8443/automation-api`.'
|
||||||
|
valuemaps:
|
||||||
|
- uuid: 54213ae65be64878988c9145d8ae86e4
|
||||||
|
name: 'Control-M service status'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: 'Not Ok'
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Ok
|
||||||
|
- value: '2'
|
||||||
|
newvalue: 'Completed Ok'
|
||||||
|
- value: '3'
|
||||||
|
newvalue: 'Ended Late'
|
||||||
|
- value: '10'
|
||||||
|
newvalue: Unknown
|
||||||
@@ -0,0 +1,723 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
||||||
|
name: Templates/Applications
|
||||||
|
templates:
|
||||||
|
- uuid: c077d6c381904e94a4df88136588b551
|
||||||
|
template: 'Control-M server by HTTP'
|
||||||
|
name: 'Control-M server by HTTP'
|
||||||
|
description: |
|
||||||
|
This template is designed to get metrics from the Control-M server using the Control-M Automation API with HTTP agent.
|
||||||
|
|
||||||
|
This template monitors server statistics, discovers jobs and agents using Low Level Discovery.
|
||||||
|
|
||||||
|
To use this template, macros `{$API.TOKEN}`, `{$API.URI.ENDPOINT}`, and `{$SERVER.NAME}` need to be set.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: Templates/Applications
|
||||||
|
items:
|
||||||
|
- uuid: 94e45567531543119d6e36b4463684c7
|
||||||
|
name: 'Get agents'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: controlm.agents
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets agents for the server.'
|
||||||
|
url: '{$API.URI.ENDPOINT}/config/server/{$SERVER.NAME}/agents'
|
||||||
|
headers:
|
||||||
|
- name: x-api-key
|
||||||
|
value: '{$API.TOKEN}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 1f60be3e3fe543d697047ffcad7b0a7f
|
||||||
|
name: 'Get jobs'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: controlm.jobs
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the status of jobs.'
|
||||||
|
url: '{$API.URI.ENDPOINT}/run/jobs/status'
|
||||||
|
query_fields:
|
||||||
|
- name: ctm
|
||||||
|
value: '{$SERVER.NAME}'
|
||||||
|
headers:
|
||||||
|
- name: x-api-key
|
||||||
|
value: '{$API.TOKEN}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 7ae147724e374857a9a28b604e7af014
|
||||||
|
name: 'Jobs statistics'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.jobs.statistics
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the statistics of jobs.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[''returned'', ''total'']'
|
||||||
|
master_item:
|
||||||
|
key: controlm.jobs
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: aa085872149047f681f974e672e0c72c
|
||||||
|
name: 'Jobs returned'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.jobs.statistics.returned
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the count of returned jobs.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[0]'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: controlm.jobs.statistics
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: job
|
||||||
|
- uuid: 8219b115bd5246b6bbb38c7a3b74dfaa
|
||||||
|
name: 'Jobs total'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.jobs.statistics.total
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the count of total jobs.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[1]'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: controlm.jobs.statistics
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: job
|
||||||
|
- uuid: 67ca527f452b43aab2e3171e49f96194
|
||||||
|
name: 'Get Control-M server stats'
|
||||||
|
type: HTTP_AGENT
|
||||||
|
key: controlm.server.stats
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the statistics of the server.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.[?(@.name == ''{$SERVER.NAME}'')].first()'
|
||||||
|
error_handler: CUSTOM_ERROR
|
||||||
|
error_handler_params: 'Could not get server stats.'
|
||||||
|
url: '{$API.URI.ENDPOINT}/config/servers'
|
||||||
|
headers:
|
||||||
|
- name: x-api-key
|
||||||
|
value: '{$API.TOKEN}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 101afc0212e9410b8954bd1c939aea99
|
||||||
|
name: 'Server message'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: server.message
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the metric of the server message.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.message
|
||||||
|
error_handler: CUSTOM_ERROR
|
||||||
|
error_handler_params: 'Could not get server message.'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: controlm.server.stats
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: server
|
||||||
|
triggers:
|
||||||
|
- uuid: 406307967abf4218bebd9428dd8ecb8b
|
||||||
|
expression: 'last(/Control-M server by HTTP/server.message,#1)="Disconnected"'
|
||||||
|
name: 'Control-M: Server disconnected'
|
||||||
|
opdata: 'Triggered message: {ITEM.VALUE}, Current message: {ITEM.LASTVALUE1}'
|
||||||
|
priority: HIGH
|
||||||
|
description: 'The server is disconnected.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1d7387fe4cd7462c81daa529b58d0e34
|
||||||
|
expression: |
|
||||||
|
last(/Control-M server by HTTP/server.message,#1)<>"Connected" and
|
||||||
|
last(/Control-M server by HTTP/server.message,#1)<>"Disconnected" and
|
||||||
|
last(/Control-M server by HTTP/server.message,#1)<>""
|
||||||
|
name: 'Control-M: Server error'
|
||||||
|
opdata: 'Triggered message: {ITEM.VALUE}, Current message: {ITEM.LASTVALUE1}'
|
||||||
|
priority: HIGH
|
||||||
|
description: 'The server has encountered an error.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: b37f0aa295be421ab5e7262135930fcd
|
||||||
|
name: 'Server state'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: server.state
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the metric of the server state.'
|
||||||
|
valuemap:
|
||||||
|
name: 'Control-M server status'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.state
|
||||||
|
error_handler: CUSTOM_ERROR
|
||||||
|
error_handler_params: 'Could not get server state.'
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
const idx = [
|
||||||
|
'Down',
|
||||||
|
'Up',
|
||||||
|
].indexOf(value);
|
||||||
|
return idx !== -1 ? idx : 10;
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: controlm.server.stats
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: server
|
||||||
|
triggers:
|
||||||
|
- uuid: d9f5b1f636ec477c932159fd1c5baf16
|
||||||
|
expression: |
|
||||||
|
last(/Control-M server by HTTP/server.state)=0 or
|
||||||
|
last(/Control-M server by HTTP/server.state)=10
|
||||||
|
name: 'Control-M: Server is down'
|
||||||
|
opdata: 'Current state: {ITEM.LASTVALUE1}'
|
||||||
|
priority: HIGH
|
||||||
|
description: 'The server is down.'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 2c7ba283ea2d4f2d91d0fa7d33551501
|
||||||
|
name: 'Server version'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: server.version
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the metric of the server version.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.version
|
||||||
|
error_handler: CUSTOM_ERROR
|
||||||
|
error_handler_params: 'Could not get server version.'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: controlm.server.stats
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: server
|
||||||
|
triggers:
|
||||||
|
- uuid: 14cdf1016ab24e5c8b03626fac5af263
|
||||||
|
expression: |
|
||||||
|
last(/Control-M server by HTTP/server.version,#1)<>last(/Control-M server by HTTP/server.version,#2) and
|
||||||
|
length(last(/Control-M server by HTTP/server.version))>0
|
||||||
|
recovery_mode: NONE
|
||||||
|
name: 'Control-M: Server version has changed'
|
||||||
|
opdata: 'Old version: {ITEM.VALUE}, Current version: {ITEM.LASTVALUE1}'
|
||||||
|
priority: INFO
|
||||||
|
description: 'The server version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: 8d44e49d41d1469ba0ad6ad356b056f4
|
||||||
|
name: 'Agent discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.agent.discovery
|
||||||
|
delay: '0'
|
||||||
|
description: 'Discovers agents on the server.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: b451e6ac1f7a4b819714ee69c4833190
|
||||||
|
name: 'Agent [{#AGENT.NAME}]: stats'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'agent.stats[''{#AGENT.NAME}'']'
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the statistics of an agent.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.agents.[?(@.nodeid == ''{#AGENT.NAME}'')].first()'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: controlm.agents
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: f72163e7e68d4bb4b2b8fcf3b9afd730
|
||||||
|
name: 'Agent [{#AGENT.NAME}]: status'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'agent.status[''{#AGENT.NAME}'']'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the status of an agent.'
|
||||||
|
valuemap:
|
||||||
|
name: 'Control-M agent status'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.status
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
const idx = [
|
||||||
|
'Available',
|
||||||
|
'Unavailable',
|
||||||
|
'Disabled',
|
||||||
|
'Disable',
|
||||||
|
'Discovering',
|
||||||
|
].indexOf(value);
|
||||||
|
return idx !== -1 ? idx : 10;
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'agent.stats[''{#AGENT.NAME}'']'
|
||||||
|
tags:
|
||||||
|
- tag: agent-metric
|
||||||
|
value: status
|
||||||
|
- tag: agent-name
|
||||||
|
value: '{#AGENT.NAME}'
|
||||||
|
- tag: component
|
||||||
|
value: agent
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 22e12e397ad942889895590c28ce3d75
|
||||||
|
expression: |
|
||||||
|
last(/Control-M server by HTTP/agent.status['{#AGENT.NAME}'],#1)=1 or
|
||||||
|
last(/Control-M server by HTTP/agent.status['{#AGENT.NAME}'],#1)=10
|
||||||
|
name: 'Control-M: Agent [{#AGENT.NAME}]: status [{ITEM.VALUE}]'
|
||||||
|
priority: AVERAGE
|
||||||
|
description: 'The agent has encountered an issue.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: d7cb3729522c4e5bab9eec4341bbab08
|
||||||
|
expression: |
|
||||||
|
last(/Control-M server by HTTP/agent.status['{#AGENT.NAME}'],#1)=2 or
|
||||||
|
last(/Control-M server by HTTP/agent.status['{#AGENT.NAME}'],#1)=3
|
||||||
|
name: 'Control-M: Agent [{#AGENT.NAME}}: status disabled'
|
||||||
|
priority: INFO
|
||||||
|
description: 'The agent is disabled.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 98e355d74fe9449eaf28272765865434
|
||||||
|
name: 'Agent [{#AGENT.NAME}]: version'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'agent.version[''{#AGENT.NAME}'']'
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the version number of an agent.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.version
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: Unknown
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'agent.stats[''{#AGENT.NAME}'']'
|
||||||
|
tags:
|
||||||
|
- tag: agent-metric
|
||||||
|
value: version
|
||||||
|
- tag: agent-name
|
||||||
|
value: '{#AGENT.NAME}'
|
||||||
|
- tag: component
|
||||||
|
value: agent
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: 7c494429411b4ede997a7881e52d9b46
|
||||||
|
expression: 'last(/Control-M server by HTTP/agent.version[''{#AGENT.NAME}''],#1)="Unknown"'
|
||||||
|
name: 'Control-M: Agent [{#AGENT.NAME}]: unknown version'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'The agent version is unknown.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: e67a46b5c61c43e6b42a966f3d68a581
|
||||||
|
expression: 'last(/Control-M server by HTTP/agent.version[''{#AGENT.NAME}''],#1)<>last(/Control-M server by HTTP/agent.version[''{#AGENT.NAME}''],#2)'
|
||||||
|
recovery_mode: NONE
|
||||||
|
name: 'Control-M: Agent [{#AGENT.NAME}]: version has changed'
|
||||||
|
opdata: 'Old version: {ITEM.VALUE}, Current version: {ITEM.LASTVALUE1}'
|
||||||
|
priority: INFO
|
||||||
|
description: 'The agent version has changed. Acknowledge to close the problem manually.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
master_item:
|
||||||
|
key: controlm.agents
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#AGENT.NAME}'
|
||||||
|
path: $.nodeid
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.agents
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '[]'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
- uuid: 279c680e12f6443a9b096bec45f9bce4
|
||||||
|
name: 'Jobs discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: controlm.jobs.discovery
|
||||||
|
delay: '0'
|
||||||
|
lifetime: 1d
|
||||||
|
description: 'Discovers jobs on the server.'
|
||||||
|
item_prototypes:
|
||||||
|
- uuid: bbeb9ab5bcb04f8da802d1a63f098107
|
||||||
|
name: 'Job [{#JOB.ID}]: held status'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'job.held[''{#JOB.ID}'']'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the held status of a job.'
|
||||||
|
valuemap:
|
||||||
|
name: 'Control-M true-false'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.held
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
const idx = [
|
||||||
|
'false',
|
||||||
|
'true',
|
||||||
|
].indexOf(value);
|
||||||
|
return idx !== -1 ? idx : 10;
|
||||||
|
master_item:
|
||||||
|
key: 'job.stats[''{#JOB.ID}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: job
|
||||||
|
- tag: job-metric
|
||||||
|
value: held
|
||||||
|
- tag: job-name
|
||||||
|
value: '{#JOB.ID}'
|
||||||
|
- uuid: 2759dacfd8da46e1ad9811093c8897ee
|
||||||
|
name: 'Job [{#JOB.ID}]: number of runs'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'job.numberOfRuns[''{#JOB.ID}'']'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the number of runs for a job.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.numberOfRuns
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'job.stats[''{#JOB.ID}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: job
|
||||||
|
- tag: job-metric
|
||||||
|
value: runs
|
||||||
|
- tag: job-name
|
||||||
|
value: '{#JOB.ID}'
|
||||||
|
- uuid: c73c160f2b8e47c8891d7e22b3a1d1bc
|
||||||
|
name: 'Job [{#JOB.ID}]: stats'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'job.stats[''{#JOB.ID}'']'
|
||||||
|
delay: '0'
|
||||||
|
history: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Gets the statistics of a job.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.statuses.[?(@.jobId == ''{#JOB.ID}'')].first()'
|
||||||
|
error_handler: DISCARD_VALUE
|
||||||
|
master_item:
|
||||||
|
key: controlm.jobs
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: 1348caa83bc94650ba49231bac41aa18
|
||||||
|
name: 'Job [{#JOB.ID}]: status'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'job.status[''{#JOB.ID}'']'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the status of a job.'
|
||||||
|
valuemap:
|
||||||
|
name: 'Control-M job status'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.status
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
const idx = [
|
||||||
|
'Ended OK',
|
||||||
|
'Ended Not OK',
|
||||||
|
'Wait User',
|
||||||
|
'Wait Resource',
|
||||||
|
'Wait Host',
|
||||||
|
'Wait Workload',
|
||||||
|
'Wait Condition',
|
||||||
|
'Executing'
|
||||||
|
].indexOf(value);
|
||||||
|
return idx !== -1 ? idx : 10;
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'job.stats[''{#JOB.ID}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: job
|
||||||
|
- tag: job-metric
|
||||||
|
value: status
|
||||||
|
- tag: job-name
|
||||||
|
value: '{#JOB.ID}'
|
||||||
|
trigger_prototypes:
|
||||||
|
- uuid: beec4281ad0f4ca7aa5f3020b116fdfd
|
||||||
|
expression: |
|
||||||
|
last(/Control-M server by HTTP/job.status['{#JOB.ID}'],#1)=1 or
|
||||||
|
last(/Control-M server by HTTP/job.status['{#JOB.ID}'],#1)=10
|
||||||
|
name: 'Control-M: Job [{#JOB.ID}]: status [{ITEM.VALUE}]'
|
||||||
|
priority: WARNING
|
||||||
|
description: 'The job has encountered an issue.'
|
||||||
|
manual_close: 'YES'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 4ec3c06e6ff04e919a7a0f21fa490a25
|
||||||
|
name: 'Job [{#JOB.ID}]: type'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: 'job.type[''{#JOB.ID}'']'
|
||||||
|
delay: '0'
|
||||||
|
description: 'Gets the job type.'
|
||||||
|
valuemap:
|
||||||
|
name: 'Control-M job type'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.type
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- |
|
||||||
|
const idx = [
|
||||||
|
'Command',
|
||||||
|
'Script',
|
||||||
|
'File Transfer',
|
||||||
|
'File Watcher',
|
||||||
|
'Database',
|
||||||
|
'Hadoop',
|
||||||
|
'Dummy',
|
||||||
|
'Folder',
|
||||||
|
'Job'
|
||||||
|
].indexOf(value);
|
||||||
|
return idx !== -1 ? idx : 10;
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: 'job.stats[''{#JOB.ID}'']'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: job
|
||||||
|
- tag: job-metric
|
||||||
|
value: type
|
||||||
|
- tag: job-name
|
||||||
|
value: '{#JOB.ID}'
|
||||||
|
master_item:
|
||||||
|
key: controlm.jobs
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#JOB.ID}'
|
||||||
|
path: $.jobId
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.statuses
|
||||||
|
error_handler: CUSTOM_VALUE
|
||||||
|
error_handler_params: '[]'
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: software
|
||||||
|
- tag: target
|
||||||
|
value: controlm
|
||||||
|
macros:
|
||||||
|
- macro: '{$API.TOKEN}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'A token to use for API connections.'
|
||||||
|
- macro: '{$API.URI.ENDPOINT}'
|
||||||
|
value: '<set the api uri endpoint here>'
|
||||||
|
description: 'The API endpoint is a URI - for example, `https://monitored.controlm.instance:8443/automation-api`.'
|
||||||
|
- macro: '{$SERVER.NAME}'
|
||||||
|
value: '<set the server name here>'
|
||||||
|
description: 'The name of the Control-M server.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: f12c2c57e08a4af19e83dd7b1c867d59
|
||||||
|
name: 'Control-M Overview'
|
||||||
|
pages:
|
||||||
|
- widgets:
|
||||||
|
- type: graph
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Control-M server by HTTP'
|
||||||
|
name: 'Control-M: Jobs statistics'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAA
|
||||||
|
- type: graph
|
||||||
|
x: '36'
|
||||||
|
width: '36'
|
||||||
|
height: '5'
|
||||||
|
fields:
|
||||||
|
- type: GRAPH
|
||||||
|
name: graphid.0
|
||||||
|
value:
|
||||||
|
host: 'Control-M server by HTTP'
|
||||||
|
name: 'Control-M: Server state'
|
||||||
|
- type: STRING
|
||||||
|
name: reference
|
||||||
|
value: AAAAB
|
||||||
|
valuemaps:
|
||||||
|
- uuid: 55b997715e1e4a4cb5272874b975b43a
|
||||||
|
name: 'Control-M agent status'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: Available
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Unavailable
|
||||||
|
- value: '2'
|
||||||
|
newvalue: Disabled
|
||||||
|
- value: '3'
|
||||||
|
newvalue: Disable
|
||||||
|
- value: '4'
|
||||||
|
newvalue: Discovering
|
||||||
|
- value: '10'
|
||||||
|
newvalue: Unknown
|
||||||
|
- uuid: 14b119c7f4a940ea91a8df8c4b114eca
|
||||||
|
name: 'Control-M job status'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: 'Ended OK'
|
||||||
|
- value: '1'
|
||||||
|
newvalue: 'Ended Not OK'
|
||||||
|
- value: '2'
|
||||||
|
newvalue: 'Wait User'
|
||||||
|
- value: '3'
|
||||||
|
newvalue: 'Wait Resource'
|
||||||
|
- value: '4'
|
||||||
|
newvalue: 'Wait Host'
|
||||||
|
- value: '5'
|
||||||
|
newvalue: 'Wait Workload'
|
||||||
|
- value: '6'
|
||||||
|
newvalue: 'Wait Condition'
|
||||||
|
- value: '7'
|
||||||
|
newvalue: Executing
|
||||||
|
- value: '10'
|
||||||
|
newvalue: Unknown
|
||||||
|
- uuid: d6b4e3c8d5934bf08aeb19c8a2f52de4
|
||||||
|
name: 'Control-M job type'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: Command
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Script
|
||||||
|
- value: '2'
|
||||||
|
newvalue: 'File Transfer'
|
||||||
|
- value: '3'
|
||||||
|
newvalue: 'File Watcher'
|
||||||
|
- value: '4'
|
||||||
|
newvalue: Database
|
||||||
|
- value: '5'
|
||||||
|
newvalue: Hadoop
|
||||||
|
- value: '6'
|
||||||
|
newvalue: Dummy
|
||||||
|
- value: '7'
|
||||||
|
newvalue: Folder
|
||||||
|
- value: '8'
|
||||||
|
newvalue: Job
|
||||||
|
- value: '10'
|
||||||
|
newvalue: Unknown
|
||||||
|
- uuid: f0e3072f0cc44236802ea58f13ebb3ae
|
||||||
|
name: 'Control-M server status'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: Down
|
||||||
|
- value: '1'
|
||||||
|
newvalue: Up
|
||||||
|
- value: '10'
|
||||||
|
newvalue: Unknown
|
||||||
|
- uuid: 37a4770c51184c5e9a8d1306625babf3
|
||||||
|
name: 'Control-M true-false'
|
||||||
|
mappings:
|
||||||
|
- value: '0'
|
||||||
|
newvalue: 'false'
|
||||||
|
- value: '1'
|
||||||
|
newvalue: 'true'
|
||||||
|
- value: '10'
|
||||||
|
newvalue: Unknown
|
||||||
|
graphs:
|
||||||
|
- uuid: afbfbcdb9b0949c7851fc809049d573f
|
||||||
|
name: 'Control-M: Jobs statistics'
|
||||||
|
graph_items:
|
||||||
|
- color: 00FF00
|
||||||
|
item:
|
||||||
|
host: 'Control-M server by HTTP'
|
||||||
|
key: controlm.jobs.statistics.returned
|
||||||
|
- sortorder: '1'
|
||||||
|
color: 0000FF
|
||||||
|
item:
|
||||||
|
host: 'Control-M server by HTTP'
|
||||||
|
key: controlm.jobs.statistics.total
|
||||||
|
- uuid: 349829f644cd472d8caeae0059ca8527
|
||||||
|
name: 'Control-M: Server state'
|
||||||
|
graph_items:
|
||||||
|
- color: 00FF00
|
||||||
|
item:
|
||||||
|
host: 'Control-M server by HTTP'
|
||||||
|
key: server.state
|
||||||
@@ -0,0 +1,493 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.0'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 36bff6c29af64692839d077febfc7079
|
||||||
|
name: 'Templates/Network devices'
|
||||||
|
host_groups:
|
||||||
|
- uuid: f2481361f99448eea617b7b1d4765566
|
||||||
|
name: 'Discovered hosts'
|
||||||
|
templates:
|
||||||
|
- uuid: f552ead096ff4ebb8e4cc44c437e1f2f
|
||||||
|
template: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
name: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
description: |
|
||||||
|
Discover Cradlepoint devices by HTTP with script item usage.
|
||||||
|
|
||||||
|
Setup:
|
||||||
|
1. Put your "X-ECM-API-ID" and "X-ECM-API-KEY" key values from NetCloud Manager into {$CP.ECM.API.ID} and {$CP.ECM.API.KEY} macros.
|
||||||
|
2. Put your "X-CP-API-ID" and "X-CP-API-KEY" key values from NetCloud Manager into {$CP.API.ID} and {$CP.API.KEY} macros.
|
||||||
|
|
||||||
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
|
||||||
|
|
||||||
|
Generated by official Zabbix template tool "Templator"
|
||||||
|
vendor:
|
||||||
|
name: Zabbix
|
||||||
|
version: 7.0-1
|
||||||
|
groups:
|
||||||
|
- name: 'Templates/Network devices'
|
||||||
|
items:
|
||||||
|
- uuid: 6afb34d9e07d4146835989723804dbcb
|
||||||
|
name: 'Get devices item errors'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cradlepoint.devices.errors
|
||||||
|
delay: '0'
|
||||||
|
value_type: TEXT
|
||||||
|
trends: '0'
|
||||||
|
description: 'Item for gathering all the data item errors.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.error
|
||||||
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||||
|
parameters:
|
||||||
|
- 1h
|
||||||
|
master_item:
|
||||||
|
key: cradlepoint.devices.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: error
|
||||||
|
triggers:
|
||||||
|
- uuid: 597abc2d2b324a29b1be39e8087a4005
|
||||||
|
expression: 'length(last(/Cradlepoint NCM v2 by HTTP/cradlepoint.devices.errors))>0'
|
||||||
|
name: 'Cradlepoint: There are errors in the ''Get devices'' metric'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 3a3aed7ebf514349822f747f87daf95b
|
||||||
|
name: 'Get devices'
|
||||||
|
type: SCRIPT
|
||||||
|
key: cradlepoint.devices.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 getHttpData(url, params, pagination_required) {
|
||||||
|
var tls = new CTlsConfig(params.tls_verify),
|
||||||
|
request = new HttpRequest(tls.options),
|
||||||
|
response,
|
||||||
|
data;
|
||||||
|
|
||||||
|
tls.checkURL(url);
|
||||||
|
|
||||||
|
if (pagination_required) {
|
||||||
|
data = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
request.addHeader('Content-Type: application/json');
|
||||||
|
request.addHeader('X-CP-API-ID: ' + params.cp_api_id);
|
||||||
|
request.addHeader('X-CP-API-KEY: ' + params.cp_api_key);
|
||||||
|
request.addHeader('X-ECM-API-ID: ' + params.ecm_api_id);
|
||||||
|
request.addHeader('X-ECM-API-KEY: ' + params.ecm_api_key);
|
||||||
|
|
||||||
|
if (typeof params.http_proxy !== 'undefined' && params.http_proxy !== '{' + '$NCM.HTTP_PROXY}' && params.http_proxy !== '') {
|
||||||
|
request.setProxy(params.http_proxy);
|
||||||
|
Zabbix.log(4, '[ NetCloud Manager API v2 ] Using HTTP proxy: ' + params.http_proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (url) {
|
||||||
|
Zabbix.log(4, '[ NetCloud Manager API v2 ] Sending request: ' + url);
|
||||||
|
|
||||||
|
response = request.get(url);
|
||||||
|
|
||||||
|
Zabbix.log(4, '[ NetCloud Manager API v2 ] Received response with status code ' + request.getStatus() + ': ' + response);
|
||||||
|
|
||||||
|
if (request.getStatus() < 200 || request.getStatus() >= 300) {
|
||||||
|
throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw 'Failed to parse response received from NetCloud Manager API v2. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof response !== 'object' || response === null) {
|
||||||
|
throw 'Cannot process response data: received data is not an object.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pagination_required) {
|
||||||
|
if (typeof response.meta === 'undefined' || typeof response.data === 'undefined') {
|
||||||
|
throw 'Cannot process response data: received unexpected object.';
|
||||||
|
}
|
||||||
|
|
||||||
|
data = data.concat(response.data);
|
||||||
|
|
||||||
|
if (typeof response.meta.next !== 'undefined' && response.meta.next !== null) {
|
||||||
|
url = response.meta.next;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
url = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data = response;
|
||||||
|
url = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete request;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
var params = JSON.parse(value),
|
||||||
|
result = { "data": [], "error": "" },
|
||||||
|
error_msg = "";
|
||||||
|
|
||||||
|
var keysList = ['id', 'device_type', 'ipv4_address', 'name', 'group', 'description'];
|
||||||
|
|
||||||
|
try {
|
||||||
|
['cp_api_id', 'cp_api_key', 'ecm_api_id', 'ecm_api_key', 'api_url'].forEach(function (key) {
|
||||||
|
var macro = '{$NCM.' + key.replace('_', '.').toUpperCase() + '}';
|
||||||
|
if (params[key] === macro || params[key] === '') {
|
||||||
|
throw 'Please change ' + macro + ' macro to the proper value.';
|
||||||
|
}
|
||||||
|
if (typeof params[key] === 'undefined') {
|
||||||
|
throw 'Please set \'' + key + '\' script input parameter to ' + macro + ' macro value.';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (params.api_url.indexOf('http://') === -1 && params.api_url.indexOf('https://') === -1) {
|
||||||
|
params.api_url = 'https://' + params.api_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!params.api_url.endsWith('/')) {
|
||||||
|
params.api_url += '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
var devices = getHttpData(params.api_url + 'routers/?fields=' + keysList.join() +
|
||||||
|
'&limit=' + encodeURIComponent('{$NCM.RESP.DATA.LIMIT:"routers"}'), params, true);
|
||||||
|
|
||||||
|
if (Array.isArray(devices)) {
|
||||||
|
result["data"] = devices;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw 'Failed to parse response received from NetCloud Manager API v2. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keysList.indexOf('group') !== -1) {
|
||||||
|
var groups = getHttpData(params.api_url + 'groups/?limit=' + encodeURIComponent('{$NCM.RESP.DATA.LIMIT:"groups"}'), params, true);
|
||||||
|
|
||||||
|
if (!Array.isArray(groups)) {
|
||||||
|
throw 'Failed to parse response received from NetCloud Manager API v2. Check debug log for more information.';
|
||||||
|
}
|
||||||
|
|
||||||
|
result["data"].map(function (device) {
|
||||||
|
groups.forEach(function (group) {
|
||||||
|
if (device.group == null) {
|
||||||
|
device.group = {"name": "Undefined"};
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof device.group == "string" && device.group.endsWith(group.id+'/')) {
|
||||||
|
device.group = group.name;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return device;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
error_msg = error.toString();
|
||||||
|
error_msg += (error_msg.endsWith('.')) ? '' : '.';
|
||||||
|
Zabbix.log(3, '[ NetCloud Manager API v2 ] ERROR: ' + error_msg);
|
||||||
|
};
|
||||||
|
|
||||||
|
result.error = error_msg;
|
||||||
|
|
||||||
|
return JSON.stringify(result);
|
||||||
|
description: 'Item for gathering all devices from NetCloud Manager API.'
|
||||||
|
timeout: '{$NCM.DATA.TIMEOUT}'
|
||||||
|
parameters:
|
||||||
|
- name: api_url
|
||||||
|
value: '{$NCM.API.URL}'
|
||||||
|
- name: cp_api_id
|
||||||
|
value: '{$NCM.CP.API.ID}'
|
||||||
|
- name: cp_api_key
|
||||||
|
value: '{$NCM.CP.API.KEY}'
|
||||||
|
- name: ecm_api_id
|
||||||
|
value: '{$NCM.ECM.API.ID}'
|
||||||
|
- name: ecm_api_key
|
||||||
|
value: '{$NCM.ECM.API.KEY}'
|
||||||
|
- name: http_proxy
|
||||||
|
value: '{$NCM.HTTP_PROXY}'
|
||||||
|
- name: tls_verify
|
||||||
|
value: '{$HTTP.TLS.VERIFY:"Cradlepoint NCM v2"}'
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: raw
|
||||||
|
- uuid: bfbe3988a57b4f7d8212a2e033b43292
|
||||||
|
name: 'Devices required reboot'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cradlepoint.devices.reboot_required
|
||||||
|
delay: '0'
|
||||||
|
description: 'Number of devices required reboot.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.data[?(@.reboot_required == ''true'')].length()'
|
||||||
|
master_item:
|
||||||
|
key: cradlepoint.devices.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: d1defc9c540043edbb31c17280129d11
|
||||||
|
expression: '{$NCM.DEVICES.REBOOT.TH}<>-1 and length(last(/Cradlepoint NCM v2 by HTTP/cradlepoint.devices.reboot_required))>{$NCM.DEVICES.REBOOT.TH}'
|
||||||
|
name: 'Cradlepoint: More than {$NCM.DEVICES.REBOOT.TH} devices required reboot'
|
||||||
|
priority: INFO
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
- uuid: 581006b29fab4e93bbf394d28200bde8
|
||||||
|
name: 'Total devices'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cradlepoint.devices.total
|
||||||
|
delay: '0'
|
||||||
|
description: 'The total number of all devices.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.data.length()
|
||||||
|
master_item:
|
||||||
|
key: cradlepoint.devices.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
- uuid: b74b036314ee40d4b8810fc96789b337
|
||||||
|
name: 'Devices with pending upgrade'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cradlepoint.devices.upgrade_pending
|
||||||
|
delay: '0'
|
||||||
|
description: 'Number of devices with pending upgrade.'
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- '$.data[?(@.upgrade_pending == ''true'')].length()'
|
||||||
|
master_item:
|
||||||
|
key: cradlepoint.devices.get
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: system
|
||||||
|
triggers:
|
||||||
|
- uuid: 70f42ff8c8014fb987d00a0ec426547b
|
||||||
|
expression: '{$NCM.DEVICES.UPGRADE.TH}<>-1 and length(last(/Cradlepoint NCM v2 by HTTP/cradlepoint.devices.upgrade_pending))>{$NCM.DEVICES.UPGRADE.TH}'
|
||||||
|
name: 'Cradlepoint: More than {$NCM.DEVICES.UPGRADE.TH} devices awaiting upgrade'
|
||||||
|
priority: INFO
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: notice
|
||||||
|
discovery_rules:
|
||||||
|
- uuid: e4609c621e6848ecab825d0bf59776b7
|
||||||
|
name: 'Devices discovery'
|
||||||
|
type: DEPENDENT
|
||||||
|
key: cradlepoint.devices.discovery
|
||||||
|
delay: '0'
|
||||||
|
filter:
|
||||||
|
evaltype: AND
|
||||||
|
conditions:
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$NCM.DEVICE.NAME.MATCHES}'
|
||||||
|
formulaid: A
|
||||||
|
- macro: '{#NAME}'
|
||||||
|
value: '{$NCM.DEVICE.NAME.NOT_MATCHES}'
|
||||||
|
operator: NOT_MATCHES_REGEX
|
||||||
|
formulaid: B
|
||||||
|
description: 'Discovering devices from NetCloud Manager API.'
|
||||||
|
host_prototypes:
|
||||||
|
- uuid: 0013a0572be54dfd8195753302b9ddfa
|
||||||
|
host: '{#TYPE}_{#ID}'
|
||||||
|
name: '{#NAME}'
|
||||||
|
inventory_mode: AUTOMATIC
|
||||||
|
group_links:
|
||||||
|
- group:
|
||||||
|
name: 'Discovered hosts'
|
||||||
|
group_prototypes:
|
||||||
|
- name: 'Cradlepoint/{#GROUP}'
|
||||||
|
templates:
|
||||||
|
- name: 'Cradlepoint NCM v2 device by HTTP'
|
||||||
|
macros:
|
||||||
|
- macro: '{$NCM.DEVICE.ID}'
|
||||||
|
value: '{#ID}'
|
||||||
|
description: 'ID of the device.'
|
||||||
|
tags:
|
||||||
|
- tag: device
|
||||||
|
value: '{#TYPE}'
|
||||||
|
master_item:
|
||||||
|
key: cradlepoint.devices.get
|
||||||
|
lld_macro_paths:
|
||||||
|
- lld_macro: '{#DESCR}'
|
||||||
|
path: $.description
|
||||||
|
- lld_macro: '{#GROUP}'
|
||||||
|
path: $.group
|
||||||
|
- lld_macro: '{#ID}'
|
||||||
|
path: $.id
|
||||||
|
- lld_macro: '{#IP}'
|
||||||
|
path: $.ipv4_address
|
||||||
|
- lld_macro: '{#NAME}'
|
||||||
|
path: $.name
|
||||||
|
- lld_macro: '{#TYPE}'
|
||||||
|
path: $.device_type
|
||||||
|
preprocessing:
|
||||||
|
- type: JSONPATH
|
||||||
|
parameters:
|
||||||
|
- $.data
|
||||||
|
tags:
|
||||||
|
- tag: class
|
||||||
|
value: network
|
||||||
|
- tag: subclass
|
||||||
|
value: modem
|
||||||
|
- tag: target
|
||||||
|
value: cradlepoint
|
||||||
|
- tag: target
|
||||||
|
value: netcloud
|
||||||
|
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 "Cradlepoint NCM v2", e.g. {$HTTP.TLS.VERIFY:"Cradlepoint NCM v2"}.'
|
||||||
|
- macro: '{$NCM.API.URL}'
|
||||||
|
value: 'https://www.cradlepointecm.com/api/v2/'
|
||||||
|
description: 'NetCloud Manager API URL.'
|
||||||
|
- macro: '{$NCM.CP.API.ID}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'NetCloud Manager `X-CP-API-ID`.'
|
||||||
|
- macro: '{$NCM.CP.API.KEY}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'NetCloud Manager `X-CP-API-KEY`.'
|
||||||
|
- macro: '{$NCM.DATA.TIMEOUT}'
|
||||||
|
value: 15s
|
||||||
|
description: 'The response timeout for the API.'
|
||||||
|
- macro: '{$NCM.DEVICE.NAME.MATCHES}'
|
||||||
|
value: '.*'
|
||||||
|
description: 'A regular expression to filter devices by name. Only devices with names matching this regex will be monitored.'
|
||||||
|
- macro: '{$NCM.DEVICE.NAME.NOT_MATCHES}'
|
||||||
|
value: CHANGE_IF_NEEDED
|
||||||
|
description: 'Regular expression to filter devices by name. Devices with names matching this regex will be excluded from monitoring.'
|
||||||
|
- macro: '{$NCM.DEVICES.REBOOT.TH}'
|
||||||
|
value: '5'
|
||||||
|
description: 'The maximum number of devices requiring a reboot before the trigger fires. The trigger can be disabled by setting the value to `-1`.'
|
||||||
|
- macro: '{$NCM.DEVICES.UPGRADE.TH}'
|
||||||
|
value: '5'
|
||||||
|
description: 'The maximum number of devices with a pending upgrade before the trigger fires. The trigger can be disabled by setting the value to `-1`.'
|
||||||
|
- macro: '{$NCM.ECM.API.ID}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'NetCloud Manager `X-ECM-API-ID`.'
|
||||||
|
- macro: '{$NCM.ECM.API.KEY}'
|
||||||
|
type: SECRET_TEXT
|
||||||
|
description: 'NetCloud Manager `X-ECM-API-KEY`.'
|
||||||
|
- macro: '{$NCM.HTTP_PROXY}'
|
||||||
|
description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. See the documentation at https://www.zabbix.com/documentation/7.0/manual/config/items/itemtypes/http'
|
||||||
|
- macro: '{$NCM.RESP.DATA.LIMIT}'
|
||||||
|
value: '500'
|
||||||
|
description: 'The number of records returned by the API. Max value is `500`.'
|
||||||
|
dashboards:
|
||||||
|
- uuid: ed371a522c6d4bd4907fd5697c9904d3
|
||||||
|
name: General
|
||||||
|
pages:
|
||||||
|
- name: Overview
|
||||||
|
widgets:
|
||||||
|
- type: item
|
||||||
|
name: 'Total devices'
|
||||||
|
width: '24'
|
||||||
|
height: '3'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: decimal_places
|
||||||
|
value: '0'
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
key: cradlepoint.devices.total
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: problems
|
||||||
|
name: Problems
|
||||||
|
'y': '3'
|
||||||
|
width: '72'
|
||||||
|
height: '6'
|
||||||
|
- type: item
|
||||||
|
name: 'Devices required reboot'
|
||||||
|
x: '24'
|
||||||
|
width: '24'
|
||||||
|
height: '3'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: decimal_places
|
||||||
|
value: '0'
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
key: cradlepoint.devices.reboot_required
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
- type: item
|
||||||
|
name: 'Devices with pending upgrade'
|
||||||
|
x: '48'
|
||||||
|
width: '24'
|
||||||
|
height: '3'
|
||||||
|
fields:
|
||||||
|
- type: INTEGER
|
||||||
|
name: decimal_places
|
||||||
|
value: '0'
|
||||||
|
- type: ITEM
|
||||||
|
name: itemid.0
|
||||||
|
value:
|
||||||
|
host: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
key: cradlepoint.devices.upgrade_pending
|
||||||
|
- type: INTEGER
|
||||||
|
name: show.0
|
||||||
|
value: '2'
|
||||||
|
graphs:
|
||||||
|
- uuid: 57bdf098cf7c4d8388e85ec5fd65793d
|
||||||
|
name: 'Devices required reboot'
|
||||||
|
ymin_type_1: FIXED
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
key: cradlepoint.devices.reboot_required
|
||||||
|
- uuid: a4b7e2626afb4e11a9001851a86ce8a0
|
||||||
|
name: 'Devices with pending upgrade'
|
||||||
|
ymin_type_1: FIXED
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
key: cradlepoint.devices.upgrade_pending
|
||||||
|
- uuid: b6e662a0f1714ad0ba1bd7a5ca2e2405
|
||||||
|
name: 'Total devices'
|
||||||
|
ymin_type_1: FIXED
|
||||||
|
graph_items:
|
||||||
|
- color: 199C0D
|
||||||
|
item:
|
||||||
|
host: 'Cradlepoint NCM v2 by HTTP'
|
||||||
|
key: cradlepoint.devices.total
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user