Search Log Files
This Solution describes how to search your logs for a word, phrase, or regular expression, and how to search logs from a specific time period.
A Solution is a step-by-step guide for accomplishing a specific task, designed to make sense even if you're just getting started with Scalyr server monitoring. If you're new to Scalyr, you should read the short Getting Started guide. For help with other tasks, see the Solutions directory.
1. The Scalyr Agent should be installed on the server(s) you want to monitor, and should be configured to upload the log file(s) you want to search.
- In the navigation bar, click .
- Find each server in the list at the bottom of the page.
- Verify that each log file is listed next to the appropriate server.
If any server is not listed:
- If you have not installed the agent on this server, follow the Agent Installation guide.
- If you have already installed the agent, consult the Agent Troubleshooting guide.
If any log file is not listed:
- Follow the instructions in the Upload Multiple Log Files solution.
1. Open the log(s) to search.
- To search all logs, simply click in the navigation bar.
- To search a particular log, click , and click the link for the desired log file from the desired server.
2. To search for a word, such as "warning", you can simply type it in the Expression box:
To search for a phrase, enclose it in quotes:
To search for a regular expression, place a $ before the quotes:
Then click thebutton to search.
If, in step 1, you opened a specific log, the Expression box will contain some search terms selecting that log. Add your search term either before or after:
"deadline exceeded" ($logfile='/var/log/tomcat6/accesslog') $serverHost='your-server-name'
3. To search logs from a specific time period, edit the Time Range reference for details.and boxes of the search form, and click the button to search. You can use a variety of date and/or time formats. See the