Code Monkey home page Code Monkey logo

Comments (13)

bobrik avatar bobrik commented on July 28, 2024

You can only monitor containers with COLLECTD_DOCKER_APP set to something. So the easiest way of monitoring all containers is to set this variable everywhere. If app name is not set on a docker container, it cannot be monitored.

Can you explain why you want to monitor all containers, but cannot set env variable everywhere?

from collectd-docker.

sherzberg avatar sherzberg commented on July 28, 2024

I actually would like this feature too. Right now, I'm going through all of our apps json for marathon and having to add this. But it would have been nice to just say, monitor everything with no changes to our current deployment setup.

We use mesos and the docker executer for everything (we are adding more and more running containers ever day) and it would be nice to just tell collectd-docker to just monitor everything.

from collectd-docker.

bobrik avatar bobrik commented on July 28, 2024

@sherzberg isn't your problem solved with #19?

from collectd-docker.

sherzberg avatar sherzberg commented on July 28, 2024

Yes, for marathon based apps. Unfortunately we have a few non-marathon docker containers deployed so we can't rely on MARATHON_APP_ID being set all the time. So I think this issue is still a good one to implement.

from collectd-docker.

bobrik avatar bobrik commented on July 28, 2024

If we monitor everything, where do we get app name? Do we just take container name?

from collectd-docker.

sherzberg avatar sherzberg commented on July 28, 2024

That might work, the only issue is that it is random. Maybe the image name? It could even be full_image_name.tag which would be helpful to see metric differences between tags.

from collectd-docker.

bobrik avatar bobrik commented on July 28, 2024

Why would it be random? How do you run your containers?

Image and are not unique, it's common to have many containers from the same image on one host.

from collectd-docker.

sherzberg avatar sherzberg commented on July 28, 2024

The container name is randomly generated:

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
0b3e1f06302b        alpine              "sleep 1000"        2 seconds ago       Up 2 seconds                            boring_colden
d7984b865273        alpine              "sleep 1000"        7 seconds ago       Up 7 seconds                            happy_brattain

I guess we always build a new docker image for everything that is run in our environment, so I guess the image name wouldn't be unique. We just never run the same image with different commands.

from collectd-docker.

sherzberg avatar sherzberg commented on July 28, 2024

So I guess I am not sure what the best place to get the name from would be.

from collectd-docker.

bobrik avatar bobrik commented on July 28, 2024

Can you set container name in your env? Can you set env variable to use what works right now?

from collectd-docker.

sherzberg avatar sherzberg commented on July 28, 2024

I am fine with that. 99% of our containers run in marathon anyway. Thanks for talking through this though.

from collectd-docker.

xneo64 avatar xneo64 commented on July 28, 2024

@bobrik Would you consider adding the option to enable reading the container name and use that as label?
I maintain a large-ish graphite setup as part of an Ops team, and all of our applications implement a fixed container name. It would be difficult for us to manually label / orchestrate your container on hosts running multiple containers. It would be equally impractical to get the dev teams to modify their container images to include labels for us to use :)

I believe that adding this option would enable people deploying their containers with a fixed name, to easily implement your monitoring container with minimal further intervention/setup.

from collectd-docker.

bobrik avatar bobrik commented on July 28, 2024

@xneo64 I can review a PR if you want to do it.

from collectd-docker.

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.