Jenkins : Configure the CA APM Jenkins Plugin Properties


Configure the following required inputs to run the plugin. The sample configuration file is at the <Downloaded_Plugin_Package>\properties directory.

Configure APM REST API

Set value of introscope.public.restapi.enabled property to true In IntroscopeEnterpriseManager.properties file that is located in the <EM_HOME>\config folder.

Configure APM Connection

The APM Connection property lets you fetch performance metrics from CA APM. Modify the CA APM connection configuration section in the performance-comparator.properties file.

############################
#em configuration
############################
#url of enterprise manager. e.g.http://dafth03-i19470.ca.com:8081/
em.url=
#security token generated through the securitytoken feature of em., e.g 386deb23-404f-4e75-807d-06e2195310c0
em.authtoken=
#timezone of enterprise manager. e.g.UTC 
em.timezone=
#webview port of em. e.g. 8080
em.webview.port=


Depending on the environment (on-prem or SaaS) in which your Enterprise Manager is hosted, the port number can be different. The authtoken is the system token (no public tokens) generated by the APM administrator.

Configure Strategies Information

Configuring the strategies lets you do the following tasks:

  • List the strategies with which the two builds are compared
  • Map the properties that are associated with each strategy with respective output handlers
  • List the Output handlers
  • Configure Email(outlook/gmail)

The following code shows the sample of Strategies section of the configuration file:

########################################################
#default metric comparison strategies : 
#    MeanLatency: compares metric values of current build with the corresponding value of benchmark build
#    StaticThreshold: compares metric values of current build with the threshold value configured for threshold property
########################################################
#list of metrics, e.g. cpu,concurrentinvocations,errorperinterval,gcheap
metric.list=cpu,concurrentinvocations

#MeanLatency Comparison-Strategy
#threshold value, e.g.,2. the build will fail,if the build.fail property value is set true and if the metric's avg value difference 
#between current and benchmark build cross this value
cpu.threshold=1
#agent name of the application,  e.g., .* means any agent
cpu.agentspecifier=.*
#metric path , it will be specific to agent, application. e.g, .*CPU.*Processor 0:Utilization % \\(aggregate\\)
cpu.metricspecifier=.*CPU.*Processor 0:Utilization % \\(aggregate\\)
#comparator class name excluding the "ComparisonStrategy", e.g., MeanLatency for MeanLatencyComparisonStrategy
cpu.comparator=MeanLatency
#list of output handlers for this strategy. available output handlers : plaintextemail,jsonfilestore,chartoutputhtml,histogramoutputhtml
cpu.outputhandlers=plaintextemail,jsonfilestore,chartoutputhtml,histogramoutputhtml

#StaticThreshold Comparison-Strategy
#threshold value,e.g., 1.  it will be compared with the average value of metric for current  build
concurrentinvocations.threshold=1
#agent name of the application, e.g., .*
concurrentinvocations.agentspecifier=.*
#metric path , it will be specific to agent, application. e.g., .*Business Segment.*Health:Concurrent Invocations
concurrentinvocations.metricspecifier=.*Business Segment.*Health:Concurrent Invocations
#comparator class name excluding the "ComparisonStrategy", e.g., StaticThreshold for StaticThresholdComparisonStrategy
concurrentinvocations.comparator=StaticThreshold
#list of output handlers for this strategy. available output handlers : plaintextemail,jsonfilestore,chartoutputhtml,histogramoutputhtml
concurrentinvocations.outputhandlers=plaintextemail,jsonfilestore,chartoutputhtml,histogramoutputhtml

###############################################
#default list of outputhandlers
#      plaintextemail: mail will be generated with the report of each metric
#      jsonfilestore : metric values in jsonformat
#      chartoutput : graph representation, 
#      histogramoutputhtml: buildtobuild comparison
#output file for outputhandlers, except plaintextemail, will be in current build directory, inside jenkins workspace folder
###############################################
outputhandlers.list=plaintextemail,jsonfilestore,chartoutputhtml,histogramoutputhtml

#Email Configuration for outlook/gmail
#Valid values for email.mode gmail or outlook
email.mode=
#smtp host for outlook: mail and for gmail: smtp.gmail.com
email.smtp.host=
#flag to authenticate or not valid values : true or false
email.smtp.auth=
#email id of sender e.g, noreply_apm_jenkins@def.com
email.sender.id=
#email password. For gmail password is mandatory field.
email.password=
# to list of email recepients, allows multiple email ids separated by comma (,) . e,g, xyz@ca.com
email.recepients.to=
# cc list of email recepients, allows multiple email ids separated by comma (,) 
email.recepients.cc=
# bcc list of email recepients, allows multiple email ids separated by comma (,) 
email.recepients.bcc=
#gmail specific socket port
email.gmailsocketport=465
#gmail specific smtp port
email.gmailsmtpport=587


Common Configuration

You can set the logging level. Specify the directories where the extensions, JARs, and output are available. The files are generated by the plug-in.

#name of the application for which you run this plugin e.g. Inventory
application.name=

#########################
#Optional properties
#########################
#benchmark build number for comparison, if blank, value will be previous successful build number
build.benchmarkbuildnumber=
#number of builds for buildtobuild chart, max value is 10
histogram.builds=
#flag to make the build fail/pass if the difference of metric average values of current and benchmark build cross 
#the configured threshold value. e.g., true/false, default is true.
build.fail=
#flag to publish the build results to enterprise manager. e.g., true/false, default is false.
build.result.publishtoem= 

#Number of metric values, for each metric, to fetch from EM. Default value is 10
metric.clamp=
#Log level SEVERE > WARNING > INFO > CONFIG > FINE > FINER > FINEST > OFF. 
#Logs can be found at current build directory, inside jenkins workspace folder. default is INFO
logging.level=

#path of jar file for customized strategies.if this folder is empty, extended strategies (in-case) defined in properties won't be able to execute
#e.g., C:\\APM\\AutomicJenkins\\Jenkins\\Jenkins Server\\extensions\\
extensions.directory=


Note: 

build.jenkins.loadrunnerstage.duration  property value true reads load generator test start/end time durations from jenkins job. If  the load generator configuration in the properties file is not required