using plugin metrics-reporter-prometheus to monitor Gerrit internals with Prometheus

I want to monitor Gerrit daemon with Prometheus.How to configure Gerrit's plugin metrics-reporter-prometheus and Prometheus for white-box monitoring ?Disclaimer: This exporter mostly exposes Gerrit daemon internal metrics, generated from Dropwizard metric. Project count, pending reviews ... are not reportedNote 2: I am not interested in using the generic exporters (JMX exporter, Javamelody...)This exporters typical metrics looks like:# HELP caches_disk_cached_git_tags Generated from Dropwizard metric import (metric=caches/disk_cached/git_tags, ...Read more

Gerrit: prevent self review and only allow self submit at the same time

I want to achieve these 2 goals at the same time:The code author can't approve (+2) to his own review.If the review has been approved by others, only author himself can perform "submit".For the 1st goal, I've made it according to : the 2nd goal, currently in the gerrit I'm using, everyone of the project can click the "submit" button in the review. This is not expected.Could you please help to figure this out?...Read more

Gerrit Code Review - Retrieve file content from Change Edit

Has anyone successfully constructed the correct url to retrieve the file content from this endpoint?All my attempts have resulted in a status 404.The documentation is confusing in this link is the example it providesGET /changes/{change-id}/edit/path%2fto%2ffilethis is data from gerrit.{ "branch": "BR16516", "change_id": "Ieb84eb99147fc39d3e117fe61eef8389d2f64611", "change_number": "52490", "change_revision": "2", "file_name": "sql/BR165...Read more

Creating folders in gerrit base path?

I created a git folder and named git and configured it with gerrit . After gerrit installation , All Projects.git repository appeared in the git folder . I want to create a repository in a folder inside git folder . I gave the command ssh -p 29418 reviewboardname gerrit create-project folder1/first .gitIn the git folder a folder1 was created and inside that first.git repo is created .Now I take a git clone of first.git repository and add some changes . I push the changes for review with command git push reviewboard/gerrit/folder1/first HEAD:ref...Read more

Send gerrit metrics to graphite

I have gerrit and graphite in my centos 7 vm. I have installed metrics-reporter-graphite plugin in gerrit. This is my metrics-reporter-graphite.config file[graphite] host = ## Local host name## port = 2003 prefix = gerritbut metrics are not coming in graphite. This is my log file[2017-09-13 05:27:08,720] [metrics-graphite-reporter-1-thread-1] WARN com.codahale.metrics.graphite.GraphiteReporter : Unable to report to at com.codahale.metrics.graphi...Read more

Shibboleth protected Gerrit installation

I'm attempting to setup a new Gerrit installation with auth.type HTTP. Gerrit is deployed to Tomcat6 instance with apache frontend and accessible via ajp. I have success using HTTP Basis auth AuthType Basic AuthName "Gerrit Code Review" AuthBasicProvider file AuthUserFile /var/www/gerritpw Require valid-userI would like to protect Gerrit using Shibboleth: AuthType shibboleth ShibRequestSetting requireSession 1 Require valid-userError encountered when using Shibboleth:The HTTP server did not provide the username in the Authorization h...Read more

How to not get lost reviewing Gerrit reviews comments?

Hey guys I'm having a problem forgetting to answer gerrit reviews comments. I'm wondering if there is any way to summarize all gerrit comments (from all patch sets with its respective replies). Let me give a example:Me -> P1Review1 -> comments 1a, 1b, 1c;Me -> P2 (without answer any comments)Me -> P3Me -> 1a done, 1c done;Me -> P4Review1 +1, +2, finished;How can I see that we forget to address the comment 1b ?Bye...Read more

gerrit - How to get count of all user patches?

I went through the api doc to get the data from it. I want to get the details of count of all the commits that a user made with the username. Is there any possible way to perform it. I tried searching many of the API's but I could not find a suitable one. Is there any API to get the count of all commits of a specific user? if not then how to perform it?...Read more

gerrit - Team commits grouped by a member

I use the following URL to see a team member's commits: want to see commits from all members, so I wrote this URL: OR ... owner:memberN)+ status:openNow I have the commits from all team members, but they are not grouped by a member. Could you please tell me the correct URL?...Read more

How to trigger multiple builds on a gerrit commit?

I have gerrit project integrated with Jenkins Server. When i push a commit into gerrit then a jenkins build is triggered for windows OS(configured parameter) only. Now i want the gerrit to trigger a build on linux OS as well. So how do we configure such that a commit into gerrit triggers two builds one on Windows OS and the other one on Linux OS ?Could anyone suggest on how to achieve this ?...Read more

How to migrate gerrit 2.16 to gerrit 3.0 ? "--migrate-to-note-db" is not a valid option

I upgraded to latest stable 2.* version, now following the doc, I try to upgrade from 2.16 to 3.0, and I have this error (trying to migrate from PostgresSql to NoteDB): $ java -jar gerrit-3.0.0.war init -d ~/gerrit --migrate-to-note-dbfatal: "--migrate-to-note-db" is not a valid optionOr by a restart : [...]Exception in thread "main" You appear to be upgrading from a 2.x site, but the NoteDb change migration was not completed. See documentation: more