SigNoz / dashboards

A collection of SigNoz dashboard templates in JSON format for monitoring popular services such as MySQL, MongoDB, APM, JVM, and more. Easily import and customize these dashboards to visualize your application’s performance and metrics with SigNoz.
Apache License 2.0
36 stars 49 forks source link

Dashboard variable to query in logs #109

Open chisheun-snsoft opened 1 week ago

chisheun-snsoft commented 1 week ago

Querying specific text in logs, count the number of that and showing in the panel based on the variable "cluster name". For example, the value from panel will reflect to variable selected from dashboard. Can anyone guide me on how to write the query as well?

Screenshot 2024-11-07 at 11 22 03 PM

SELECT toStartOfInterval(fromUnixTimestamp64Nano(timestamp), INTERVAL 1 MINUTE) AS ts, toFloat64(count()) AS value FROM signoz_logs.distributed_logs_v2 WHERE (timestamp >= {{.start_timestamp_nano}} AND timestamp <= {{.end_timestamp_nano}}) AND body LIKE '%/test/test1%' AND body LIKE '%HTTP/1.1" 200%' GROUP BY ts ORDER BY ts ASC;