adr1enbe4udou1n / blog

https://blog.okami101.io
2 stars 1 forks source link

2022/02/setup-a-docker-swarm-cluster-part-v-monitoring/ #6

Closed utterances-bot closed 1 year ago

utterances-bot commented 2 years ago

Setup a Docker Swarm cluster Part V - Monitoring · Okami101 Blog

https://blog.okami101.io/2022/02/setup-a-docker-swarm-cluster-part-v-monitoring/

jyswee commented 2 years ago

Hi Adrien, A great writeup. I am setting up prometheus as per your blog. When i include the 'configs' in the node-exporter in the yml and try to deploy the stack - i get the error: "Deployment error services.node-exporter Additional property configs is not allowed" I confirm that i have already created the config node_exporter_entrypoint in configs in portainer. I have tried to google this probem, came to a deadend. Wondering if you can confirm it worked for you? thanks Joe

jyswee commented 2 years ago

i figured it out - i changed the version from 3 to 3.7 and it worked

adr1enbe4udou1n commented 2 years ago

Thx for feedback !

I probably refactored to version '3' when redacting this guide for simplicity but I missed the compatibility check :'(

"configs" prop was added in v3.3 indeed.

I just fixed all related posts to 3.8 as default version 👌

zibellon commented 1 year ago

Hello. One question: HOW CAN I CHANGE INSTANCE LABEL ??? In grafana I see IP:PORT. I want to see - node-name (hostname) Can you help me PLEASE ....

node-export - only. No cAdvisor

adr1enbe4udou1n commented 1 year ago

Hello,

This is pretty doable with little regex gymnastic :)

All you have to do is to edit the node exporter dashboard under "Variables" section when modify "node"

Go to this section :

image

Then change this fields accordingly :

image

Use node_meta{job="$job"} in order to get the complete metric with nodename fed by node_exporter_entrypoint script file.

Then the regex magic in order to get value/text dictionary : /node_name="(?<text>[^"]+)|instance="(?<value>[^"]+)/g

The result :

image