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

enhancement in tsuru unit names #1160

Closed
mwduarte opened this issue Apr 9, 2015 · 7 comments
Closed

enhancement in tsuru unit names #1160

mwduarte opened this issue Apr 9, 2015 · 7 comments

Comments

@mwduarte
Copy link

mwduarte commented Apr 9, 2015

Hi all, monitoring tools like zabbix use Docker's container name to display statistics and metrics about docker containers.

Actually your provisioner for Docker is starting units (Docker containers) disassociated from Tsuru App names:

CONTAINER IMAGE NAME
f38c20134f7f 10.0.2.5:3030/tsuru/app-staticapp:v4 5d89a412bffb45b45200
ac6886b616e0 10.0.2.5:3030/tsuru/app-staticapp:v4 7f886d0fbc053268490c
59b75aeec3f5 10.0.2.5:3030/tsuru/app-php-roger:v1 1dc52b858a670ece33c3
2de8bdb2a5d3 10.0.2.5:3030/tsuru/app-goapp:v2 8d80ce42c3c838c0db20
55b31fbdc06a 10.0.2.5:3030/tsuru/app-teste-andre:v15 e68ad01f9b6c9f7b6d55
f1e99e07c43b 10.0.2.5:3030/tsuru/app-lucas:v12 56c1c2cd91ae6eb41db7
e7b5e5d760ab 10.0.2.5:3030/tsuru/app-postgresapi:v2 a77ccd093dd1f9df0d9b
8f81ae580c64 10.0.2.5:3030/tsuru/app-mongoapi:v13 265593476e0eb43ffdb9
9c127ce1c4e4 10.0.2.5:3030/tsuru/app-blog:v6 38ba8eaa4f3ba62861e6
5a0de9db199d 10.0.2.5:3030/tsuru/app-mysql-api:v1 ffdfe3d8cbe2cc28e331
f6e318168ef6 10.0.2.5:3030/tsuru/app-tsuru-dashboard:v1 eb54ad666e2076ec68d7

I undestand that this is fine for indexing and searching unit names for referencing it, but It may be useful associate the Docker field NAME to Tsuru App Name, you may concat this pieces of information together.

Are you planning to do this? Is this in your roadmap for futures milestones?

Thanks.

Best Regards.

@fsouza
Copy link
Contributor

fsouza commented Apr 9, 2015

Hi @mwduarte, that's indeed a great idea! We can prepend the name of the app to the container name. We could have something like:

CONTAINER    IMAGE                                      NAME
f38c20134f7f 10.0.2.5:3030/tsuru/app-staticapp:v4       staticapp/5d89a412bffb45b45200
ac6886b616e0 10.0.2.5:3030/tsuru/app-staticapp:v4       staticapp/7f886d0fbc053268490c
59b75aeec3f5 10.0.2.5:3030/tsuru/app-php-roger:v1       php-roger/1dc52b858a670ece33c3
2de8bdb2a5d3 10.0.2.5:3030/tsuru/app-goapp:v2           goapp/8d80ce42c3c838c0db20
55b31fbdc06a 10.0.2.5:3030/tsuru/app-teste-andre:v15    teste-andre/e68ad01f9b6c9f7b6d55
f1e99e07c43b 10.0.2.5:3030/tsuru/app-lucas:v12          lucas/56c1c2cd91ae6eb41db7
e7b5e5d760ab 10.0.2.5:3030/tsuru/app-postgresapi:v2     postgresapi/a77ccd093dd1f9df0d9b
8f81ae580c64 10.0.2.5:3030/tsuru/app-mongoapi:v13       mongoapi/265593476e0eb43ffdb9
9c127ce1c4e4 10.0.2.5:3030/tsuru/app-blog:v6            blog/38ba8eaa4f3ba62861e6
5a0de9db199d 10.0.2.5:3030/tsuru/app-mysql-api:v1       mysql-api/ffdfe3d8cbe2cc28e331
f6e318168ef6 10.0.2.5:3030/tsuru/app-tsuru-dashboard:v1 tsuru-dashboard/eb54ad666e2076ec68d7

What do you think?

@fsouza fsouza added the easy label Apr 9, 2015
@mwduarte
Copy link
Author

mwduarte commented Apr 9, 2015

That's great.

When you think it will be available? Next release? Soon in build night?

I attached bellow, some itens we can monitor using Jangaraj's (https://github.com/jangaraj/Zabbix-Docker-Monitoring) Docker monitoring module for zabbix.

This way will be very easy to manage Tsuru Apps and physical resources using this tool that we already use at enterprise level to monitor, alert and remediate issues.

captura de tela 2015-04-09 as 16 27 27

captura de tela 2015-04-09 as 16 25 34

captura de tela 2015-04-09 as 16 25 03

captura de tela 2015-04-09 as 16 24 00

Regards

@fsouza
Copy link
Contributor

fsouza commented Apr 9, 2015

@mwduarte definitely in the next release. It may be available in the nightly package/master at some point in the next week. This is really easy to do, just prepend the name of the app in this code: https://github.com/tsuru/tsuru/blob/master/provision/docker/actions.go#L100.

Something like:

contName := args.app.GetName() + "/" + randomString()

@jblancett
Copy link
Contributor

👍 this is awesome love this idea!

@lucaspwbx
Copy link
Contributor

@mwduarte are you or anyone from the team working on this issue? If not, I'd gladly open a PR 😄

lucaspwbx added a commit to lucaspwbx/tsuru that referenced this issue Apr 15, 2015
@mwduarte
Copy link
Author

Hi @lucasweiblen, I understood that @fsouza and the active contributors of the tsuru project will do it, if not and if you are familiar, it will be better if you can make this improvement, I can do it but (and I would be very glad doing it, this is an amazing project) I'm starting contributing to the project and, at this time, I'm not know enough about the process to do it.

Thanks in advance.

Regards.

@andrewsmedina
Copy link
Contributor

@mwduarte anyone can contribute with tsuru. To contribute is just send a pull request :)
You can see the docs about how to contribute http://docs.tsuru.io/en/stable/contributing/index.html . But if you need help let us know.

@lucasweiblen feel free to work in this issue

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

No branches or pull requests

6 participants