You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Command-line tool for accessing Scalyr services. The following commands are curr
7
7
-[**numeric-query**](#fetching-numeric-data): Retrieve numeric / graph data
8
8
-[**facet-query**](#fetching-facet-counts): Retrieve common values for a field
9
9
-[**timeseries-query**](#fetching-numeric-data-using-a-timeseries): Retrieve numeric / graph data from a timeseries
10
+
-[**download-log**](#downloading-entire-log-files): Download the entire contents of a log file
10
11
-[**get-file**](#retrieving-configuration-files): Fetch a configuration file
11
12
-[**put-file**](#creating-or-updating-configuration-files): Create or update a configuration file
12
13
-[**delete-file**](#creating-or-updating-configuration-files): Delete a configuration file
@@ -163,6 +164,56 @@ these limits.
163
164
164
165
If the clocks on the servers sending log messages to Scalyr are significantly out of sync then some messages may not appear in the live tail. For example, if you send us a new log message with a timestamp old enough that it's not in the 1,000 most recent messages when it arrives at the Scalyr servers, then it will not be displayed by the live tail tool.
165
166
167
+
## Downloading entire log files
168
+
169
+
The "download-log" command allows you to download the entire contents, or a portion, of a log file from a given server host.
170
+
171
+
The 'download-log' command is similar to the '[query](#querying-logs)' command, except it queries a specific log file from
172
+
a specific server host, and it automatically handles continuation tokens so that the entire contents of the log are downloaded
173
+
for the specified time range.
174
+
175
+
**NOTE** this command is mostly intended to simplify retrieval of agent logs and profiling/debug information generated
176
+
by the agent. For bulk exports of log data, you are better off using the bulkExport tool: https://www.scalyr.com/bulkExports
177
+
178
+
Here are some usage examples:
179
+
180
+
# Download the last 24 hours of the agent.log from prod-100
181
+
# Note: the default logfile to download is agent.log
182
+
# Also note the default query time range is the previous 24 hours
183
+
scalyr download-log --serverHost prod-100
184
+
185
+
# Download the last 4 hours of the agent.callgrind from prod-100
186
+
# Note: if a non-absolute log file is specified, download-log assumes
187
+
# the log file location is in /var/log/scalyr-agent-2/
0 commit comments