RabbitMQ Error while retrieving data from rabbitHost
Wilhelamm opened this issue · 2 comments
Hi guys, I'm getting this error when I try to get the metrics of the rabbit exporter, I'm using an administrator user to log in to the exporter.
time="2023-07-27T12:47:21Z" level=error msg="Error while retrieving data from rabbitHost" error="<nil>" host="http://10.216.1.31:15672" statusCode=401
@Wilhelamm I had the same issue when I was using the HELM chart.
For some reason when passing the username and password under the rabbitmq object in the values.yaml
as described in the doc I was getting 401.
It started working as soon as I started using environment variables with a ConfigMap object as described here
So it should look like that..
values.yaml:
rabbitmq:
configMapOverrideReference: "rabbitmq-exporter-cm" # --> your configmap
configmap.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: rabbitmq-exporter-cm
data:
RABBIT_URL: "http://<RABBIT_ADDRESS>:15672"
RABBIT_USER: "guest"
RABBIT_PASSWORD: "guest"
Perhaps you are not using K8S, but passing the variables as environment variables will probably have the same effect