Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Berteaud 1950abbc0f Automatic commit of package [zabbix-agent-addons] release [0.2.160-1].
Created by command:

/usr/bin/tito tag
2022-01-20 17:28:52 +01:00
Daniel Berteaud 51fa9f602a Add a {#DOCKER_CONTAINER_STATUS} LLD macro 2022-01-20 17:28:37 +01:00
3 changed files with 7 additions and 3 deletions

View File

@ -1 +1 @@
0.2.159-1 ./
0.2.160-1 ./

View File

@ -4,7 +4,7 @@
Summary: Scripts for Zabbix monitoring
Name: zabbix-agent-addons
Version: 0.2.159
Version: 0.2.160
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
@ -106,6 +106,9 @@ fi
%endif
%changelog
* Thu Jan 20 2022 Daniel Berteaud <dbd@ehtrace.com> 0.2.160-1
- Add a {#DOCKER_CONTAINER_STATUS} LLD macro (dbd@ehtrace.com)
* Thu Jan 20 2022 Daniel Berteaud <dbd@ehtrace.com> 0.2.159-1
- Update Docker template (dbd@ehtrace.com)
- Don't query state in docker discovery (dbd@ehtrace.com)

View File

@ -31,7 +31,8 @@ if ($what =~ m/^containers?/){
$format = '{' .
'"{#DOCKER_CONTAINER_ID}":"{{ .ID }}",' .
'"{#DOCKER_CONTAINER_IMAGE}": "{{ .Image }}",' .
'"{#DOCKER_CONTAINER_NAME}":"{{ .Names }}"' .
'"{#DOCKER_CONTAINER_NAME}":"{{ .Names }}",' .
'"{#DOCKER_CONTAINER_STATUS}":"{{ .Status }}"' .
'}';
$cmd = "$docker container list --all --format '$format'";
} elsif ($what =~ m/^networks?/){