Compare commits
2 Commits
1950abbc0f
...
849170c10b
Author | SHA1 | Date |
---|---|---|
Daniel Berteaud | 849170c10b | |
Daniel Berteaud | 31ccccd2e0 |
|
@ -1 +1 @@
|
|||
0.2.160-1 ./
|
||||
0.2.161-1 ./
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Summary: Scripts for Zabbix monitoring
|
||||
Name: zabbix-agent-addons
|
||||
Version: 0.2.160
|
||||
Version: 0.2.161
|
||||
Release: 1%{?dist}
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
@ -106,6 +106,9 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 21 2022 Daniel Berteaud <dbd@ehtrace.com> 0.2.161-1
|
||||
- Fix Zimbra discovery and check scripts (dbd@ehtrace.com)
|
||||
|
||||
* Thu Jan 20 2022 Daniel Berteaud <dbd@ehtrace.com> 0.2.160-1
|
||||
- Add a {#DOCKER_CONTAINER_STATUS} LLD macro (dbd@ehtrace.com)
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ my $output = {};
|
|||
|
||||
if (defined $status){
|
||||
foreach my $line (qx($zmcontrol status)){
|
||||
if ($line =~ m/^\s+(\w+)\s+(Running|Stopped)/){
|
||||
if ($line =~ m/^\s+(\w+)(\swebapp)?\s+(Running|Stopped)/){
|
||||
$output->{$1} = ($2 eq 'Running') ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@ use Getopt::Long;
|
|||
use Net::Domain qw(hostfqdn);
|
||||
use Data::Dumper;
|
||||
|
||||
my $json;
|
||||
@{$json->{data}} = ();
|
||||
my $json = [];
|
||||
|
||||
my $pretty = 0;
|
||||
my $services = 1;
|
||||
|
@ -47,7 +46,7 @@ if ($services){
|
|||
};
|
||||
foreach my $service (qx($zmprov getServer $hostname zimbraServiceEnabled)){
|
||||
if ($service =~ m/^zimbraServiceEnabled:\s+(\w+)/){
|
||||
push @{$json->{data}}, {
|
||||
push @{$json}, {
|
||||
'{#ZM_SERVICE}' => $1
|
||||
};
|
||||
}
|
||||
|
@ -55,7 +54,7 @@ if ($services){
|
|||
} elsif ($servers){
|
||||
foreach my $server (qx($zmprov getAllServers)){
|
||||
chomp $server;
|
||||
push @{$json->{data}}, {
|
||||
push @{$json}, {
|
||||
'{#ZM_SERVER}' => $server
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue