#1199  prometheus monitoring
Open
Andreas Wachter opened 1 year ago

is there any way to monitor OneDev via prometheus or any other monitoring tool?

Robin Shen commented 1 year ago

No such ability yet.

Robin Shen changed fields 1 year ago
Name Previous Value Current Value
Type
Discussion
New Feature
bufferUnderrun commented 1 year ago

is there any way to monitor OneDev via prometheus or any other monitoring tool?

Interesting. What you want monitor you can't already done with prometheus ?

Andreas Wachter commented 1 year ago

Basically statistics from Onedev itself. Garbage collection, CPU usage, memory, threads and so on. Repository stats would also be nice: repositories, commits, branches, tags, builds, issues, and whatever else you can think of.

It would be nice to have such metrics to create a dashboard in Grafana. For me as a devops engineer, the performance and build metrics would be great. But for management and sales people, a Grafana dashboard with total issues, resolved issues, and a commit chart would be very helpful.

Matthias Gramberg commented 1 year ago

Grafana looks super useful Plugin creation documents

Unknown commented 1 year ago

This would be a good idea, but I also feel it would be more Onedev style to include the statistics inhouse instead of serving it over promethius to a frontend such as grafana.

After all Robin you have told me yourself you want onedev to be an all in one solution without any other dependencies, therefore inhouse would be preferable for this.

Robin Shen commented 1 year ago

I guess offering some metrics for Prometheus will not introduce extra dependencies. This should be doable within JVM.

OneDev will certaily not packaing tools like Prometheus, but can offer some integration point for them.

Unknown commented 1 year ago

@robin My point was to possibly include a statistics page within the instance administration section, to have the statistics builtin, seen as that is the idea of onedev, to be a all in one solution, prevents the average user from having to configure prometheus and then a frontend for it, they can just go to administration and then see all the statistics.

You were the one who told me you do not want users having to install other software to use a feature!

Robin Shen commented 1 year ago

@robin My point was to possibly include a statistics page within the instance administration section, to have the statistics builtin, seen as that is the idea of onedev, to be a all in one solution, prevents the average user from having to configure prometheus and then a frontend for it, they can just go to administration and then see all the statistics.

Of course OneDev can include some stats, but it does not mean it should not offer metrics to external tools.

You were the one who told me you do not want users having to install other software to use a feature!

@polarian I can not remembered I said this.

Unknown commented 1 year ago

@polarian I can not remembered I said this.

When we discussed a separate IRC daemon for the onedev distribution written in C, so that onedev did not need to handle tons of IRC connections, and how it would be more efficient. You told me to have everything built in as you did not want features having to depend on external sources. You also did not want it to be platform specific.

Of course OneDev can include some stats, but it does not mean it should not offer metrics to external tools.

Never said not to include external links, you offer a fully featured API for onedev, I do not see why prometheus shouldn't be added, what I am trying to say though it would also be useful to have this information which you serve to prometheus also on the administration section of the instance.

Robin Shen commented 1 year ago

When we discussed a separate IRC daemon for the onedev distribution written in C, so that onedev did not need to handle tons of IRC connections, and how it would be more efficient. You told me to have everything built in as you did not want features having to depend on external sources. You also did not want it to be platform specific.

This is different case. If someone wants to implement a prometheus integration plugin in OneDev with C or other non-JVM languages, I will object to that, as you will need to package the integration plugin inside OneDev, and it hurts its cross-platform ability.

Unknown commented 1 year ago

Ah, so you cared more about cross platform than you did having everything bundled together. I thought the cross compatibility argument was just an additional no!

obviously I was misleaded :)

Robin Shen commented 1 year ago

Cross-platform is an obvious factor. Even if prometheus is written in Java, I will not package it as it is not core functionality of OneDev, and you will need to care about its setup and configuration, and many other things.

This is not one-or-none, we need to consider case by case.

Robin Shen commented 1 year ago

This is not one-or-none, we need to consider case by case.

Typo, all-or-none

jbauer commented 1 year ago

@cooperspencer I think you can get some metrics by using opentelemetry.io. It is a Cloud Native incubating project that aims to solve metrics, logging and tracing in cloud setups. The reason why you might want to check it out is that they support automatic instrumentation of a large number of Java libraries by using a Java agent and thus you do not have to change any OneDev code.

Setup of Java agent:
https://opentelemetry.io/docs/instrumentation/java/automatic/

All supported libraries that are instrumented out of the box:
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md

So you could at least get some insights about OneDev server health.

Andreas Wachter commented 1 year ago

@jbauer opentelemetry might help me at work. thanks 😀

I could also just write a onedev exporter for prometheus if it's too big a problem to integrate it. I have already started to write a golang wrapper for the onedev api.

Unknown commented 1 year ago

Ah, I am working on a Java wrapper... mind linking the golang wrapper...?

OneDev referenced from other issue 1 year ago
Andreas Wachter commented 1 year ago

Sure, there you go. I have not implemented everything and at the moment I mainly use it in gickup, but I plan to implement everything https://github.com/cooperspencer/onedev

Unknown commented 1 year ago

Mind if I mirror this to my community onedev instance (https://onedev.polarian.dev).

I might want to use it in the future :)


Andreas Wachter commented 1 year ago

Please do

Unknown commented 1 year ago

I did not expect you to ask me to xD

I did it already: https://onedev.polarian.dev/onedev-api/go


Robin Shen commented 1 year ago

@cooperspencer in case you have any restful api questions, please raise at issue #1125

bufferUnderrun referenced from other issue 2 months ago
issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Issue Votes (1)
Watchers (7)
Reference
onedev/server#1199
Please wait...
Page is in error, reload to recover