Nico Bellack
10/24/2024, 11:43 AM{
"body": "{\"cpu0.p_cpu\":0.5,\"cpu0.p_system\":0,\"cpu0.p_user\":0.5,\"cpu1.p_cpu\":0.5,\"cpu1.p_system\":0.1,\"cpu1.p_user\":0.4,\"cpu_p\":0.55,\"environment\":\"production\",\"hostname\":\"cf-production-app-02\",\"system_p\":0.05,\"user_p\":0.5}",
"id": "2nsj5xS7GmYAZ0LzWrZ582QWqbQ",
"timestamp": "2024-10-24T11:14:57.298656942Z",
"attributes": {},
"resources": {},
"severity_text": "",
"severity_number": 0,
"span_id": "",
"trace_flags": 0,
"trace_id": ""
}
how can i, say, create a simple "value" panel that shows me the average for system_p
over the selected time period? the problem is that i cannot use Avg
in the query builder with a sub-field of body it seems. i cannot set Avg
- body.system_p
. i get a 500. only thing i have managed is displaying the amount of log entries, but nothing about the content of an entry.
i'm using self-hosted signoz and ingest logs via the otel-collector on port 4318.
i'm very thankful for a hint! 🙂nitya-signoz
10/24/2024, 4:56 PMnitya-signoz
10/24/2024, 4:56 PMnitya-signoz
10/24/2024, 4:57 PMNico Bellack
10/28/2024, 8:44 AMNico Bellack
10/28/2024, 11:27 AMseverity_number = 0
. i add an "Add" processor that adds the field attributes.foo
with value foo
. but it doesn't show in the previewed processings. i must be doing something essential wrong...Nico Bellack
10/28/2024, 11:34 AMbody.environment = production
i get all the preview results. but when i save this and try to add a json processor (just like the docs suggest), i get this error a lot:
{
"level": "error",
"ts": 1730115251.3416162,
"caller": "router/transformer.go:59",
"msg": "Failed to process entry",
"kind": "processor",
"name": "logstransform/pipeline_test",
"pipeline": "logs",
"operator_id": "router_signoz",
"operator_type": "router",
"error": "running if expr: interface conversion: interface {} is map[string]interface {}, not string (1:21)\n | body != nil && body matches \"^\\\\s*{.*}\\\\s*$\"\n | ....................^",
"stacktrace": "<http://github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/router.(*Transformer).Process|github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/router.(*Transformer).Process>\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza@v0.111.0/operator/transformer/router/transformer.go:59\ngithub.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor.(*logsTransformProcessor).converterLoop\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor@v0.111.0/processor.go:213"
}
nitya-signoz
10/28/2024, 11:37 AMNico Bellack
10/28/2024, 11:38 AMNico Bellack
10/28/2024, 11:40 AMNico Bellack
10/28/2024, 11:41 AMnitya-signoz
10/28/2024, 11:43 AMFrom body["error_message"]
To attributes["error_message"]
Nico Bellack
10/28/2024, 11:46 AMNico Bellack
10/28/2024, 11:46 AMNico Bellack
10/28/2024, 11:48 AMNico Bellack
10/28/2024, 11:48 AMattributes_bool
key by the way? what does this tell me?nitya-signoz
10/28/2024, 11:49 AMNico Bellack
10/28/2024, 11:50 AMgit pull
before starting the containers again.Nico Bellack
10/28/2024, 11:50 AMcommit 952ab580234f9c8093d116f745603ca511d4c6a1 (HEAD -> develop, origin/develop, origin/HEAD)
Author: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Date: Mon Oct 28 14:06:43 2024 +0530
chore: bump signoz-otel-collector version (#6290)
Nico Bellack
10/28/2024, 11:52 AMdocker-compose-minimal.yaml
so i don't start the example apps.Nico Bellack
10/28/2024, 11:55 AMnitya-signoz
10/28/2024, 11:56 AMnitya-signoz
10/28/2024, 12:01 PMfrom: body
to: attributes.tmp
Nico Bellack
10/28/2024, 12:01 PMNico Bellack
10/28/2024, 12:04 PM=> /tmp/signoz-otel-collector.err <==
{"level":"info","timestamp":"2024-10-28T12:02:48.278Z","caller":"signozcol/collector.go:121","msg":"Collector service is running"}
{"level":"error","timestamp":"2024-10-28T12:02:48.278Z","caller":"opamp/server_client.go:216","msg":"failed to apply config","component":"opamp-server-client","error":"failed to reload config: /var/tmp/collector-config.yaml: collector failed to restart: failed to build pipelines: failed to create \"logstransform/pipeline_test\" processor, in pipeline \"logs\": failed to set outputs on route: operator e42d25f2-fdf3-4b96-9666-7bb3d10788e1 does not exist: {\"operator_id\":\"router_signoz\"}","stacktrace":"github.com/SigNoz/signoz-otel-collector/opamp.(*serverClient).onRemoteConfigHandler\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/opamp/server_client.go:216\ngithub.com/SigNoz/signoz-otel-collector/opamp.(*serverClient).onMessageFuncHandler\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/opamp/server_client.go:199\ngithub.com/open-telemetry/opamp-go/client/types.CallbacksStruct.OnMessage\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opamp-go@v0.5.0/client/types/callbacks.go:162\ngithub.com/open-telemetry/opamp-go/client/internal.(*receivedProcessor).ProcessReceivedMessage\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opamp-go@v0.5.0/client/internal/receivedprocessor.go:131\ngithub.com/open-telemetry/opamp-go/client/internal.(*wsReceiver).ReceiverLoop\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opamp-go@v0.5.0/client/internal/wsreceiver.go:57\ngithub.com/open-telemetry/opamp-go/client.(*wsClient).runOneCycle\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opamp-go@v0.5.0/client/wsclient.go:243\ngithub.com/open-telemetry/opamp-go/client.(*wsClient).runUntilStopped\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opamp-go@v0.5.0/client/wsclient.go:265\ngithub.com/open-telemetry/opamp-go/client/internal.(*ClientCommon).StartConnectAndRun.func1\n\t/home/runner/go/pkg/mod/github.com/open-telemetry/opamp-go@v0.5.0/client/internal/clientcommon.go:197"}
nitya-signoz
10/28/2024, 12:05 PMNico Bellack
10/28/2024, 12:07 PMpiepline_test
anymore. i have removed it and renamed the processors.Nico Bellack
10/28/2024, 12:07 PMNico Bellack
10/28/2024, 12:08 PMRaj Kamal
10/28/2024, 12:09 PMRaj Kamal
10/28/2024, 12:10 PMNico Bellack
10/28/2024, 12:11 PMbody.environment EXISTS
either, or something like that. i ingest my logs through opentelemetry, and all information i can influence is the content of the body
.
=> what can i do to run a pipeline over all logs that are coming in?Raj Kamal
10/28/2024, 12:28 PMbody != nil
as a filter - that will match all logs except logs with body containing a string with value "nil"Raj Kamal
10/28/2024, 12:29 PMNico Bellack
10/28/2024, 12:30 PMNico Bellack
10/28/2024, 12:30 PMnitya-signoz
10/28/2024, 12:32 PMattributes.tmp.<key>
directly and check as well?Raj Kamal
10/28/2024, 12:33 PMRaj Kamal
10/28/2024, 12:34 PMNico Bellack
10/28/2024, 12:36 PMRaj Kamal
10/28/2024, 12:37 PMRaj Kamal
10/28/2024, 12:37 PMNico Bellack
10/28/2024, 12:38 PMNico Bellack
10/28/2024, 12:39 PMRaj Kamal
10/28/2024, 12:39 PMNico Bellack
10/28/2024, 12:39 PMnitya-signoz
10/28/2024, 12:40 PMresources["deployment.enviroment"]
if you move your environment here it will work.Nico Bellack
10/28/2024, 12:40 PMNico Bellack
10/28/2024, 12:40 PMnitya-signoz
10/28/2024, 12:41 PMNico Bellack
10/28/2024, 12:42 PMnitya-signoz
10/28/2024, 12:43 PMNico Bellack
10/28/2024, 12:49 PMNico Bellack
10/28/2024, 12:51 PMThat environment is mapped tothis doesn't work BTW. the pipeline won't get deployed, it will show Deployment Failed inif you move your environment here it will work.resources["deployment.enviroment"]
Change History
. will provide a screenshot in a secRaj Kamal
10/28/2024, 12:52 PMtry usingresource["deployment.enviroment"]
nitya-signoz
10/28/2024, 12:52 PMRaj Kamal
10/28/2024, 12:52 PMNico Bellack
10/28/2024, 12:54 PMRaj Kamal
10/28/2024, 12:56 PM[]
.
resource["deployment.enviroment"]
Nico Bellack
10/28/2024, 12:56 PMNico Bellack
10/28/2024, 12:56 PMNico Bellack
10/28/2024, 12:56 PMNico Bellack
10/28/2024, 12:57 PMNico Bellack
10/28/2024, 12:58 PMNico Bellack
10/28/2024, 12:59 PMresource["deployment.hostname"]
?Nico Bellack
10/28/2024, 1:02 PMNico Bellack
10/28/2024, 1:06 PMresource["deployment.hostname"]
nor resource["deployment.host.name"]
or resource["deployment.host"]
seem to work for this field. what's the expected name, @Raj Kamal? 😄Nico Bellack
10/28/2024, 1:07 PMNico Bellack
10/28/2024, 1:10 PMRaj Kamal
10/28/2024, 1:10 PMRaj Kamal
10/28/2024, 1:10 PMnitya-signoz
10/28/2024, 3:06 PMresource["hostname"]
Nico Bellack
10/28/2024, 3:53 PMNico Bellack
10/28/2024, 3:54 PMnitya-signoz
10/28/2024, 4:15 PMNico Bellack
10/30/2024, 5:16 PMNico Bellack
10/30/2024, 5:16 PMnitya-signoz
11/01/2024, 5:08 AM