-
Incident report
-
Resolution: Unresolved
-
Trivial
-
None
-
7.0.4
-
None
https://www.zabbix.com/integrations/azure
This template --> Azure Microsoft SQL Database by HTTP
Item "Get data" - Suggest to update the Java Script.
java script started from row 115:
Instead of going for chunk of 20 metrics, it is better to go 1 by 1.
// for (var i = 0; i < metrics.length; i += 20) {
for (var i = 0; i < metrics.length; i++) {
// var chunk = metrics.slice(i, i + 20);
var metric = metrics[i];
prepared_metrics.push(
// chunk.map(function (element)
{ // return encodeURIComponent(element); encodeURIComponent(metric) // }).join(',')
);
}
The reason is, if one of the metrics is in error, all the rest of metrics values will be dropped.
"errors": "Failed to receive data:\ncpu_percent,physical_data_read_percent,log_write_percent,storage,connection_successful,connection_failed,blocked_by_firewall,deadlock,storage_percent,xtp_storage_percent,workers_percent,sessions_percent,sessions_count,cpu_limit,cpu_used,sqlserver_process_core_percent,sqlserver_process_memory_percent,tempdb_data_size,tempdb_log_size,tempdb_log_used_percent : Request failed with status code 400: {\"code\":\"BadRequest\",\"message\":\"Failed to find metric configuration for provider: Microsoft.Sql, resource Type: servers/databases, metric: cpu_limit, Valid metrics: cpu_percent,physical_data_read_percent,log_write_percent,dtu_consumption_percent,storage,connection_successful,connection_failed,connection_failed_user_error,blocked_by_firewall,availability,deadlock,storage_percent,xtp_storage_percent,workers_percent,sessions_percent,sessions_count,dtu_limit,dtu_used,sqlserver_process_core_percent,sqlserver_process_memory_percent,sql_instance_cpu_percent,sql_instance_memory_percent,tempdb_data_size,tempdb_log_size,tempdb_log_used_percent,allocated_data_storage,ledger_digest_upload_success,ledger_digest_upload_failed\"}\nfull_backup_size_bytes,diff_backup_size_bytes,log_backup_size_bytes : Request failed with status code 400: {\"code\":\"BadRequest\",\"message\":\"Failed to find metric configuration for provider: Microsoft.Sql, resource Type: servers/databases, metric: full_backup_size_bytes, Valid metrics: cpu_percent,physical_data_read_percent,log_write_percent,dtu_consumption_percent,storage,connection_successful,connection_failed,connection_failed_user_error,blocked_by_firewall,availability,deadlock,storage_percent,xtp_storage_percent,workers_percent,sessions_percent,sessions_count,dtu_limit,dtu_used,sqlserver_process_core_percent,sqlserver_process_memory_percent,sql_instance_cpu_percent,sql_instance_memory_percent,tempdb_data_size,tempdb_log_size,tempdb_log_used_percent,allocated_data_storage,ledger_digest_upload_success,ledger_digest_upload_failed\"}"