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

Add the support for kafka in cAdvisor's storage, including output of container id and labels #1033

Merged
merged 2 commits into from
Jan 29, 2016

Conversation

arichardet
Copy link
Contributor

Steps to run and configure with custom broker and topic. Default broker is localhost:9092. Default topic is stats.
sudo ./cadvisor -storage_driver=kafka -storage_driver_kafka_broker_list=localhost:9092 -storage_driver_kafka_topic=stats

This will push json encoded container statistics onto the designated topic. Includes additional output of container id and labels, added to the v1 container spec.

@googlebot
Copy link
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@k8s-bot
Copy link
Collaborator

k8s-bot commented Jan 5, 2016

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@arichardet
Copy link
Contributor Author

I signed it!

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

}

// Container reference contains enough information to uniquely identify a container
type ContainerReference struct {
// The container id
Id string `json:"id"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this required for a reference, but optional for the spec? I think these should be consistent, or at least the Reference should have weaker requirements than the spec.

@carmark
Copy link
Contributor

carmark commented Jan 9, 2016

could you please re-order the import packages as the follow order:

  • golang self package
  • cadvisor package
  • third-party package

@timstclair
Copy link
Contributor

Did you run godep save? I think you're missing the sarama deps.

@timstclair
Copy link
Contributor

@k8s-bot ok to test

@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@arichardet
Copy link
Contributor Author

@timstclair I've addressed your PR feedback.

@arichardet
Copy link
Contributor Author

Travis-CI is not liking the Kafka.go header going from 2015 -> 2016

@timstclair
Copy link
Contributor

Oh yeah, that needs to be fixed.
FYI: Fix in #1047

@timstclair
Copy link
Contributor

It looks like you somehow picked up a bunch of extraneous commits. Can you try rebasing?

@arichardet
Copy link
Contributor Author

@timstclair I tried rebasing and it this is what I got 👎 I can close this PR and resubmit as a fresh one that is cleanly in one commit if thats ok.

@timstclair
Copy link
Contributor

It looks like your commits for this PR are interspersed with merged commits, in which case you might need to manually repair it. I'd suggest trying git rebase -i HEAD~35 and moving all your commits so they are grouped together at the bottom. If that doesn't fix it, try rebasing again using the instructions here: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md#keeping-your-development-fork-in-sync
EDIT: or just squash your commits into 1, that's ok too.

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@arichardet
Copy link
Contributor Author

@timstclair I was able to clean it up.

@timstclair
Copy link
Contributor

Great, but unfortunately github won't show the diff now because of all the godeps changes. Could you please move the godeps changes to a separate commit, so that I can review the other files separately? Thanks!

@arichardet
Copy link
Contributor Author

@timstclair I've separated them.

@arichardet
Copy link
Contributor Author

@timstclair Is there anything else you need me to do?

@arichardet
Copy link
Contributor Author

@timstclair should close this and resubmit a clean PR? Thanks

@timstclair
Copy link
Contributor

Sorry, I was out of office last week. I'll take a final look at this later today.

@timstclair
Copy link
Contributor

Just a few more comments. Thanks for your patience.

@arichardet
Copy link
Contributor Author

@timstclair comments addressed. Thanks

@timstclair
Copy link
Contributor

LGTM, just 1 small comment

…container id and labels

Addressing PR Feedback

Addressing PR Feedback
@arichardet
Copy link
Contributor Author

@timstclair comment addressed. Thanks

@k8s-bot
Copy link
Collaborator

k8s-bot commented Jan 28, 2016

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@timstclair
Copy link
Contributor

LGTM. Thanks!

@timstclair
Copy link
Contributor

@k8s-bot ok to test

timstclair pushed a commit that referenced this pull request Jan 29, 2016
Add the support for kafka in cAdvisor's storage, including output of container id and labels
@timstclair timstclair merged commit f5bceae into google:master Jan 29, 2016
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.

5 participants