This article answers the following questions:
Access logs can be displayed from the command line by using the open-source WGET utility. This software is available for Windows and Linux platforms. Windows users can take advantage of the Ubuntu application for Windows which has WGET installed by default.
(Note: WGET and Ubuntu are not Broadcom software, nor are they supported by Broadcom. This information is provided "as-is").
To display the main Access Log, run the following command (replacing the administrator account and proxy IP address as required). This displays access logs in real-time, showing any updates as they come in.
wget --http-user=admin --ask-password --no-check-certificate https://10.0.80.80:8082/Accesslog/tail-f/main -q -O -
Flag | Description |
--http-user= | Specifies the management user account of the ProxySG (default admin) |
--ask-password | WGET will prompt for the password of the user account. |
--no-check-certificate | WGET will ignore TLS certificate warnings if it does not trust the appliance's HTTPS Console certificate. |
-q | Do not print standard WGET output. |
-O - | Print response data to standard out. |
It is possible to use a range of command line tools (Linux: grep, sed, awk; Windows: find) to filter the output and display only selected text. For example, to show only log entries for Google use the following command:
Linux
wget --http-user=admin --ask-password --no-check-certificate https://10.0.80.80:8082/Accesslog/tail-f/main -q -O - | grep google
Windows
wget --http-user=admin --ask-password --no-check-certificate https://10.0.80.80:8082/Accesslog/tail-f/main -q -O - | find "google"