Hey everyone. How are you all? I'm trying to set a...
# support
g
Hey everyone. How are you all? I'm trying to set a bot on my slack, to show my logs... everything is working 'fine' haha but there is one kind of log that I don't want to see.. and I can't find a way to make it work. Right now this is my SQL: SELECT toStartOfInterval(fromUnixTimestamp64Nano(timestamp), INTERVAL 1 MINUTE) AS interval, toFloat64(count()) as value FROM signoz_logs.distributed_logs_v2 WHERE timestamp BETWEEN {{.start_timestamp_nano}} AND {{.end_timestamp_nano}} AND body LIKE '%"level":"ERROR"%' GROUP BY interval; I would like to remove all the logs where the k8s.pod.name = 'signoz-0' I've tried a lot of different ways, but couldn't find one that works. Can someone help me?
h
https://signoz.io/docs/userguide/logs_clickhouse_queries/#number-of-log-lines-generated-by-each-kubernetes-cluster Have you tried
Copy code
AND (
  mapContains(resources_string, 'k8s.pod.name') -- is a pod log
  AND resources_string['k8s.pod.name' != 'signoz-0' -- but not this pod
)
g
API responded with 500 - Something went wrong status: error in clickhouse queries Got this error.
h
Alternatively... you're querying Clickhouse directly so it sounds like you're self hosted. In your Signoz Logs UI, mouseover the pod name field and use Filter Out Value:
then either look at your Signoz logs or Clickhouse sytem.query_log to see what WHERE clause the UI executed
Query error above likely because I'm missing a closing bracket
]
on the second clause... but that's the general idea
g
Yeah, got it! It's working now! Thanks