Additional examples :: Kloudfuse Docs

Additional examples

Here are some practical examples on how to use the Kloudfuse log searching query language, FuseQL.

Count all logs

count of``all logs``Everything``top``10 5s

* | timeslice 5s | count by (_timeslice)

This analysis works well for the following use cases:

Count all fingerprints

count of``all fingerprints``Everything``top``10 30s

* | timeslice 30s | count_unique(fingerprint) by (_timeslice)

This analysis works well for the following use cases:

Count all logs grouped by level

count of``all logs``core:level``top 10``30 s

* | timeslice 30s | count by (_timeslice, level)

This analysis works well for the following use cases:

Count all fingerprints grouped by source

count of``al lfingerprints``Core:source``top``10``5s

* | timeslice 5s | count_unique(fingerprint) by (_timeslice, source)

This analysis works well for the following use cases:

Average of a duration or number facet

avg of``@*:duration``Everything``top``10``5s

* | timeslice 5s | avg(@duration:duration_seconds) by (_timeslice)

This analysis works well for the following use cases:

Error rate formula

Core:level="error"

This analysis works well for the following use cases:

Anomaly on count of error logs

Core:level="error"

This analysis works well for the following use case:

Outlier

level="error" | timeslice 120s | count by (_timeslice, kube_namespace) | outlier (_count) by 120s, model=dbscan, eps=3

This analysis works well for the following use case: