Enough talk and theory, let's get up and running:
- Select a windows machine for being the Jenkins master.
- Java is required for jenkins, check if installed by opening a command prompt and type "java", and press enter.
- Unless you see something similar to 'java' is not recognized as an internal or external command, operable program or batch file. you are good to go. Else you need to visit www.java.com and install java
- Next go to http://jenkins-ci.org/ and download & install Jenkins. Naturally you don't need a seperate jenkins master for Monkit, but on the other hand, why should your ClearCase performance monitoring be mixed with the continuous integration builds (because your organization are doing continuous integration - right ?)
- When Jenkins is up and running, open it's web interface, and go Jenkins -> Manage Jenkins -> Manage Plugins, select the Available Tab, find and select Monkit. We also recommend the Jenkins Job Configuration History Plugin and Locale plugin - but they are not required for Monkit, restart Jenkins for activating the new plugins.
- Then you need to visit http://code.praqma.net/ci/job/ccanalyzer/ and get the CCanalyzerService.zip, which contains the ccanalyzer.jar as well as the windows service installer.
- Tip: Unzip CCAnalyzer to a file share visilble to each of the servers you want to monitor, then for installing the service all you need is to browse to that fileshare, and run setup.cmd on each server.
- Finally, install CCAnalyzer on each server for which you want to collect data. If a server must answer on the ClearCase counters, a ClearCase Client is installation is required - but that will be full-filled on the ClearCase servers, which is the actual goal for the entire effort.
Create the Configuration XML
Copy the following into a file and save it as an xml file.
<site name="SITE01" clearcase="USACLEAR04" regions="RegionA,RegionB">
<counter name="Number of vobs" scale="number">\clearcase(*)\NumberOfVobs</counter>
<counter name="Number of views" scale="number">\clearcase(*)\NumberOfViews</counter>
<!-- No region required -->
<counter name="Number of stranded vobs" scale="number">\clearcase()\NumberOfStrandedVobs</counter>
For inpiration could check out:
<counter samples="1" interval="1" name="Memory Available" scale="Mega bytes">\Memory\Available MBytes</counter>
<counter samples="10" interval="3" name="Processor time % Privileged Time" scale="Percentage">\Processor(_Total)\% Privileged Time</counter>
<counter samples="10" interval="3" name="Processor time % User Time" scale="Percentage">\Processor(_Total)\% User Time</counter>
<counter samples="1" interval="1" name="LogicalDisk(D:) % Free Space" scale="Percentage">\LogicalDisk(D:)\% Free Space</counter>
<counter samples="3" interval="1" name="PhysicalDisk(0 C:) % Idle Time" scale="Percentage">\PhysicalDisk(0 C:)\% Idle Time</counter>
<counter samples="3" interval="1" name="PhysicalDisk(1 D:) % Idle Time" scale="Percentage">\PhysicalDisk(1 D:)\% Idle Time</counter>
The above defines 1 site (SITE01), which is made up from 2 hosts.
In the hosts
section, 2 servers are defined, the host name
value is usable by the rest of the configuration file, to get the fully qualified domain name of those servers
In the sites
the server USACLEARP04 is set to answer the ClearCase specific counters, for the ClearCase regionss RegionA and RegionB
Each server is queried for the counters in the general
section and in the specific
section USACLEARP01 is monitored for a couple of disk related counters
It goes without saying (oh ! - I just did...) that you must replace the host names, and region names. There is a good chance the the general as well as specific counters will give you results - but there is a even bigger chance that you want to modify - at least later on.
A Simple job
- Go Jenkins web-interface, and create a new job, you can name it as you like, but it should be a free-style software project.
- Consider to tick the "Discard Old Builds"
- In section "Build Triggers", we suggest you select build periodically, for instance you can use @HOURLY
- In the Build section, Add Build Step, of Execyte Windows Batch command, and enter the following:
- (if you change the site name to something else - adjust accordingly
- In section Post-build Actions:
- Tick the Monkit Report
- Enter monkit.xml in for the Monkit Report File
- Optionally: Add Coverage Metric Targets, the targets you select MUST have the same name, so if you want to go Unstable add a target named "Number of stranded vobs" and neter 0 for healty report, 1 for unhealty.
Below is an illustration of several metric targets and the values we chose.
If you on Jenkins->Manage Jenkins->Configure Jenkins already have configured Jenkins email options you can enter your email adress and get notifcations, but jenkins can report it's result in several ways, that is just a matter of adding the proper plugins.
Now Click Save, and build now !
As time passes we strongly encourage you to add all servers of your interest, as well as all the counters you find of interest.
About jenkins slaves (benefit of making each CC server a slave to the monitoring jenkins instance