How to search events with Lumi
This tutorial builds on the Quickstart and shows you how to run a set of example queries in Imply Lumi.
The steps assume that you've already:
- Added web logs to Lumi using the file upload feature.
- Viewed and queried events in Lumi.
To complete the steps, you use sample web traffic data from a fictional online store. For details about the dataset and its format, see the tutorial data overview.
The following diagram summarizes the end-to-end process of searching events with Lumi. Click any box in the diagram to jump to that step.
Prerequisites
To complete the tutorial, you need the following:
- An up-to-date version of the sample log file uploaded to Lumi.
Refer to the Quickstart for instructions. - Access to Lumi with the Viewer role or higher.
For information on roles and permissions, see Manage roles.
Make sure you're familiar with the Lumi explore view, including the time range selector. To retrieve similar results to those shown below, set the time range to the past 7 days.
The events list displays the Time and Content columns by default. Click a column heading and select Add column to the left/right to display additional columns that are relevant to each query.
1. Collect traffic insights
Site traffic data provides you with information on the volume, timing, and sources of site visits. It's useful for marketing, site performance monitoring, and identifying UX and engagement issues.
Quick queries
Run these queries to explore overall traffic volume, behavior, and sources.
| Use case | Query |
|---|---|
| Retrieve successful page loads. | method=GET status=200 |
| Show requests with known referers. | referer=* |
| Show successful mobile traffic from Android users. | (method=GET OR method=POST) status=200 useragent="*Android*" |
Detailed examples
This section contains targeted queries that explore specific traffic flows and their origins.
-
Run the following query to show all successful requests that originated from another page:
(method=GET OR method=POST) status=200 referer=*Example output:
TimeMethodStatusReferer01 May, 22:36:28.000GETokhttps://www.tiktok.com/02 May, 06:36:16.000GETokhttps://www.bing.com/03 May, 08:35:45.000GETokhttps://search.yahoo.com/04 May, 03:33:54.000GETokhttps://www.ebay.com/05 May, 19:31:16.000GETokhttps://www.etsy.com/ -
Run the following query to show successful referrer transitions to product pages:
uri=/product referer=* status=200Example output:
TimeUri_pathRefererStatus01 May, 22:28:37.000/product/eclipse-wall-sconcehttp://duckduckgo.comok02 May, 06:38:02.000/product/orion-pendant-lighthttp://www.aliexpress.comok03 May, 14:42:35.000/product/aurora-chandelierhttp://www.etsy.comok04 May, 21:45:35.000/product/aurora-chandelierhttp://twitter.comok
2. Analyze user behavior
These queries help you understand how individual users interact with the site. They’re useful for UX research, personalization strategies, and behavioral segmentation.
Quick queries
Run the following queries to examine individual users’ actions and interactions across the site.
| Use case | Query |
|---|---|
| Filter activity by a specific user. | user=sallyosborne |
| Show registration page visits. | uri=/register |
| Show search activity. | uri=/search method=POST |
| Return the activity of two specific users. | user IN (bernd73,michelle00) |
Detailed examples
This section contains structured queries to reveal user journeys or combined behavior patterns.
-
Run the following query to show searches performed by specific users, or any access to the trending page:
(user IN (jaredevans, admin*) AND uri=/search) OR uri = /trendingExample output:
TimeUserUri01 May, 22:38:18.000jaredevans/search01 May, 12:20:21.000admin728/trending02 May, 08:57:49.000fosternicole/trending03 May, 10:50:47.000admin001/search03 May, 21:48:56.000admin728/search04 May, 01:44:09.000admin123/trending05 May, 19:19:57.000admin001/search -
Run the following query to show users of Windows devices who viewed product pages successfully, and navigated from the
/shoppage:uri_path="/product/*" status=200 useragent="*Windows*"Example output:
UserUriUseragentpeter8888/product/eclipse-wall-sconceMozilla/5.0 (Windows NT 10.0; Win64; x64)...michelle00/product/orion-pendant-lightMozilla/5.0 (Windows NT 10.0; Win64; x64)...
3. Track inventory activity
Inventory data reflects how products are browsed, added to carts, and updated. These queries support merchandising, stock control, and operational monitoring.
Quick queries
Run the following queries to monitor product views, cart activity, and inventory updates.
| Use case | Query |
|---|---|
| Show product page views, which can imply interest or demand. | uri=/product method=GET |
| Show cart actions. | uri=/cart method=POST |
| Fetch low stock items. | uri_path=/admin/inventory-alerts |
| Show when a specific user updated stock via a POST method. | uri=/inventory method=POST user=davidbarry |
| Show when staff exported stock data. | uri_path=/admin-export/* |
Detailed examples
This section contains queries that return specific inventory-related activity from the sample data.
-
Run the following query to reveal customer interest in specific products:
uri_path IN (/product/stellar-floor-lamp,/product/aurora-chandelier,/product/eclipse-wall-sconce) method=GETExample output:
Uri_pathUserReferer/product/aurora-chandelierethelmcdonaldhttps://www.facebook.com/product/stellar-floor-lampmichelle00/product/stellar-floor-lampalexander9122https://www.facebook.com/product/aurora-chandelier-https://twitter.com./product/eclipse-wall-sconceadam9928https://www.retailmenot.com/product/aurora-chandeliermiltonle -
Run the following query to return all events where a user added a product to their cart using a
POSTrequest:uri="/cart" method=POSTExample output:
UriUserHostReferer/cartmarnie9928web-01https://www.tiktok.com/cartadmin374web-01https://www.retailmenot.com/cartalexander9122web-01https://www.linkedin.com -
Run the following query to identify real users (not bots) who searched for products:
uri_query=* NOT useragent=*bot*Example output:
UserUri_pathUri_queryRefererjaredevans/searchq=smart+bulbhttps://www.amazon.comhorace778/searchq=smart+bulbhttps://www.forbes.comannabel883/searchq=ceiling+lighthttps://techcrunch.comfelicity9923/searchq=chandelierhttps://www.youtube.combernd73/searchq=chandelierhttps://www.ebay.com
4. View errors and anomalies
These queries help identify failed requests, potential bugs, suspicious behavior, and unauthorized access attempts. They’re useful for security audits and debugging.
Quick queries
Run the following queries to detect failed requests, bots, and potentially unauthorized actions.
| Use case | Query |
|---|---|
| Show failed requests. | status IN (400,404,500) |
| Show direct traffic. | referer=*direct* |
| Display known bot activity. | useragent="*bot*" |
Detailed examples
This section contains queries to uncover specific suspicious and failed actions in the sample data.
-
Run the following query to detect unauthorized delete actions:
user!=admin* uri_path=/admin/inventory/delete*Example output:
Uri_pathMethodUser/admin/inventory/delete/stellar-floor-lampDELETEbernd73/admin/inventory/delete/aurora-pendantDELETEmarnie9928 -
Run the following query to identify client-side errors that occurred specifically on product pages:
uri_path="/product/*" status IN (400,404)Example output:
UriUserStatus/product/eclipse-wall-sconceadam9928notice/product/stellar-floor-lampkennethjohnsonnotice
5. Monitor performance
Performance queries focus on server load, response timing, and infrastructure usage. They’re useful for operations, DevOps teams, and load testing.
Quick queries
Run the following queries to view system activity and identify performance patterns.
| Use case | Query |
|---|---|
| Retrieve logs on a specific Splunk® server. | splunk_server=observe-01 |
| Display traffic for a specific index and host. | index=main host="web-01" |
| Display large successful responses. | bytes > 5000 status=200 |
| Show events for a specific IAM key. | #iamKeyId="2594bc4b-ea43-400e-854a-8ae9b4f5a8bb" |
Detailed examples
This section contains queries to identify system activity patterns.
-
Run the following query to show requests to product pages that involved large responses (more than 5000 bytes):
uri_path="/product/*" bytes>5000Example output:
TimeUriUserBytes01 May, 22:58:10.000/product/stellar-floor-lampalexander9122732602 May, 14:53:47.000/product/nebula-table-lampalexander9122711303 May, 08:51:22.000/product/aurora-chandelierwillowlim718904 May, 11:51:22.000/product/eclipse-wall-sconceadmin374517505 May, 16:51:22.000/product/eclipse-wall-sconcedorothy33218065 -
Run the following query to identify requests that returned status 200 (OK) but had a very small response size. This potentially points to minimal or blank page responses or server-side issues returning incomplete data:
status=200 bytes<1000 method=GETExample output:
TimeUriUserBytes01 May, 23:31:58.000/cartlena6296702 May, 06:31:58.000/categoriesadrian15571803 May, 10:31:58.000/categoriesdorothy332150303 May, 11:31:58.000/adminalice99716504 May, 22:31:58.000/categoriessallyosborne760
Learn more
See the following topics for more information:
- Search events with Lumi for details on supported search syntax and search limitations.
- Tour Lumi for an introduction to the Lumi UI.
- File upload reference for more details on file upload.