Basics
Write your first query and learn how to filter, summarize, and combine results.
The basics of querying the Logship backend database.
Kusto
You can use the Kusto Query Language (KQL) to query your Logship database. This assumes you already have a Logship deployment running; if not, start with Getting Started.
Example query
Hop on over to the query page on your deployment (or on the public site).
A simple query listing all of the accessible tables in your database. This uses the special schema namespace, which stores all sorts of interesting information about the database.
schema.tables
| project TableName, DatabaseName
| limit 100Shape and filter data
datatable(timestamp:datetime, value:int64)
[now() - 30s, 1, now() - 20s, 1, now(), 1]
| where timestamp > ago(15m)
| summarize events = count() by bin(timestamp, 1m)Join across schemas
schema.extents
| summarize rows = sum(RowCount) by TableId
| join kind=inner schema.tables on TableId
| project TableName, rows
| top 10 by rows descSave a query
- In the UI, click Save after running a query to keep it for dashboards and alerts.