finding out Gerrit server version when having URL - gerrit

What's the most reliable way of finding out what's the version of a Gerrit server if the only thing I have is its URL? I want to get that info programatically, as an anonymous user.
For example:
checking https://android-review.googlesource.com/ should give me
"2.7-rc2-637-g76c7890"
https://gerrit.chromium.org -- "2.5.4"
https://git.eclipse.org/r/#/ -- "2.6.1"
and so on
Ideally, I would like to be able to recognize ancient versions like 2.1.x as well.

Related

authentication failures with external users

I am trying to have SCM Manager accept users from my organization so they can log in using their Windows username and password. I have installed the LDAP plugin, but it still doesn't recognize my own windows username and password from my organization
I don't really understand - I think I shouldn't even need LDAP and some kind of basic authentication should be able to figure out my username password on windows active directory etc type of thing...
Do I need the SSL to do this? It says various things about a binding problem.
I am using the custom LDAP profile. I put wsproxy in the proxy server area and enabled. I have no idea what that means but it was the same configuration that I saw in a previous installation of SCM-server that worked with organizational credentials on windows server.
This problem occurred after upgrading from version 1.6 to 2.9.
Though I was not the person who set it up on v1.6.
UPDATE: what's needed is not LDAP plugin, but rather understanding how to configure active directory for SCM - previously, in 1.X versions active directory plugin worked under the hood - now it needs to be configured and I have no idea how -- also the active directory plugin for 1.X is no longer available - if you could provide me with that code I might be able to see how it connects to AD and then go from there on version 2.X - any chance you can get me access to the code of https://bitbucket.org/sdorra/scm-manager/wiki/active-directory-plugin??
We have an issue for the LDAP plugin saying that the migration of the ldap password may fail (though I cannot reproduce this), so maybe this happened with your migration, too. Proxy settings should not play any part in this game, because as far as I know company ldaps aren't behind a proxy.
The configuration for 2.x should be the same as for 1.60. We haven't changed anything here. So first I would try to reenter the "Connection Password". If this still fails, please use the "Test connection" feature. Enter a valid authentication here. This tells you, on what level the connection fails and may show you an exception with further information.
Feel free to post your results here for further investigation.

Configuring smart monitoring tools in Zabbix Agent and Server 4

I am trying to use this to monitor hdd health:
https://share.zabbix.com/storage-devices/smartmontools/smart-monitoring-with-smartmontools-lld
I have followed the steps for the agent and server (at least that is my understanding) and would like to know how can I check the monitoring status. even though I might only get an alert in the dashboard if something goes wrong, I would like to see the current status, understand if monitoring is working and everything is ok.
I have followed the linux agent installation steps here: https://github.com/v-zhuravlev/zbx-smartctl
I have also imported the template on the zabbix frontend, and associated the template with the server being monitored.
What now? How can I check if this is working? It seems like there is something missing, but I am not sure where or how to check.
UPDATE:
I am using this template (which mentions Zabbix 3.4) even though I am using Zabbix 4. Since the template in Zabbix Share mentioned it was compatible with 3.4+, I assume this is not an issue: https://github.com/v-zhuravlev/zbx-smartctl/blob/master/Template_3.4_HDD_SMARTMONTOOLS_2_WITH_LLD.xml
Now you should go to "Latest data" and select your server as a host.
You will get the list of the discovered items where you will find the items related to the disk health.
Then, try to select an item and build with it a graph for example and put it in a dashboard.

How to display log for Rails application?

I have a rails app and I would like to display the log in the app itself. This will allow administrators to see what changes were recently made without entering the console and using the file with the logs. All logs will be displayed in the application administration. How is it possible to implement and what kind of gems do I need to use?
You don't need a Gem.
Add a controller, read the logfiles and render the output in HTML.
Probably need to limit the number of lines you read. Also there might be different log files to chose from.
I don't think this is a good idea though. Log files are for finding errors and you should not need them in your day to day work, unless you manage ther server.
Also they might contain sensitive data (CC Numbers, Pwds, ...) and it might get complicated when you use multiple servers with local disks.
Probably better to look at dedicated tools for this and handle logs outside of your application.
Assuming that you have git associated with your application or git bash installed in your system.
For displaying log information for the development mode, migrate to your application folder in your console/terminal and type tail -f log/development.log

How to make use of .jsp LDAP code and other java files in ruby on rails?

I am very exited to join this community. Here is my problem.
I am doing a project in ruby on rails which basically is to develop an interface to take applications from people then run some algorithm like Gale-Shapely for example in background after deadline and then output the results in a new page. I had the gale shapely algo coded in Java and C++ languages. The problem is we have to contact LDAP server in our institute in-order to verify the credentials of the person who is willing to fill the form. And there is a proper Java code written for that purpose which should only be used in order to contact LDAP server as per our insti rules. I ran the .jsp code by installing tomcat7 and it is working perfectly. But, now the problem I had written some code for filling form etc.. in ruby on rails. But, I am not able to use this .jsp file in the login form in rails. I searched a lot on net but I didnt found any.
Apart from this another problem is how to run my java Gale-Shapely code in background? One solution is again re-writing the entire code in ruby and use database info to run algo. Is there any method that I can give my database info to this java program and capture its output?
I solved this by using netldap gem present in rails. I realized that similar to the java code which uses an LDAP library, there is this netldap library in ruby. So, I used it to get the credentials and verify the identity of person and also to get other details from LDAP server.

Using an old version of N2CMS, how can I use .no instead of /no to change language?

The project I am working with is using an old version (v.2.1.0.1) of N2CMS.
To start with, I want to avoid upgrading to the latest N2 version, not because I don't like new things (because I do) but because since I am using such an old version it would take a lot of efford trying to upgrade it and if there's a way to solve this issue in a more time efficient way then I need to do that instead.
What I need to do is to enable the url to set the languageroot for the website and having it not only rely on the /lang. For example, i want my website.se to point towards /sv and my website.no to point towards /no. Right now .se is default so no matter the URL, swedish is the language shown. The twist is, and the reason for why I need it done this way, that I am loading data from another database and showing it on the site, list of categories and products (/keyrings for example). These things don't have the /sv or /no in the url. The result here is that even if I get /no to working along side the .no url, as soon as I click on an item in that list without the language code in the url then I will automatically be redirected to the default swedish languageroot. So I want to completely rely the N2CMS languageroot on the URL and not the /lang. I know that this is possible in the later versions of N2CMS but I am hoping there's a workaround in the older versions as well.
In this version I have a startpage and under the startpage i have languageroots. Each language root has the option to enter an URI Name, in my case i have swedish and norwegian so that's /sv and /no. An example from the site could look like this: /sv/om-oss, the norwegian way would be /no/om-oss.
In the later versions (that I use for other and newer projects) I have just the startpage and in its settings I am able to enter the hostname, this is what I want for my site (not necessarily have it changable in N2CMS, it's easier to just have it coded in).
Does anyone have any experience in this, or knowledge deeper than mine when it comes to these sort of things?
Just for record, this problem got solved http://n2cms.codeplex.com/discussions/397494

Resources