stefanprodan / swarmprom

Docker Swarm instrumentation with Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having an issue with adding service monitoring.

gillesbroes2016 opened this issue · comments

When I try to monitor an application, for example Redis, I'm having issues.
My config:

*docker-compose.yml:
prometheus:
image: stefanprodan/swarmprom-prometheus
environment:

  • JOBS=redis-exporter:9121

*prometheus.yml:
job_name: 'redis-exporter'
dns_sd_configs:
names:
'tasks.redis-exporter'
type: 'A'
port: 9121
*compose-redis.yml:
version: '3'

networks:
mon_net:
external: true

services:
redis:
image: redis
networks:

  • mon_net
    ports:
  • "6379:6379"
    deploy:
    mode: global

redis-exporter:
image: oliver006/redis_exporter
networks:

  • mon_net
    ports:
  • "9121:9121"
    deploy:
    mode: global

When I run the monitoring stack and then compose-redis:

Prometheus goes up and down all the time.

Log shows:

level=error ts=2018-02-19T16:49:15.594740858Z caller=main.go:582 err="Error loading config couldn't load configuration (--config.file=/etc/prometheus/prometheus.yml): parsing YAML file /etc/prometheus/prometheus.yml: unknown fields in alertmanager config: job_name"

I have no idea how to fix this or what I did wrong.
Any help would be appreciated.

Sorry for posting in the wrong place at first.

Thanks

Thanks for reporting this, please wait 10 minutes for the new image swarmprom-prometheus:v2.2.0-rc.0 to be published on Docker Hub and give it a run. You should delete the old image from your Swarm cluster.

Hi
Sorry I was on my way home, couldn't test sooner.
Did a quick local install on my computer at home.
I think it's working now!

image

It's communicating with the exporters now, though they are not giving me any data except for how many times they have fetched the data. I suppose there is still something wrong with the link between my Redis and Redis-exporter.

However my original issue seems to be solved.

image

Also the dockerd-exporters seem to be offline, they are running though when I check with 'docker service ls'. It might have been me testing quickly.

I will test when I'm back at my internship tomorrow.

Thanks a lot for your help.

Forgot to enable the experimental mode, that's most likely why the daemon is "offline".