Skip to content
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 ​

TR7 WEB-CLI · sys-cmd wget
# 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 ​

SubjectBehavior
ContextThe request is sent from within the selected v-device and route table.
FileIf -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>.
DurationIt closes when the download is complete; it is stopped with Ctrl+C.
RecordingEvery run is written to the user logs.

Frequently Used Parameters ​

ParameterWhat it doesWhat is written after it
-qHides the progress and information messages—
-O-Writes the content to the screen instead of to a file—
-SWrites the response headers of the server as well—
-TDetermines the timeout durationSeconds
--headerAdds a header to the request"Header: value"
--no-check-certificateSkips 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 ​

TR7 WEB-CLI · A) The content of the version page
admin@TR7LBWAF01> sys-cmd wget -qO- http://10.20.0.30/version
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) A health address with a self-signed certificate, with a 5 second limit
admin@TR7LBWAF01> sys-cmd wget -qO- -T 5 --no-check-certificate https://10.20.0.30:8443/health
admin@TR7LBWAF01>  
TR7 WEB-CLI · C) Together with the response headers
admin@TR7LBWAF01> sys-cmd wget -S -O- http://10.0.7.20/
admin@TR7LBWAF01>  
TR7 WEB-CLI · D) Save the content to a temporary file
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 -S are 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 list is used.
  • For a detailed HTTP diagnosis (the method, the body, the redirect, the TLS detail) curl is used.