1070 lines
40 KiB
YAML
1070 lines
40 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: c2c162144c2d4c5491c8801193af4945
|
|
name: Templates/Cloud
|
|
templates:
|
|
- uuid: d023e2cd326c486f908e3e361d1fe157
|
|
template: 'Azure PostgreSQL Single Server by HTTP'
|
|
name: 'Azure PostgreSQL Single Server by HTTP'
|
|
description: |
|
|
This template is designed to monitor Microsoft Azure PostgreSQL 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: 9eb43a5ffb0d4e07be8d1fccfdecd2aa
|
|
name: 'Availability status detailed'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.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.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
- uuid: df4c66646f864f79b5f5e9f71dbefe82
|
|
name: 'Availability state'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.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.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: health
|
|
triggers:
|
|
- uuid: 699ca12c916746b1bf1e121261771cc3
|
|
expression: 'last(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.availability.state)=1'
|
|
name: 'Azure PostgreSQL Single: PostgreSQL server is degraded'
|
|
opdata: '{ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'The resource is in a degraded state.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 14e45ba0bc26409a89d92edfda152947
|
|
expression: 'last(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.availability.state)=3'
|
|
name: 'Azure PostgreSQL Single: PostgreSQL server is in unknown state'
|
|
opdata: '{ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'The resource state is unknown.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 4dc9113f8a914ac098d8736dba5aed4a
|
|
expression: 'last(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.availability.state)=2'
|
|
name: 'Azure PostgreSQL Single: PostgreSQL server is unavailable'
|
|
opdata: '{ITEM.LASTVALUE1}'
|
|
priority: HIGH
|
|
description: 'The resource state is unavailable.'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 3d0d3e1fe77740e4bd7b720368707214
|
|
name: 'Connections active'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.connections.active
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The count of active connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.active_connections.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 353a6ba543a84b32b16a5809ae63b4e1
|
|
name: 'Connections failed'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.connections.failed
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: 'The count of failed connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.connections_failed.total
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 537330b2372b434ebcea8a77a809c2f3
|
|
name: 'Percentage CPU'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.cpu.percentage
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The CPU percent of a host.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.cpu_percent.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
triggers:
|
|
- uuid: 33bd2ef88ad3468b9f0b2b1358cc7448
|
|
expression: 'min(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.cpu.percentage,5m)>{$AZURE.DB.CPU.UTIL.CRIT}'
|
|
name: 'Azure PostgreSQL Single: 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: 5b132ff050c94daa92b252529a52c535
|
|
name: 'Get errors'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.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.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
triggers:
|
|
- uuid: dd3d0be997204f8b9968ef5839fb7a9b
|
|
expression: 'length(last(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.data.errors))>0'
|
|
name: 'Azure PostgreSQL Single: 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: e47d863822e64e6292bfa3e684bc2839
|
|
name: 'Get data'
|
|
type: SCRIPT
|
|
key: azure.db.pgsql.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',
|
|
'io_consumption_percent',
|
|
'storage_percent',
|
|
'storage_used',
|
|
'storage_limit',
|
|
'serverlog_storage_percent',
|
|
'serverlog_storage_usage',
|
|
'serverlog_storage_limit',
|
|
'active_connections',
|
|
'connections_failed',
|
|
'backup_storage_used',
|
|
'network_bytes_egress',
|
|
'network_bytes_ingress',
|
|
'pg_replica_log_delay_in_seconds',
|
|
'pg_replica_log_delay_in_bytes'
|
|
],
|
|
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 PostgreSQL Single Server"}'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 9eade85c49bc462aab33b03e37581d87
|
|
name: 'IO consumption percent'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.io.consumption.percent
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The consumption percent of I/O.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.io_consumption_percent.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: operations
|
|
- uuid: e2ee4882b08f45788e6abb698265810e
|
|
name: 'Memory utilization'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.memory.percentage
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The memory percent of a host.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.memory_percent.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
triggers:
|
|
- uuid: 3119f21167a546369c05d31cda2e0147
|
|
expression: 'min(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.memory.percentage,5m)>{$AZURE.DB.MEMORY.UTIL.CRIT}'
|
|
name: 'Azure PostgreSQL Single: High memory utilization'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: AVERAGE
|
|
description: 'The system is running out of free memory.'
|
|
tags:
|
|
- tag: scope
|
|
value: performance
|
|
- uuid: f81eeb98d5e942f296c360ff71e8bf8d
|
|
name: 'Network out'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.network.egress
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: bps
|
|
description: 'The network outbound traffic across the active connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.network_bytes_egress.total
|
|
error_handler: DISCARD_VALUE
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '0.1333'
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 51f7e35042d04ddb88c7703d1b015d3b
|
|
name: 'Network in'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.network.ingress
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: bps
|
|
description: 'The network inbound traffic across the active connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.network_bytes_ingress.total
|
|
error_handler: DISCARD_VALUE
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '0.1333'
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 1db9e470b527476fae1d26d4b67f855b
|
|
name: 'Replication lag'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.replica.log.delay
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: s
|
|
description: 'The replication lag, expressed in seconds.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.pg_replica_log_delay_in_seconds.maximum
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: replication
|
|
- uuid: 6cdfda8f9e6640f8a8536f88729d75d6
|
|
name: 'Max lag across replicas in bytes'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.replica.log.delay.bytes
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'Lag for the most lagging replica, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.pg_replica_log_delay_in_bytes.maximum
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: replication
|
|
- uuid: 6b06fb0e008640839dc3cda5bcc3f91a
|
|
name: 'Backup storage used'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.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.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: b8d5ac0b049a4d73b2f35f59c7e7609c
|
|
name: 'Storage limit'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.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.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 750b4d3438614cc992694136d309c3cb
|
|
name: 'Storage percent'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.storage.percent
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The storage utilization, expressed in %.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.storage_percent.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
triggers:
|
|
- uuid: 6538d2c8ed774feb951204308f1458ce
|
|
expression: 'last(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.CRIT}'
|
|
name: 'Azure PostgreSQL Single: 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: 7f7a004cfc2a492092dd74c475888e8b
|
|
expression: 'last(/Azure PostgreSQL Single Server by HTTP/azure.db.pgsql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.WARN}'
|
|
name: 'Azure PostgreSQL Single: Storage space is low'
|
|
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
|
|
priority: WARNING
|
|
description: 'High utilization of the storage space.'
|
|
tags:
|
|
- tag: scope
|
|
value: capacity
|
|
- uuid: 399ef67426494a5cb7a820d056dfd4d5
|
|
name: 'Server log storage limit'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.storage.server.log.limit
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'The storage limit of server log, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.serverlog_storage_limit.maximum
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: ef6890330ebe4fe09f46b0d2f6d3f827
|
|
name: 'Server log storage percent'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.storage.server.log.percent
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The storage utilization by server log, expressed in %.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.serverlog_storage_percent.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: 36bd10a959964083ae47349dd83ec695
|
|
name: 'Server log storage used'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.storage.server.log.used
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'The storage space used by server log, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.serverlog_storage_usage.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
- uuid: dcbb87d442a04938b23e68f739f1e36f
|
|
name: 'Storage used'
|
|
type: DEPENDENT
|
|
key: azure.db.pgsql.storage.used
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'Used storage space, expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.metrics.storage_used.average
|
|
master_item:
|
|
key: azure.db.pgsql.data.get
|
|
tags:
|
|
- tag: component
|
|
value: storage
|
|
tags:
|
|
- tag: class
|
|
value: software
|
|
- tag: target
|
|
value: azure
|
|
- tag: target
|
|
value: postgresql
|
|
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.CPU.UTIL.CRIT}'
|
|
value: '90'
|
|
description: 'The critical threshold of CPU utilization, expressed in %.'
|
|
- macro: '{$AZURE.DB.MEMORY.UTIL.CRIT}'
|
|
value: '90'
|
|
description: 'The critical threshold of memory utilization, expressed in %.'
|
|
- macro: '{$AZURE.DB.STORAGE.PUSED.CRIT}'
|
|
value: '90'
|
|
description: 'The critical threshold of storage utilization, expressed in %.'
|
|
- macro: '{$AZURE.DB.STORAGE.PUSED.WARN}'
|
|
value: '80'
|
|
description: 'The warning threshold of 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 PostgreSQL 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 PostgreSQL Single Server", e.g. {$HTTP.TLS.VERIFY:"Azure PostgreSQL Single Server"}.'
|
|
dashboards:
|
|
- uuid: 9ef73571560743379fa0b4929370e1b4
|
|
name: 'Overview Azure PostgreSQL Single Server'
|
|
pages:
|
|
- widgets:
|
|
- type: item
|
|
name: 'Memory utilization'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.memory.percentage
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: item
|
|
name: 'Network in'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.network.ingress
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Server log storage limit'
|
|
'y': '6'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.server.log.limit
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Storage limit'
|
|
'y': '9'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.limit
|
|
- 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 PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.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 PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.cpu.percentage
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: units
|
|
value: '%'
|
|
- type: item
|
|
name: 'Network out'
|
|
x: '12'
|
|
'y': '3'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.network.egress
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Server log storage used'
|
|
x: '12'
|
|
'y': '6'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.server.log.used
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Storage used'
|
|
x: '12'
|
|
'y': '9'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.used
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: item
|
|
name: 'Connections failed'
|
|
x: '12'
|
|
'y': '12'
|
|
width: '12'
|
|
height: '3'
|
|
fields:
|
|
- type: ITEM
|
|
name: itemid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.connections.failed
|
|
- 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 PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.availability.state
|
|
- type: INTEGER
|
|
name: show.0
|
|
value: '4'
|
|
- type: INTEGER
|
|
name: show.1
|
|
value: '2'
|
|
- type: STRING
|
|
name: up_color
|
|
value: FF0000
|
|
- type: graph
|
|
name: 'Network traffic'
|
|
x: '24'
|
|
'y': '3'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
name: 'Azure PostgreSQL: Network traffic'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAA
|
|
- type: graph
|
|
name: 'Server log storage utilization'
|
|
x: '24'
|
|
'y': '6'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
name: 'Azure PostgreSQL: Server log storage utilization'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAB
|
|
- type: graph
|
|
name: 'Storage utilization'
|
|
x: '24'
|
|
'y': '9'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
name: 'Azure PostgreSQL: Storage utilization'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAC
|
|
- type: graph
|
|
name: Connections
|
|
x: '24'
|
|
'y': '12'
|
|
width: '48'
|
|
height: '3'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
name: 'Azure PostgreSQL: Connections'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAD
|
|
- 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 PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.availability.details
|
|
- type: INTEGER
|
|
name: columns.0.monospace_font
|
|
value: '1'
|
|
- type: STRING
|
|
name: columns.0.name
|
|
value: 'Azure PostgreSQL: Availability status detailed'
|
|
- type: STRING
|
|
name: reference
|
|
value: BAAAE
|
|
- type: INTEGER
|
|
name: show_timestamp
|
|
value: '1'
|
|
valuemaps:
|
|
- uuid: 61fc206aaae04abda4012e031f0e27ac
|
|
name: 'Azure resource health state'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Available
|
|
- value: '1'
|
|
newvalue: Degraded
|
|
- value: '2'
|
|
newvalue: Unavailable
|
|
- value: '3'
|
|
newvalue: Unknown
|
|
graphs:
|
|
- uuid: c76cf8ec6a584af6be815ec4a9257a8c
|
|
name: 'Azure PostgreSQL: Connections'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.connections.active
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.connections.failed
|
|
- uuid: 8bc17d843775414ea971e640e1fe5ec0
|
|
name: 'Azure PostgreSQL: Network traffic'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.network.egress
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.network.ingress
|
|
- uuid: 9e750a5a462b4429ac5a36a72bd60c66
|
|
name: 'Azure PostgreSQL: Server log storage utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.server.log.used
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.server.log.limit
|
|
- uuid: 9ecd071a77364c4486fa5f63125cd985
|
|
name: 'Azure PostgreSQL: Storage utilization'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.used
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Azure PostgreSQL Single Server by HTTP'
|
|
key: azure.db.pgsql.storage.limit
|