Skip to content

Commit c32719c

Browse files
Leonardo Alminanaedsiper
authored andcommitted
upstream: added tcp keepalive settings
Signed-off-by: Leonardo Alminana <[email protected]>
1 parent f0904b3 commit c32719c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/flb_upstream.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,32 @@ struct flb_config_map upstream_net[] = {
7171
"Set maximum time allowed for an idle Keepalive connection"
7272
},
7373

74+
{
75+
FLB_CONFIG_MAP_BOOL, "net.tcp_keepalive", "off",
76+
0, FLB_TRUE, offsetof(struct flb_net_setup, tcp_keepalive),
77+
"Enable or disable the use of TCP keepalive probes"
78+
},
79+
80+
{
81+
FLB_CONFIG_MAP_INT, "net.tcp_keepalive_time", "-1",
82+
0, FLB_TRUE, offsetof(struct flb_net_setup, tcp_keepalive_time),
83+
"interval between the last data packet sent and the first "
84+
"TCP keepalive probe"
85+
},
86+
87+
{
88+
FLB_CONFIG_MAP_INT, "net.tcp_keepalive_interval", "-1",
89+
0, FLB_TRUE, offsetof(struct flb_net_setup, tcp_keepalive_interval),
90+
"interval between TCP keepalive probes when no response is"
91+
"received on a keepidle probe"
92+
},
93+
94+
{
95+
FLB_CONFIG_MAP_INT, "net.tcp_keepalive_probes", "-1",
96+
0, FLB_TRUE, offsetof(struct flb_net_setup, tcp_keepalive_probes),
97+
"number of unacknowledged probes to consider a connection dead"
98+
},
99+
74100
{
75101
FLB_CONFIG_MAP_TIME, "net.io_timeout", "0s",
76102
0, FLB_TRUE, offsetof(struct flb_net_setup, io_timeout),

0 commit comments

Comments
 (0)