AndreyVMarkelov / prom-bitbucket-exporter

Prometheus Exporter for Bitbucket
https://marketplace.atlassian.com/plugins/ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter/server/overview
BSD 2-Clause "Simplified" License
52 stars 21 forks source link

Exporter in bitbucket data center #10

Open Zauxst opened 6 years ago

Zauxst commented 6 years ago

Hello,

How do you actually monitor with the exporter in a bitbucket datacenter? Especially if it's configured in round robin. You can't monitor the nodes individually.

Is there a solution or the ideal solution would be to configure it per node and export JVM.

AndreyVMarkelov commented 6 years ago

Not really. Actually you just need to put the count of configurations from bitbucket on prometheus.yml as you have nodes and use default label to distinguish it. Them for global metrics you will use any one and group by this metrics for JVM metrics.

Zauxst commented 6 years ago

Hey Andrey,

Thanks for taking the time to reply.

I'm having difficulty understanding your message. the problem is that the metrics inside your plugin are accessed through the load balancer thus in roundrobin configuration at each refresh you will receive 1 reply from Node Athen a reply from Node B then Node C and so forth.

When you configure Prometheus to target the datacenter you cannot export the metrics like you would export them by accessing the machines directly ( http://nodeA.company.ltd/plugins/servlet/prometheus/metrics?token=secretToken ). Bitbucket datacenter nodes are communicating through SSH, default ssh port 7999 with the load balancer.

Please take a look at their documentation here : https://confluence.atlassian.com/bitbucketserver/clustering-with-bitbucket-data-center-776640164.html in

The diagram: bitbucketdatacenter-4-node-architecture_diagram 1

This is a close enough representation of what I have configured up at this point and what I wish to monitor using your plugin.

AndreyVMarkelov commented 6 years ago

Hello,

Sorry. See the idea. Please, add all N nodes IP into prometheus.yml directly. And for each please add label with some description. Only this way it will work.

2018-05-04 1:44 GMT+03:00 Zauxst notifications@github.com:

Hey Andrey,

Thanks for taking the time to reply.

I'm having difficulty understanding your message. the problem is that the metrics inside your plugin are accessed through the load balancer thus in roundrobin configuration at each refresh you will receive 1 reply from Node Athen a reply from Node B then Node C and so forth.

When you configure Prometheus to target the datacenter you cannot export the metrics like you would export them by accessing the machines directly ( http://nodeA.company.ltd/plugins/servlet/prometheus/ metrics?token=secretToken ). Bitbucket datacenter nodes are communicating through SSH, default ssh port 7999 with the load balancer.

Please take a look at their documentation here : https://confluence.atlassian.com/bitbucketserver/ clustering-with-bitbucket-data-center-776640164.html in

The diagram: [image: bitbucketdatacenter-4-node-architecture_diagram 1] https://user-images.githubusercontent.com/6393530/39606145-83269406-4f3c-11e8-860a-51c99c8428fc.png

This is a close enough representation of what I have configured up at this point and what I wish to monitor using your plugin.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndreyVMarkelov/prom-bitbucket-exporter/issues/10#issuecomment-386459194, or mute the thread https://github.com/notifications/unsubscribe-auth/AB92cNNzA5QL87kOMppErtIlPqFeiAUVks5tu4hYgaJpZM4TuOSi .

-- -- Andrey Markelov

Zauxst commented 6 years ago

The problem is the protocol that is used to access the metrics inside the plugin is only through HTTP/HTTPS. thus when going directly on http/https (http://ip/path/to/metrics ; the same path would work on bitbucket server) because of the design of bitbucket datancenter you cannot access the metrics directly.

I'll give more thought on this matter, if I find a solution in the meantime I'll update you. ps: the license metrics are not displaying correctly.

AndreyVMarkelov commented 6 years ago

I understood. Lemme thinking please

пт, 4 Май 2018 г., 2:11 Zauxst notifications@github.com:

The problem is the protocol that is used to access the metrics inside the plugin is only through HTTP/HTTPS. thus when going directly on http/https ( http://ip/path/to/metrics ; the same path would work on bitbucket server) because of the design of bitbucket datancenter you cannot access the metrics directly.

I'll give more thought on this matter, if I find a solution in the meantime I'll update you. ps: the license metrics are not displaying correctly.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndreyVMarkelov/prom-bitbucket-exporter/issues/10#issuecomment-386463821, or mute the thread https://github.com/notifications/unsubscribe-auth/AB92cD0cNZ2P2YE2F9ONRT5YW2V3z3u0ks5tu46EgaJpZM4TuOSi .

Zauxst commented 6 years ago

Hello @AndreyVMarkelov, As a small update, I don't think this task is doable by you, this seems like a limitation in bitbucket datacenter since plugins cannot be accessible from nodes. Maybe you can investigate if you wish to make your addon Data Center compatible.

Anyway. Thanks for maintaining the plugin, you can close this issue.