Latest posts by khushvinder (see all)
- How to monitor window server’s mount points using ZABBIX - April 19, 2020
- How to get top five CPU and Memory consuming processes from zabbix using SNMP and PS linux command - September 26, 2019
- How to monitor Services/Processes in zabbix using SNMP? - August 17, 2019
What is Sonar/SonarQube?
SonarQube™ software (previously known as “Sonar”). Sonar is an open source Platform used by development teams to manage source code quality.
As such, Sonar provides code analyzers, reporting tools, defects hunting modules and TimeMachine as core functionality. But it also embarks a plugin mechanism enabling the community to extend the functionality (more than 35 plugins available), making Sonar the one-stop-shop for source code quality by addressing not only developers but also managers needs.
Sonar Software Installation:
1. Download the latest sonar from SonarQube Website
Note : if you are going to download SonarQube latest version which is greater then or equal to 5.6.1 then you should use JDK 8 or any upper version of java.
2. Unzip the downloaded file in any specific drive.
3. Set the path of sonar in environment variable till D:\sonar\sonarqube-5.6.1\sonarqube-5.6.1 like below:
4. After setting the path variable you can start the Sonar web server using “StartSonar” command like below:
5. If StartSonar command runs successfully then means all are good. Sonar server runs on 9000 port and its is ready to use now.
6. You can open Sonar dashboard in browser : http://localhost:9000/ and below is screenshot of dashboard
Now configuring the Sonar Runner Analysing tool.
1. Download the sonar runner from this maven repo .
2. Extract/Unzip sonar runner into a specific drive and set the SONAR_RUNNER_HOME environment variable like:
and set “SONAR_RUNNER_HOME” to path variable and append /bin like :
After all these variable pls open the command prompt and run sonar-runner command. Just to check if we set the sonar runner successfully or not. after this command output will be like this.
Creating Project & Analysing Using Sonar
1. Create a new project or you can use your ongoing project also.
2. Under the root directory of project create a file with name “sonar-project.properties”
3. For setup purpose, just change the value of sonar.projectName to the project name you created in sonar-project.properties file like.
4. Now go to root directory of project and run “sonar-runner” command.
Now this command should run success without any issue.
5. All are set now you can view the Analysing report on sonar web server dashboard like:
In next post will share how to set the rules on sonar web server.
946 total views, 2 views today