Skip to content
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

Added docker-health tool #120

Merged
merged 1 commit into from
Sep 26, 2015
Merged

Added docker-health tool #120

merged 1 commit into from
Sep 26, 2015

Conversation

shanielh
Copy link
Contributor

Hi!

I've created the docker-health tool that I was talking about in #119

It works using the docker remote API and the /container/_/stats command (without stream).

Some open issues :

  • I could have made it better using the "streaming" mode of the stats command, But this is out of my league in Ruby
  • I could have made it run faster using some parallel for-each instead of normal for-each
  • The host that given for each container is determined by the host and container name (eg. host-container)
  • No load option for this one, because the tick time is every 10 seconds, I think that it's alright, If people will want load, they can use riemann streams to mimic the behaviour
  • The disk usage is still working using the code in riemann-health tool
  • I've added dependency on docker-api gem

This is how it looks

screen shot 2015-07-18 at 7 10 43 pm


# Get CPU, Memory and Load of each container
containers = get_containers()
containers.each do |container|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parallel For-each would have been better here.

@yahely
Copy link

yahely commented Jul 18, 2015

very nice

@shanielh shanielh force-pushed the master branch 5 times, most recently from 195ad30 to 7996620 Compare July 19, 2015 07:28
@shanielh
Copy link
Contributor Author

shanielh commented Aug 6, 2015

Hi @aphyr , 19 days passed and I haven't got your response to this pull request, meanwhile I'm using this script in my environment and I've done some fixes to it.

If you want me to update the pull request please respond, I will be happy to share it.

@aphyr
Copy link
Collaborator

aphyr commented Sep 26, 2015

Seems good to me! Thanks @shanielh. Sorry bout the delay, been incredibly busy with work and conferences recently.

aphyr added a commit that referenced this pull request Sep 26, 2015
@aphyr aphyr merged commit bb58e52 into riemann:master Sep 26, 2015
@shanielh
Copy link
Contributor Author

Kyle I've added some changes to this. I'll pull request later today. 

שני.

On Sun, Sep 27, 2015 at 2:16 AM, Kyle Kingsbury [email protected]
wrote:

Seems good to me! Thanks @shanielh. Sorry bout the delay, been incredibly busy with work and conferences recently.

Reply to this email directly or view it on GitHub:
#120 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants