Code Monkey home page Code Monkey logo

Comments (10)

oliver006 avatar oliver006 commented on August 21, 2024 1

That's trying to connect to localhost but from within the context to your container, that shouldn't be valid. Try passing the actual address of the redis container (in my docker-compose example that's redis://redis-server:6379).

from redis_exporter.

fragtom avatar fragtom commented on August 21, 2024

Same for me, I couldn't find any solution, to receive specific keys here.. Had you already success?

In my case, only some info e.g. redis_up is available.. not more..

redis_up{addr="prod.redis",endpoint="http-metrics",instance="172.31.19.191:9121",job="redis-exporter",namespace="monitoring",pod="redis-exporter-2724175770-gtzsg",service="redis-exporter"}

from redis_exporter.

Fadih avatar Fadih commented on August 21, 2024

no it's not working for me ,im using this grafana templates https://github.com/oliver006/redis_exporter/tree/master/contrib
and it's failed to pull all the metrics from the template

from redis_exporter.

oliver006 avatar oliver006 commented on August 21, 2024

Using this minimal docker-compose file:

version: '2'

services:
  redis-server:
    image: redis:3.2.10
    ports:
      - 6379:6379

  redis-exporter:
    image: oliver006/redis_exporter:v0.11.3
    ports:
      - 9121:9121
    entrypoint: /bin/redis_exporter -redis.addr redis://redis-server:6379

First, docker-compose up

If you now run curl -s localhost:9121/metrics | grep redis_

I see all the redis_ metrics as expected.

How are you running / configuring the redis_exporter ?

from redis_exporter.

Fadih avatar Fadih commented on August 21, 2024

hi
im running this command
docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter -redis.addr redis://localhost:6379 -redis.password 'haha'

my redis server is running as a service and not as docker command

and i got only this metrics

redis_exporter_build_info{build_date="2017-07-07-00:38:29",commit_sha="cd1eb0b4f99abe4014387d80fd127f575129055d",golang_version="go1.8.1",version="v0.11.3"} 1
redis_exporter_last_scrape_duration_seconds 0.001154443
redis_exporter_last_scrape_error 1
redis_exporter_scrapes_total 21
redis_up{addr="redis://localhost:6379",alias=""} 0

from redis_exporter.

Fadih avatar Fadih commented on August 21, 2024

now it's working you are right the problem was with the localhost

from redis_exporter.

Fadih avatar Fadih commented on August 21, 2024

thanks a lot

from redis_exporter.

oliver006 avatar oliver006 commented on August 21, 2024

Good to hear it's working now!

from redis_exporter.

fragtom avatar fragtom commented on August 21, 2024

I found out, that in my case problems with DNS caused the problem.. The telnet prod.redis 6379 works..

that did not work
REDIS_ADDR=tcp://prod.redis:6379 /bin/redis_exporter -web.listen-address :9122 -check-keys connected_clients

error message:
INFO[0173] redis err: dial tcp: lookup prod.redis on 172.31.0.2:53: no such host

using the IP directly works..
REDIS_ADDR=tcp://10.100.123.75:6379 /bin/redis_exporter -web.listen-address :9122 -check-keys connected_clients

from redis_exporter.

nikesh-devaki avatar nikesh-devaki commented on August 21, 2024

In my case, redis was configured to open only local connections. Then updated bind parameter in /etc/redis/redis/conf to accept external connection and restarted redis service. It resolved.

from redis_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.