Advanced grep filters for F5 logs

Grep X number of lines after matching pattern is found

[root@ltm02:Active:Standalone] config # zless /var/log/ltm* | grep -A 2 "16:03:23" -n
230:May  3 16:03:23 ltm02 notice bigd[5171]: 01060001:5: Service detected UP for ::ffff: monitor /Common/site1-http-mon.
231-May  3 16:03:24 ltm02 notice bigd[5171]: 01060001:5: Service detected UP for ::ffff: monitor /Common/site1-http-mon.
232-May  3 16:03:24 ltm02 notice mcpd[4647]: 01070727:5: Pool /Common/ member /Common/ monitor status up. [ /Common/site1-http-mon: up ]  [ was down for 3hrs:25mins:55sec ]

The above example greps 2 lines after the matching pattern “16:03:23” is found. Continue reading

Troubleshooting SSL handshake in F5 BIG-IP LTM – Part 1 (SSL/TLS Protocol Mismatch)

How to identify if there is an SSL/TLS protocol mismatch between Client and F5 LTM?

1.  Check the protocol version used by the client in wireshark captures under the “Client Hello” packetprotocol mismatch wireshark capture

2.  Check the SSL/TLS protocol version supported by the LTM for a particular VIP

  • Run curl checks if possible from a remote server
curl -Ik --sslv2
curl -Ik --sslv3
curl -Ik --tlsv1
curl -Ik --tlsv1.0
curl -Ik --tlsv1.1
curl -Ik --tlsv1.2
  • Check if any protocol is negated in ciphers under client-ssl profile;

Continue reading

Debug health monitor for a single pool member in F5 LTM

Here’s an old post that shows how to debug bigd that gets you the debugs of all the health monitors that are running on the system. The rule of thumb with debugs is that the files get too large and may have an impact on other important services that may need that extra space.

What if you want to enable the debugs for just one pool member to see what’s going on with the health monitor associated with the pool member?

Monitor logging option is a better approach than debugging the bigd for this purpose.

You can find this setting under Local Traffic > Pools > pool_name > Members > Monitor Logging


Continue reading

Using curl for troubleshooting

View only response headers

curl -I only retrieves the header of the resource. The ‘I’ is case sensitive.

root@ubnsrv01:/etc/ssl/certs# curl -I
HTTP/1.1 200 OK
Content-Length: 191
Content-Type: text/html
Last-Modified: Thu, 17 Aug 2017 21:14:18 GMT
Accept-Ranges: bytes
ETag: "40d9a1c99d17d31:0"
Server: Microsoft-IIS/7.5
Date: Sat, 02 Sep 2017 22:58:54 GMT

View response headers and content

curl -i includes the HTTP header in the output along with the site content. Since this URL is terminating on an F5, the HTTP header reports that a redirect is configured for this URL but doesn’t redirect it automatically to the URL. The ‘i’ is case sensitive.

Continue reading