Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
awit-backstep
awit-backstep-traceback
Commits
0b139722
Commit
0b139722
authored
Oct 16, 2018
by
Nigel Kukard
Browse files
Retry zabbix_sender 3 times before giving up
parent
7cfe0b89
Changes
1
Show whitespace changes
Inline
Side-by-side
backstep-traceback
View file @
0b139722
#
!/usr/bin/perl
#
backstep
-
traceback
-
Client
software
for
the
AWIT
Backstep
server
#
Copyright
(
c
)
2010
-
201
7
,
AllWorldIT
#
Copyright
(
c
)
2010
-
201
8
,
AllWorldIT
#
#
This
program
is
free
software
:
you
can
redistribute
it
and
/
or
modify
#
it
under
the
terms
of
the
GNU
General
Public
License
as
published
by
...
...
@@ -2678,7 +2678,9 @@ sub zabbixReport
}
# Check result of close
my ($res,@data) = runCommand(
my $res;
for (my $try = 1; $try < 4; $try++) {
($res,my @data) = runCommand(
"zabbix_sender",
"--config",$globalConfig{'zabbix-config'},
"--with-timestamps",
...
...
@@ -2702,6 +2704,14 @@ sub zabbixReport
if
(
defined
($
data
[
0
])
&&
$
data
[
0
]
ne
""
)
{
printLog
(
LOG_ERROR
,
"ZABBIX: - STDOUT log below
\n
- - - - - - - - - -
\n
%s
\n
- - - - - - - - - -
\n
"
,$
data
[
0
]);
}
#
Retry
printLog
(
LOG_ERROR
,
"ZABBIX: - Retrying... #$try"
);
sleep
(
10
);
#
Success
}
else
{
last
;
}
}
return
$
res
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment