Hi,
Is there a way to filter hostnames based on environment ( sandbox / dev ) ?
I tried with adding labels to /etc/otelcol-contrib/config.yaml but it didn't help
processors:
attributes:
actions:
- key: "environment"
value: "development"
v
Vishal Sharma
03/30/2024, 7:26 AM
You should be able to edit variable to filter on environment with a WHERE clause.
Vishal Sharma
03/30/2024, 7:26 AM
cc: @Srikanth Chekuri
e
Evgeny Lundberg
04/02/2024, 7:29 AM
Query returns nothing
s
Srikanth Chekuri
04/02/2024, 3:52 PM
What query did you use?
e
Evgeny Lundberg
04/04/2024, 7:51 AM
Copy code
SELECT DISTINCT(JSONExtractString(labels, 'host_name'))
FROM signoz_metrics.time_series_v2
WHERE not has(JSONExtractKeys(labels), 'k8s_node_name') and has(JSONExtractKeys(labels), {{.environment}})
s
Srikanth Chekuri
04/05/2024, 3:34 PM
If this doesn't show any hosts then it means there are no metric emitting host meta data
SigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc.