-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[GEOS-8283, GEOS-8284] Adds status-monitoring community module #2518
Conversation
7a00adb
to
ae5a871
Compare
I have few questions/suggestions here:
|
One more thing: at the moment it's not possible to fetch from status endpoint if client is not authenticated. Could we make it opened to unauthenticated clients as well? |
One more thing, i've noticed: value is mostly a string, but sometimes it's int. Even for similar metrics:
|
@nmco in my view the GeoServer license change is a major change that affects all of GeoServer and requires a GSIP. I think this is a good opportunity discuss whether we use more general language to permit any EPL-licensed code to be included without being covered by the GPL. This would give us a long term solution to the GPL-EPL conflict. GNU provide some example text for exceptions (but the language is more for native libraries): @jodygarnett is an expert on licensing issues and may be able to provide suitable text or a contact as OSGeo legal. |
Hi @bencaradocdavies I agree with you but I would split concerns here: this contribution was already discussed on the mailing list and as a result we ended up going towards the same direction of other EPL modules like EMF. Notice that GeoServer already contains exceptions for EPL, hence we are not adding an exception, we just need to mention this library as well: Line 12 in c011bc2
Line 344 in c011bc2
I am happy to help with coming up with a more general solution for this kind of problems but given the current situation and the previous exchange, I don't think we should stop this work at this point. My suggestion then is to task @nmco to take responsibility for bringing the general EPL topic to the next PSC meeting and work with Jody towards a something that would it clear in the future how to address EPL libraries. |
Right now there is only the system load average for 1 minutes indeed, the documentation of OSHI says its possible but I could not find the necessary methods in the API. I will double check this again.
The goal here was to provide only very simple system information (in my opinion load per CPU is already too much) that can be used to quickly identify that something is not right with the server. The tick count for CPUs is quite a detailed and low level metric, do you see any specific use case were having this value will help identify a general issue with the server ? The meaning of this metrics is also quite dependent on the time and that will really complicate things, right now we don't have any specific time dimension.
Identifiers can be easily retrieved from the description using the regex |
For sure this should be secured by default, publishing server details on the open internet by default doesn't seems like a good idea, to be honest I cannot even think about a use case where this is a good idea, what is your use case for this ? Anyway I need to check if it is possible to add a new element to the security chain to allow no authenticated users to access the REST end point. |
Hummm this is quite strange indeed, I will need to investigate. Thanks for the heads up. |
@simboss if there is majority support from the PSC then I am comfortable with patching the license to add an exception for OSHI as an interim measure. I do not want to delay the status-monitoring work. I think that the PSC should review the GeoServer license and take advice from @jodygarnett on where EPL is heading, but this need not delay the status-monitoring module. I will start a discussion on the mailing list. |
I agree that per-CPU metrics are not needed. We calculate cpu usage in monitoring based on ticks, but since you provide usage percentage, then maybe it would be enough. Speaking of low-level metrics, I don't think we'll use voltage/temperature/fan speed.
We can use description field for plain iface name. No need to wrap it with arbitrary string, since there's metric type that describes it already.
The thing is, code that does requests is headless, so no session information will be provided. However, maybe we could add some token or signature-based authentication. |
Actually, there's one more solution: leave this endpoint open in GeoServer, and add web-server level access restrictions (by ip for example). Consider scenario, when GeoServer is in separate network from GeoNode, and only way to access it is through public IP. This however adds some work for sysadmin when deploying monitoring. |
When I used the "low level" term I was referring to how easy is actually to interpret the metric. A quick look at the sensors values say a lot about our system, if the temperature is above 100ºC we may have a problem. But the CPU ticks will not tell much to most of the users. |
No idea what you mean where 😄 will you use the description field ? |
This seems like a very specific use case, in any case security is a separated concern that needs to be handled at an higher level (i.e. we will not implement a specific security mechanism for the status-monitoring module). The authkey module maybe the solution for your specific need. |
ae5a871
to
21f9850
Compare
21f9850
to
683eb37
Compare
Add load averages for 5 minutes and 15 minutes, add an identifier attribute that will allow the identification of the measured resource (in the case of a network interface, for example, it will be the network interface name) and fixed the JSON encoding of primitive values. |
Pull request for GeoServer license update available here: #2529. |
Associated issues:
This PR creates an extension point in
AbstractStatusPage
to allow extensions to contribute new tabs, this work is isolated in is own commit and has is own issue.This PR adds a new module that will contribute a new tab to GeoServer status page that will show system monitoring information, this information can also be retrieved through GeoServer
The work uses the OSHI library to retrieve the necessary system information, no DLL or native libraries are required. This module should work out of the box for the major operating systems, i.e. Linux, Windows and MacOX.
I have manually test this for Windows (the following images only show a small part of the available information):
and for Linux:
OSHI library is published under the Eclipse Public License 1.0, another PR will propose the necessary changes to GeoServer license page to allow the use of this library:
https://osgeo-org.atlassian.net/browse/GEOS-8285