Smarter by Design.Simpler for Business
sys-cmd wget
sys-cmd wget sends an HTTP or HTTPS request to an address from the route table selected in WEB-CLI and takes the content of the response. It is used to see the content of a health address or a version page quickly on the screen; in situations where the headers and the TLS detail are needed, curl offers more options.
Command Summary
# type wget and press Tab: a free parameter
admin@TR7LBWAF01> sys-cmd wget
<wget-parameter-1>
admin@TR7LBWAF01> sys-cmd wget -qO- <address>
admin@TR7LBWAF01>
Everything written after the word wget is passed to the tool as it is. There is no mandatory field; if the content is to be seen on the screen, -qO- is written.
How It Works
| Subject | Behavior |
|---|---|
| Context | The request is sent from within the selected v-device and route table. |
| File | If -O- is not written, the tool tries to write the content to a file in its own working area; this file does not land in the temporary file area and is not seen with the file commands. If the content is to be kept, it is printed to the screen with -qO- and saved with | to-file <name>. |
| Duration | It closes when the download is complete; it is stopped with Ctrl+C. |
| Recording | Every run is written to the user logs. |
Frequently Used Parameters
| Parameter | What it does | What is written after it |
|---|---|---|
-q | Hides the progress and information messages | — |
-O- | Writes the content to the screen instead of to a file | — |
-S | Writes the response headers of the server as well | — |
-T | Determines the timeout duration | Seconds |
--header | Adds a header to the request | "Header: value" |
--no-check-certificate | Skips the certificate verification | — |
The table summarizes frequently used parameters; the full list and behavior depend on the version of the tool on the device.
Examples
admin@TR7LBWAF01> sys-cmd wget -qO- http://10.20.0.30/version
admin@TR7LBWAF01>
admin@TR7LBWAF01> sys-cmd wget -qO- -T 5 --no-check-certificate https://10.20.0.30:8443/health
admin@TR7LBWAF01>
admin@TR7LBWAF01> sys-cmd wget -S -O- http://10.0.7.20/
admin@TR7LBWAF01>
admin@TR7LBWAF01> sys-cmd wget -qO- http://10.20.0.30/metrics | to-file backend-metrics.txt
admin@TR7LBWAF01>
Things to Know
- The headers are red on the screen. Because the response headers that come with
-Sare written to the error output of the tool, they appear in red; this is not an error. When it is connected to a pipe, these lines do not come to the screen. - For downloading the saved file, the link in the output of
file listis used. - For a detailed HTTP diagnosis (the method, the body, the redirect, the TLS detail)
curlis used.
