grafana / alloy

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

docker-compose example fails to provision dashboards #1035

Open tpaschalis opened 2 weeks ago

tpaschalis commented 2 weeks 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 days 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.