Home > Net >  Prometheus: zsh: no matches found: server.remoteWrite[0].url
Prometheus: zsh: no matches found: server.remoteWrite[0].url

Time:11-03

I try to install Prometheus in my EKS cluster for "Amazon Managed Prometheus" but I'm getting a weird error of zsh no matches found for the RemoteWrite URL that I put in.

This is the installation

helm install prometheus prometheus-community/prometheus -n amp -f ./prometheus_values.yaml \
    --set serviceAccounts.server.annotations."eks\.amazonaws\.com/role-arn"=arn:aws:iam::00000000000:role/amp-iamproxy-role \
    --set server.remoteWrite[0].url="https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-blablabla-blablabla-blablabla/api/v1/remote_write" \
    --set server.remoteWrite[0].sigv4.region=eu-west-1

The Endpoint - remote write URL is the same as the endpoint I've got in my AWS account (I checked it several times) and I still get this error

any suggestions?

CodePudding user response:

[0] can be parsed as a glob expression that matches only the character 0, so zsh is looking for files with server.remoteWrite0.url in their names. This isn't just a zsh problem; you'd get the same error from bash with the globfail option enabled (or a different error with nullglob set).

Quote the keys, not just the values; and when you don't have a specific reason to choose double quotes, use single quotes (which have much simpler parsing rules) in preference:

helm install prometheus prometheus-community/prometheus -n amp -f ./prometheus_values.yaml \
    --set 'serviceAccounts.server.annotations.eks\.amazonaws\.com/role-arn=arn:aws:iam::00000000000:role/amp-iamproxy-role' \
    --set 'server.remoteWrite[0].url=https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-blablabla-blablabla-blablabla/api/v1/remote_write' \
    --set 'server.remoteWrite[0].sigv4.region=eu-west-1'
  • Related