1117 lines
42 KiB
YAML
1117 lines
42 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: c2c162144c2d4c5491c8801193af4945
|
|
name: Templates/Cloud
|
|
templates:
|
|
- uuid: ec92c7b0b1d14946b6ac61de89357199
|
|
template: 'Azure MySQL Flexible Server by HTTP'
|
|
name: 'Azure MySQL Flexible Server by HTTP'
|
|
description: |
|
|
This template is designed to monitor Microsoft Azure MySQL flexible servers 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: 9c87cde45e984ce282d8ba9fbe184f9b
|
|
name: 'Availability status detailed'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.availability.details
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'The summary description of the availability status.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health.summary
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
- uuid: 7f2d8e8d94ae4c87ba0480a2d9518f65
|
|
name: 'Availability state'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.availability.state
|
|
delay: '0'
|
|
description: 'The availability status of the resource.'
|
|
valuemap:
|
|
name: 'Azure resource health state'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.health.availabilityState
|
|
error_handler: CUSTOM_VALUE
|
|
error_handler_params: '3'
|
|
- type: STR_REPLACE
|
|
parameters:
|
|
- Available
|
|
- '0'
|
|
- type: STR_REPLACE
|
|
parameters:
|
|
- Degraded
|
|
- '1'
|
|
- type: STR_REPLACE
|
|
parameters:
|
|
- Unavailable
|
|
- '2'
|
|
- type: STR_REPLACE
|
|
parameters:
|
|
- Unknown
|
|
- '3'
|
|
- type: IN_RANGE
|
|
parameters:
|
|
- '0'
|
|
- '3'
|
|
error_handler: CUSTOM_VALUE
|
|
error_handler_params: '3'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
triggers:
|
|
- uuid: e822fd2214fb41db9b57cdb8eec0444a
|
|
expression: 'last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.availability.state)=1'
|
|
name: 'Azure MySQL Flexible: MySQL server is degraded'
|
|
opdata: '{ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'The resource is in a degraded state.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: ebb35037a5b646a0bd2c6be44bb1f3c6
|
|
expression: 'last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.availability.state)=3'
|
|
name: 'Azure MySQL Flexible: MySQL server is in unknown state'
|
|
opdata: '{ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'The resource state is unknown.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 240b861c09a94e209036782b6c7496fa
|
|
expression: 'last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.availability.state)=2'
|
|
name: 'Azure MySQL Flexible: MySQL server is unavailable'
|
|
opdata: '{ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'The resource state is unavailable.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: cab6ac822f2c4e118b030e49cc15eaa2
|
|
name: 'Connections aborted'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.connections.aborted
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The count of aborted connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.aborted_connections.total
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
triggers:
|
|
- uuid: 3346ea2331c14fa18658eb33e461ec7c
|
|
expression: 'min(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.connections.aborted,5m)>{$AZURE.DB.ABORTED.CONN.MAX.WARN}'
|
|
name: 'Azure MySQL Flexible: Server has aborted connections'
|
|
opdata: 'Current value: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'The number of failed attempts to connect to the MySQL server is more than `{$AZURE.DB.ABORTED.CONN.MAX.WARN}`.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 71b33f0a5d37498dbb57d185ac0f2741
|
|
name: 'Connections active'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.connections.active
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The count of active connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.active_connections.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 1993ae276fe44db6a89451291749f703
|
|
name: 'Connections total'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.connections.total
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The count of total connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.total_connections.total
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: b235666b98954555ae5e75e757bba707
|
|
name: 'CPU credits consumed'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.cpu.credits.consumed
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The consumed CPU credits.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.cpu_credits_consumed.maximum
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
- uuid: 4f591346d3d34d49b37cfff2a169f57e
|
|
name: 'CPU credits remaining'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.cpu.credits.remaining
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The remaining CPU credits.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.cpu_credits_remaining.maximum
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
- uuid: afe4d11c2f474428acc00d153ad2a6e5
|
|
name: 'Percentage CPU'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.cpu.percentage
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The CPU percent of a host.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.cpu_percent.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
triggers:
|
|
- uuid: 5af82cc95239479c86c7ab3dabcfb592
|
|
expression: 'min(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.cpu.percentage,5m)>{$AZURE.DB.CPU.UTIL.CRIT}'
|
|
name: 'Azure MySQL Flexible: High CPU utilization'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'The CPU utilization is too high. The system might be slow to respond.'
|
|
tags:
|
|
- tag: scope
|
|
value: performance
|
|
- uuid: f960e7667571497c96454b5c4b7b69ff
|
|
name: 'Get errors'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.data.errors
|
|
delay: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'A list of errors from API requests.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.errors
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
triggers:
|
|
- uuid: 98c1b86b79e9469cac2870fb2ba42949
|
|
expression: 'length(last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.data.errors))>0'
|
|
name: 'Azure MySQL Flexible: 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: de712334db1440309fa68f9252d4f9bc
|
|
name: 'Get data'
|
|
type: SCRIPT
|
|
key: azure.db.mysql.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 AzureDB = {
|
|
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 + '.';
|
|
}
|
|
});
|
|
|
|
AzureDB.params = params;
|
|
AzureDB.tls = new CTlsConfig(params.tls_verify);
|
|
},
|
|
|
|
|
|
request: function (url, data) {
|
|
if (typeof data === 'undefined' || data === null) {
|
|
data = '';
|
|
}
|
|
|
|
var response, request = new HttpRequest(AzureDB.tls.options);
|
|
if (typeof AzureDB.params.proxy !== 'undefined' && AzureDB.params.proxy !== '') {
|
|
request.setProxy(AzureDB.params.proxy);
|
|
}
|
|
if (AzureDB.token) {
|
|
request.addHeader('Accept: application/json');
|
|
request.addHeader('Authorization: Bearer ' + AzureDB.token);
|
|
}
|
|
|
|
Zabbix.log(4, '[ Azure ] Sending request: ' + url);
|
|
|
|
if (data !== '') {
|
|
request.addHeader('Content-Type: application/x-www-form-urlencoded');
|
|
response = request.post(url, data);
|
|
}
|
|
else {
|
|
response = request.get(url);
|
|
}
|
|
|
|
Zabbix.log(4, '[ Azure ] Received response with status code ' + request.getStatus() + ': ' + response);
|
|
|
|
if (request.getStatus() !== 200 || response === null) {
|
|
throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
|
|
}
|
|
|
|
try {
|
|
return JSON.parse(response);
|
|
}
|
|
catch (error) {
|
|
throw 'Failed to parse response received from API.';
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
var metrics = [
|
|
'cpu_percent',
|
|
'memory_percent',
|
|
'network_bytes_egress',
|
|
'network_bytes_ingress',
|
|
'active_connections',
|
|
'total_connections',
|
|
'aborted_connections',
|
|
'Queries',
|
|
'io_consumption_percent',
|
|
'storage_percent',
|
|
'storage_used',
|
|
'storage_limit',
|
|
'backup_storage_used',
|
|
'replication_lag',
|
|
'cpu_credits_remaining',
|
|
'cpu_credits_consumed'
|
|
],
|
|
prepared_metrics = [],
|
|
data = {};
|
|
data['errors'] = {};
|
|
data['metrics'] = {};
|
|
|
|
try {
|
|
AzureDB.setParams(JSON.parse(value));
|
|
|
|
try {
|
|
result = AzureDB.request(
|
|
'https://login.microsoftonline.com/' + encodeURIComponent(AzureDB.params.tenant_id) + '/oauth2/token',
|
|
'grant_type=client_credentials&resource=' + encodeURIComponent('https://management.azure.com/') + '&client_id=' + encodeURIComponent(AzureDB.params.app_id) + '&client_secret=' + encodeURIComponent(AzureDB.params.password)
|
|
);
|
|
|
|
if ('access_token' in result) {
|
|
AzureDB.token = result['access_token'];
|
|
} else {
|
|
throw 'Auth response does not contain access token.';
|
|
}
|
|
}
|
|
catch (error) {
|
|
data.errors.auth = error.toString();
|
|
}
|
|
|
|
if (!('auth' in data.errors)) {
|
|
try {
|
|
health = AzureDB.request('https://management.azure.com' + AzureDB.params.resource_id + '/providers/Microsoft.ResourceHealth/availabilityStatuses?api-version=2020-05-01');
|
|
if ('value' in health && Array.isArray(health.value) && health.value.length > 0 && 'properties' in health.value[0] && typeof health.value[0].properties === 'object') {
|
|
data.health = health.value[0].properties;
|
|
}
|
|
}
|
|
catch (error) {
|
|
data.errors.health = error.toString();
|
|
}
|
|
|
|
for (var i = 0; i < metrics.length; i += 20) {
|
|
var chunk = metrics.slice(i, i + 20);
|
|
|
|
prepared_metrics.push(
|
|
chunk.map(function (element) {
|
|
return encodeURIComponent(element);
|
|
}).join(',')
|
|
);
|
|
}
|
|
|
|
start_date = new Date((new Date().getTime()) - 300000).toISOString().replace(/\.\d+/, '');
|
|
end_date = new Date().toISOString().replace(/\.\d+/, '');
|
|
|
|
for (var j in prepared_metrics) {
|
|
try {
|
|
metrics_data = AzureDB.request('https://management.azure.com' + AzureDB.params.resource_id + '/providers/Microsoft.Insights/metrics?metricnames=' + prepared_metrics[j] + '×pan=' + encodeURIComponent(start_date) + '/' + encodeURIComponent(end_date) + '&api-version=2021-05-01');
|
|
if ('value' in metrics_data && Array.isArray(metrics_data.value) && metrics_data.value.length > 0) {
|
|
for (k in metrics_data.value) {
|
|
if ('name' in metrics_data.value[k] && typeof metrics_data.value[k].name === 'object' && 'value' in metrics_data.value[k].name && typeof metrics_data.value[k].name.value === 'string' && 'timeseries' in metrics_data.value[k] && Array.isArray(metrics_data.value[k].timeseries) && metrics_data.value[k].timeseries.length > 0 && 'data' in metrics_data.value[k].timeseries[0] && Array.isArray(metrics_data.value[k].timeseries[0].data) && metrics_data.value[k].timeseries[0].data.length > 0) {
|
|
data.metrics[metrics_data.value[k].name.value.replace(/(\s|\/)+/g, '')] = metrics_data.value[k].timeseries[0].data[metrics_data.value[k].timeseries[0].data.length - 1];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (error) {
|
|
data.errors[prepared_metrics[j]] = error.toString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (error) {
|
|
data.errors.params = error.toString();
|
|
}
|
|
|
|
if (Object.keys(data.errors).length !== 0) {
|
|
errors = 'Failed to receive data:';
|
|
for (var error in data.errors) {
|
|
errors += '\n' + error + ' : ' + data.errors[error];
|
|
}
|
|
data.errors = errors;
|
|
}
|
|
else {
|
|
data.errors = '';
|
|
}
|
|
|
|
return JSON.stringify(data);
|
|
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 MySQL Flexible Server"}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: b4a6363aac734b6c8d043718ca667c09
|
|
name: 'IO consumption percent'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.io.consumption.percent
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The consumption percent of I/O.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.io_consumption_percent.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: operations
|
|
- uuid: f0f56a67942a40509d6835f3da9eb7e2
|
|
name: 'Memory utilization'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.memory.percentage
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The memory percent of a host.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.memory_percent.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
- uuid: 84f3d2b152784993944a2d4c3fad1a59
|
|
name: 'Network out'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.network.egress
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: bps
|
|
description: 'Network egress of a host, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.network_bytes_egress.total
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '0.0088'
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 5f38b6b4e3a849d09022bd34c4347088
|
|
name: 'Network in'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.network.ingress
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: bps
|
|
description: 'Network ingress of a host, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.network_bytes_ingress.total
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '0.0088'
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 05329dcdb2e14080a43d1bf7553037f6
|
|
name: Queries
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.queries
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The count of queries.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.Queries.total
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: queries
|
|
- uuid: 80a05247fec04e39a99ccafaefbd0441
|
|
name: 'Replication lag'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.replication.lag
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: s
|
|
description: 'The replication lag, expressed in seconds.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.replication_lag.maximum
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: replication
|
|
- uuid: 8d5cd0d3cd0744a5a260a8a0485f6735
|
|
name: 'Backup storage used'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.storage.backup.used
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'Used backup storage, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.backup_storage_used.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 78f3e03b5caf4f85a3c61513cf242f76
|
|
name: 'Storage limit'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.storage.limit
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'The storage limit, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.storage_limit.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: ced51184b59643adaa51bef90710166b
|
|
name: 'Storage percent'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.storage.percent
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The storage utilization, expressed in %.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.storage_percent.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
triggers:
|
|
- uuid: 1703edc1553644e5aa25d35928c5eafd
|
|
expression: 'last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.CRIT}'
|
|
name: 'Azure MySQL Flexible: Storage space is critically low'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'Critical utilization of the storage space.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: a2ec23a5e77c40aa9e45d214f4e06ca1
|
|
expression: 'last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.WARN}'
|
|
name: 'Azure MySQL Flexible: Storage space is low'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'High utilization of the storage space.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 9f96e947eee646f890742676e9f9a22a
|
|
name: 'Storage used'
|
|
type: DEPENDENT
|
|
key: azure.db.mysql.storage.used
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'Used storage space, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.storage_used.maximum
|
|
master_item:
|
|
key: azure.db.mysql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
tags:
|
|
- tag: class
|
|
value: software
|
|
- tag: target
|
|
value: azure
|
|
- tag: target
|
|
value: mysql
|
|
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.ABORTED.CONN.MAX.WARN}'
|
|
value: '25'
|
|
description: 'The number of failed attempts to connect to the MySQL server for a trigger expression.'
|
|
- macro: '{$AZURE.DB.CPU.UTIL.CRIT}'
|
|
value: '90'
|
|
description: 'The critical threshold of CPU utilization, expressed in %.'
|
|
- macro: '{$AZURE.DB.STORAGE.PUSED.CRIT}'
|
|
value: '90'
|
|
description: 'The critical threshold of the storage utilization, expressed in %.'
|
|
- macro: '{$AZURE.DB.STORAGE.PUSED.WARN}'
|
|
value: '80'
|
|
description: 'The warning threshold of the storage utilization, expressed in %.'
|
|
- 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 MySQL server 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 MySQL Flexible Server", e.g. {$HTTP.TLS.VERIFY:"Azure MySQL Flexible Server"}.'
|
|
dashboards:
|
|
- uuid: 12974ad6fc5a42ba9683af06f9166cef
|
|
name: 'Overview Azure MySQL Flexible Server'
|
|
pages:
|
|
- widgets:
|
|
- type: item
|
|
name: 'Memory utilization'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.memory.percentage
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: item
|
|
name: 'CPU credits consumed'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.cpu.credits.consumed
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Storage used'
|
|
'y': '6'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.storage.used
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Network in'
|
|
'y': '9'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.network.ingress
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Connections active'
|
|
'y': '12'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.connections.active
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Percentage CPU'
|
|
x: '12'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.cpu.percentage
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: item
|
|
name: 'CPU credits remaining'
|
|
x: '12'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.cpu.credits.remaining
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Storage limit'
|
|
x: '12'
|
|
'y': '6'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.storage.limit
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Network out'
|
|
x: '12'
|
|
'y': '9'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.network.egress
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Connections total'
|
|
x: '12'
|
|
'y': '12'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.connections.total
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Availability state'
|
|
x: '24'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.availability.state
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: up_color
|
|
value: FF0000
|
|
- type: item
|
|
name: 'Backup storage used'
|
|
x: '24'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.storage.backup.used
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: graph
|
|
name: 'Storage utilization'
|
|
x: '24'
|
|
'y': '6'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
name: 'Azure MySQL: Storage utilization'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAA
|
|
- type: graph
|
|
name: 'Network traffic'
|
|
x: '24'
|
|
'y': '9'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
name: 'Azure MySQL: Network traffic'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAB
|
|
- type: graph
|
|
name: Connections
|
|
x: '24'
|
|
'y': '12'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
name: 'Azure MySQL: Connections'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAC
|
|
- type: itemhistory
|
|
name: 'Availability status detailed'
|
|
x: '36'
|
|
width: '36'
|
|
height: '3'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns.0.display
|
|
value: '4'
|
|
- type: ITEM
|
|
name: columns.0.itemid
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.availability.details
|
|
- type: INTEGER
|
|
name: columns.0.monospace_font
|
|
value: '1'
|
|
- type: STRING
|
|
name: columns.0.name
|
|
value: 'Azure MySQL: Availability status detailed'
|
|
- type: STRING
|
|
name: reference
|
|
value: BAAAB
|
|
- type: INTEGER
|
|
name: show_timestamp
|
|
value: '1'
|
|
- type: item
|
|
name: Queries
|
|
x: '36'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.queries
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'IO consumption percent'
|
|
x: '48'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.io.consumption.percent
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: item
|
|
name: 'Replication lag'
|
|
x: '60'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.replication.lag
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
valuemaps:
|
|
- uuid: 4eec167b4d69441398b96b8e375d6825
|
|
name: 'Azure resource health state'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Available
|
|
- value: '1'
|
|
newvalue: Degraded
|
|
- value: '2'
|
|
newvalue: Unavailable
|
|
- value: '3'
|
|
newvalue: Unknown
|
|
graphs:
|
|
- uuid: 750ae48e6ef749c19a06f4bbe716f92f
|
|
name: 'Azure MySQL: Connections'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.connections.active
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.connections.total
|
|
- sortorder: '2'
|
|
color: 00611C
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.connections.aborted
|
|
- uuid: f929f47602734f82a79f22a5f4446f61
|
|
name: 'Azure MySQL: Network traffic'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.network.egress
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.network.ingress
|
|
- uuid: 4210e6b4ed8744589dce88217e961a56
|
|
name: 'Azure MySQL: Storage utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.storage.used
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure MySQL Flexible Server by HTTP'
|
|
key: azure.db.mysql.storage.limit
|