Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Sébastien Luttringer
infrastructure
Commits
c0afd1e9
Verified
Commit
c0afd1e9
authored
Mar 22, 2018
by
Florian Pritz
Browse files
nginx-zabbix: Catch more write errors
Signed-off-by:
Florian Pritz
<
bluewind@xinu.at
>
parent
04e0e47a
Changes
1
Hide whitespace changes
Inline
Side-by-side
roles/zabbix-agent/files/nginx-zabbix.pl
View file @
c0afd1e9
...
...
@@ -35,8 +35,8 @@ sub send_zabbix {
$zabbix_sender
->
autoflush
();
}
my
$ret
=
syswrite
$zabbix_sender
,
(
sprintf
"
- %s %s
\n
",
$key
,
$value
);
if
(
not
$ret
and
$!
{
EPIPE
}
)
{
print
STDERR
"
Got EPIPE.
Restarting zabbix_sender
\n
";
if
(
not
defined
$ret
)
{
print
STDERR
"
Writing failed: '$!'
Restarting zabbix_sender
\n
";
undef
$zabbix_sender
;
send_zabbix
(
@
_
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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