I think I already have that, I am having this configured service health-check { # this is the default configuration using the simple PING->PONG # example health-check. executable = script -p /bin/health-check.sh inet_listener health-check { port = 5001 } } bash-5.0# /bin/health-check.sh HTTP/1.1 200 OK Connection: keep-alive OK -----Original Message----- Subject: Re: Health check curl example Your health check script should implement HTTP protocol. Then you can use passthrough mode and use cURL. The provided script does not speak HTTP. Aki On 24/11/2019 15:12 Marc Roos via dovecot < dovecot at dovecot.org> wrote: I am not understanding how this health check[1] script should work. From the commandline it works fine when I type a PING I get a PONG. But how do I do a curl to this 5001 port? Tried something like this: bash-5.0# curl http://localhost:5001/ curl: (56) Recv failure: Connection reset by peer bash-5.0# curl http://localhost:5001/PING curl: (56) Recv failure: Connection reset by peer [1] https://doc.dovecot.org/admin_manual/health_check/ --- Aki Tuomi
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Yes. The passthrough option is rather new. </div> <div> <br> </div> <div> Aki </div> <blockquote type="cite"> <div> On 24/11/2019 15:28 Marc Roos via dovecot < <a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> wrote: </div> <div> <br> </div> <div> <br> </div> <div> I think I already have that, I am having this configured </div> <div> <br> </div> <div> service health-check { </div> <div> # this is the default configuration using the simple PING->PONG </div> <div> # example health-check. </div> <div> executable = script -p /bin/health-check.sh </div> <div> inet_listener health-check { </div> <div> port = 5001 </div> <div> } </div> <div> } </div> <div> <br> </div> <div> bash-5.0# /bin/health-check.sh </div> <div> HTTP/1.1 200 OK </div> <div> Connection: keep-alive </div> <div> <br> </div> <div> OK </div> <div> <br> </div> <div> <br> </div> <div> <br> </div> <div> <br> </div> <div> <br> </div> <div> -----Original Message----- </div> <div> Subject: Re: Health check curl example </div> <div> <br> </div> <div> Your health check script should implement HTTP protocol. Then you can </div> <div> use passthrough mode and use cURL. </div> <div> <br> </div> <div> The provided script does not speak HTTP. </div> <div> <br> </div> <div> Aki </div> <div> <br> </div> <div> On 24/11/2019 15:12 Marc Roos via dovecot < <a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> </div> <div> wrote: </div> <div> <br> </div> <div> <br> </div> <div> I am not understanding how this health check[1] script should work. </div> <div> From </div> <div> the commandline it works fine when I type a PING I get a PONG. But </div> <div> how </div> <div> do I do a curl to this 5001 port? </div> <div> <br> </div> <div> Tried something like this: </div> <div> <br> </div> <div> bash-5.0# curl <a href="http://localhost:5001/" rel="noopener" target="_blank">http://localhost:5001/</a> </div> <div> curl: (56) Recv failure: Connection reset by peer </div> <div> <br> </div> <div> bash-5.0# curl <a href="http://localhost:5001/PING" rel="noopener" target="_blank">http://localhost:5001/PING</a> </div> <div> curl: (56) Recv failure: Connection reset by peer </div> <div> <br> </div> <div> [1] </div> <div> <a href="https://doc.dovecot.org/admin_manual/health_check/" rel="noopener" target="_blank">https://doc.dovecot.org/admin_manual/health_check/</a> </div> <div> <br> </div> <div> <br> </div> <div> --- </div> <div> Aki Tuomi </div> </blockquote> <div> <br> </div> <div class="io-ox-signature"> <pre>--- Aki Tuomi</pre> </div> </body> </html>
How do I check the standard script then on this port 5001 from the command line? This one of alpine linux also does not have it yet bash-5.0# dovecot --version 2.3.7.2 (3c910f64b) -----Original Message----- Subject: RE: Health check curl example Yes. The passthrough option is rather new. Aki On 24/11/2019 15:28 Marc Roos via dovecot < dovecot at dovecot.org> wrote: I think I already have that, I am having this configured service health-check { # this is the default configuration using the simple PING->PONG # example health-check. executable = script -p /bin/health-check.sh inet_listener health-check { port = 5001 } } bash-5.0# /bin/health-check.sh HTTP/1.1 200 OK Connection: keep-alive OK -----Original Message----- Subject: Re: Health check curl example Your health check script should implement HTTP protocol. Then you can use passthrough mode and use cURL. The provided script does not speak HTTP. Aki On 24/11/2019 15:12 Marc Roos via dovecot < dovecot at dovecot.org> wrote: I am not understanding how this health check[1] script should work. From the commandline it works fine when I type a PING I get a PONG. But how do I do a curl to this 5001 port? Tried something like this: bash-5.0# curl http://localhost:5001/ curl: (56) Recv failure: Connection reset by peer bash-5.0# curl http://localhost:5001/PING curl: (56) Recv failure: Connection reset by peer [1] https://doc.dovecot.org/admin_manual/health_check/ --- Aki Tuomi --- Aki Tuomi