Example queries

The following are example queries you can run in the humio-metrics repository to gain insight into performance and usage of your LogScale deployment.

View ingest per day for a repository

logscale
dataspace="$REPO_NAME"
| timechart(span=1d, function=sum(ingestBytes))

Replace $REPO_NAME with the name of the repository.

View average daily ingest per month for the year

logscale
timechart(span=1M, function=avg(ingestBytes))

This query shows the average daily ingest per month for the current year.

View segment block sizes on a dataspace

logscale
dataspace="$REPO_NAME"
| segmentBlockSizes
| groupBy(blockSize, function=count(), limit=max)
| sort(_count, order=desc)

Replace $REPO_NAME with the name of the repository (dataspace).

View metrics on live queries

logscale
#type=LiveQueryMetrics
| groupBy([aid, liveQueryId], function=[count(events), sum(eventCount), sum(eventBytes)], limit=max)
| sort(_count, order=desc)

This query shows metrics on live queries, including the number of events, total event count, and total event bytes.

View metrics on historic queries

logscale
#type=HistoricQueryMetrics
| groupBy([aid, queryId], function=[count(events), sum(eventCount), sum(eventBytes)], limit=max)
| sort(_count, order=desc)

This query shows metrics on historic queries, including the number of events, total event count, and total event bytes.

View metrics on data ingestion

logscale
#type=IngestMetrics
| timechart(span=1h, function=sum(ingestBytes))

This query shows the hourly ingest rate over time.