Monitoring memcached docker instances

#1

I’m testing out running memcached in a docker swarm and have an issue with figuring out how to monitor each instance within the swarm.

I’ve got 3 docker workers with 3 instances of memcached running on each. On the workers telegraf is installed and has inputs for both docker and memcached.

 # Read metrics about docker containers
 [[inputs.docker]]
   ## Docker Endpoint
   ##   To use TCP, set endpoint = "tcp://[ip]:[port]"
   ##   To use environment variables (ie, docker-machine), set endpoint = "ENV"
   endpoint = "unix:///var/run/docker.sock"

[[inputs.memcached]]
  # An array of address to gather stats about. Specify an ip on hostname
  # with optional port. ie localhost, 10.0.0.1:11211, etc.
  servers = ["localhost:11211"]
  # An array of unix memcached sockets to gather stats about.
  # unix_sockets = ["/var/run/memcached.sock"]

in Grafana I see data from memcached but only for one instance. How do I setup telegraf to monitor all instances of memcached? do I need to run some sort of script to update “servers” or is there some automated way?

thanks
Garry

#2

Currently you would need to update the config and send Telegraf a SIGHUP or restart it. Some are using confd to interface with a configuration store, and we are also planning to add support for configuration plugins that could do the same.

I’m still interested in user stories around discovery, so if you have an idea of how you would like it to work or if you are using any solutions you would like Telegraf to integrate with it to provide this it would be great if you commented on the issue.

#3

hi @daniel

thanks for the response, we’re just starting out with docker so I’m still trying to figure out how each instance needs to be setup and how we want to monitor.

I’ll keep an eye on that issue

thanks
Garry