grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.47k stars 221 forks source link

docker-compose example fails to provision dashboards #1035

Open tpaschalis opened 5 months ago

tpaschalis commented 5 months ago

What's wrong?

If you navigate to the examples folder and try to docker compose up -d you'll notice the alloy-example-provision-dashboards-1 container failing to start with a message about jsonnet function.

The isEmpty function has been available in Jsonnet since version 0.20.0, so it may be one of the dependencies but the grizzly version we're pinned against uses an older version

https://github.com/grafana/alloy/blob/main/example/images/grizzly/Dockerfile#L6 https://github.com/grafana/grizzly/blob/v0.2.1/Dockerfile#L2

Steps to reproduce

Try to start up the docker-compose example

System information

Windows 11N

Software version

main (96aa51c)

Configuration

No configuration needed

Logs

$ docker logs -f alloy-example-provision-dashboards-1
time="2024-06-12T10:47:48Z" level=fatal msg="RUNTIME ERROR: Field does not exist: isEmpty\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:7:16-27\tthunk <clusterTemplateQuery> from <function <anonymous>>\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:70:23-43\tthunk from <thunk from <function <anonymous>>>\n\t/etc/alloy-mixin/dashboards/utils/dashboard.jsonnet:74:14-19\tobject <anonymous>\n\tField \"query\"\t\n\tField \"query\"\t\n\tArray element 2\t\n\tField \"list\"\t\n\tField \"templating\"\t\n\tField \"spec\"\t\n\tField \"alloy-cluster-node.json\"\t\n\tField \"dashboards\"\t\n\tDuring manifestation\t\n"
time="2024-06-12T10:47:49Z" level=fatal msg="RUNTIME ERROR: Field does not exist: isEmpty\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:7:16-27\tthunk <clusterTemplateQuery> from <function <anonymous>>\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:70:23-43\tthunk from <thunk from <function <anonymous>>>\n\t/etc/alloy-mixin/dashboards/utils/dashboard.jsonnet:74:14-19\tobject <anonymous>\n\tField \"query\"\t\n\tField \"query\"\t\n\tArray element 2\t\n\tField \"list\"\t\n\tField \"templating\"\t\n\tField \"spec\"\t\n\tField \"alloy-cluster-node.json\"\t\n\tField \"dashboards\"\t\n\tDuring manifestation\t\n"
time="2024-06-12T10:47:49Z" level=fatal msg="RUNTIME ERROR: Field does not exist: isEmpty\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:7:16-27\tthunk <clusterTemplateQuery> from <function <anonymous>>\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:70:23-43\tthunk from <thunk from <function <anonymous>>>\n\t/etc/alloy-mixin/dashboards/utils/dashboard.jsonnet:74:14-19\tobject <anonymous>\n\tField \"query\"\t\n\tField \"query\"\t\n\tArray element 2\t\n\tField \"list\"\t\n\tField \"templating\"\t\n\tField \"spec\"\t\n\tField \"alloy-cluster-node.json\"\t\n\tField \"dashboards\"\t\n\tDuring manifestation\t\n"
time="2024-06-12T10:47:50Z" level=fatal msg="RUNTIME ERROR: Field does not exist: isEmpty\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:7:16-27\tthunk <clusterTemplateQuery> from <function <anonymous>>\n\t/etc/alloy-mixin/dashboards/utils/templates.libsonnet:70:23-43\tthunk from <thunk from <function <anonymous>>>\n\t/etc/alloy-mixin/dashboards/utils/dashboard.jsonnet:74:14-19\tobject <anonymous>\n\tField \"query\"\t\n\tField \"query\"\t\n\tArray element 2\t\n\tField \"list\"\t\n\tField \"templating\"\t\n\tField \"spec\"\t\n\tField \"alloy-cluster-node.json\"\t\n\tField \"dashboards\"\t\n\tDuring manifestation\t\n"
....
thampiotr commented 5 months ago

When I tried to address this I ran into another issue with grizzly :( https://github.com/grafana/grizzly/issues/456#issuecomment-2182784343 May be worth to wait until it is resolved if anyone wants to pick this up.

github-actions[bot] commented 4 months ago

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it. If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue. The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity. Thank you for your contributions!

athrael-soju commented 1 month ago

There's a fix for this here: https://github.com/athrael-soju/grafana-alloy-example