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