Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard variable to query in logs #109

Open
chisheun-snsoft opened this issue Nov 8, 2024 · 0 comments
Open

Dashboard variable to query in logs #109

chisheun-snsoft opened this issue Nov 8, 2024 · 0 comments

Comments

@chisheun-snsoft
Copy link

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant