-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FeatureRequest] docker container status tag #2407
Comments
if I understand you correctly, you just want a tag that gives the docker container status? or a flag to only collect running containers? |
Thanks for your reply, we are looking on how to apply the flag to retrieve only collect the running docker containers. FYI, here is our workflow to monitor docker containers |
I actually didn't realize that it was doing that, but seeing as this would probably affect us as well, I could probably write up a quick PR for this since I'm already familiar with the code base in question. Here is what I'm thinking:
Does this make sense? |
yup this makes ton of sense. Please keep posted once it is ready to use. It would be great if someone can share some sample grafana query with the flag status for the datasource as Cloud watch |
@ssorathia you might want to wait until #2432 is merged before working on this |
Hi there, any plans on get this included? The docker plugin is missing this important feature to really monitor the state of any of the containers, which is one of the main reasons for using it in my instance. |
This is old but I'm in the same boat (or just missing how to use the feature possibly). I would like the |
It's been a while since I looked at this one, but it seems like this issue was resolved some time ago with the
It may also be useful to control which containers are collected with the ## Container states to include and exclude. Globs accepted.
## When empty only containers in the "running" state will be captured.
## example: container_state_include = ["created", "restarting", "running", "removing", "paused", "exited", "dead"]
## example: container_state_exclude = ["created", "restarting", "running", "removing", "paused", "exited", "dead"]
# container_state_include = []
# container_state_exclude = [] |
Closed in #4259 |
Feature Request
Opening a feature request kicks off a discussion.
Proposal:
How to apply Tag or Filter within telegraf.conf to retrieve the metrics for only running containers ignoring all the dead containers. In this case we have total 8 active running containers and 15 dead containers in the docker host. we have the telegraf.conf directly running on the docker host. So when getting the docker metrics through the telegraf instead of 8 as number of containers we are getting total of 23 containers which includes even dead containers too. Please guide on how to apply the filter/tag on telegraf.conf to pull only 8 running dockers. All our running containers have the STATUS of "UP 3 weeks" and dead containers are with STATUS Of "Exited". Not sure if we can use this a filter or tag to retrieve the running containers
######Sudo docker info######
[centos@ip-10-204-71-175 etc]$ sudo docker info
Containers: 23
Running: 8
Paused: 0
Stopped: 15
######Telegraf conf######
[[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"
'# Only collect metrics for these containers, collect all if empty
container_names = []
Current behavior:
Desired behavior:
Number of Docker containers as "8" which is active running containers count
Use case: [Why is this important (helps with prioritizing requests)]
Currently the number of 23 docker containers are misleading though we have only 8 running containers when looking at grafana dashboard. This is very critical to setup to telegraf integrating with Grafana as part of production monitoring
The text was updated successfully, but these errors were encountered: