Small fixes for Docker check script and template

This commit is contained in:
Daniel Berteaud 2022-01-13 13:58:58 +01:00
parent 2d88e6fe34
commit 820d12a682
2 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,7 @@ sub convert_unit {
T => 1000 * 1000 * 1000 * 1000,
P => 1000 * 1000 * 1000 * 1000 * 1000
};
if ($val =~ m/^(\d+(\.\d+)?)(Ki|Mi|Gi|Ti|Pi|K|M|G|T|P)?B/){
if ($val =~ m/^(\d+(\.\d+)?)(ki|Ki|Mi|Gi|Ti|Pi|k|K|M|G|T|P)?B/){
$val = int($1 * $suffix_multiplier->{$3}) if (defined $3 and defined $suffix_multiplier->{$3});
# Remove the Bytes suffix if remaining
$val =~ s/B$//;

View File

@ -1,6 +1,6 @@
zabbix_export:
version: '5.4'
date: '2022-01-13T08:42:39Z'
date: '2022-01-13T12:58:38Z'
groups:
-
uuid: 7df96b18c230490a9a0a9e2307226338
@ -509,6 +509,7 @@ zabbix_export:
-
uuid: 4a9aa378970045399303dcead39c1e53
name: 'Docker: Container {#DOCKER_CONTAINER_NAME}: CPU'
ymin_type_1: FIXED
graph_items:
-
sortorder: '1'
@ -538,6 +539,7 @@ zabbix_export:
-
uuid: 0fec757ff2f34e4fbab3be8ea455bc5f
name: 'Docker: Container {#DOCKER_CONTAINER_NAME}: Memory'
ymin_type_1: FIXED
graph_items:
-
sortorder: '1'