Forum Discussion

HankLiu_159320's avatar
HankLiu_159320
Icon for Nimbostratus rankNimbostratus
Sep 17, 2014

What port does TCP or HTTP monitor use by default for send string GET /

What port does TCP or HTTP monitor use by default for send and receive string if protocol isn't specified.

 

e.g. GET /var/www/html/string.txt

 

3 Replies

  • The built-in monitors will by default use the port(s) assigned to the pool members. So an HTTP monitor assigned to a pool of port 80 servers will use port 80.

     

  • So with TCP monitor, I would need to specify a port to go with it? If so, could you give me an example? Also, is there any way to view the content of the receive string?

     

  • I believe just about every built-in monitor will, by default, use the port defined in the assigned pool. So for a TCP monitor assigned to a pool of port 80 web servers, the monitor is going to attempt to complete a TCP 3-way handshake with the pool members on port 80. And an HTTP monitor will do a GET or POST to the web server on port 80.

    Some of the monitors actually have a debug option, which creates a monitor-specific log file in /var/log. For HTTP and TCP monitors, your best bet is probably a tcpdump on the internal interface.

    tcpdump -lnni 0.0 -Xs0 port 80 [and any additional filters]    
    

    The -Xs0 will disable capture truncation and set snaplen so that the protocol payload is sent to standard out.