23 Apr 2020 11:08 PM - last edited on 24 Jun 2021 01:34 PM by MaciejNeumann
Groovy Script
node('master') {
stage('creatingEvent') {
// create event
// createDynatraceDeploymentEvent(entityIds: [[$class: 'Service', entityId: 'SERVICE-3A7675E372F5CBA9']], envId: 'Dev', tagMatchRules: [[meTypes: [[meType: 'SERVICE']], tags: [[context: 'KUBERNETES', key: 'ABCD', value: '1234567']]]]) {
//some block
}
stage('Test'){
recordDynatraceCustomSession entityIds: [[$class: 'Host', entityId: 'HOST-BDFA365380EFA92B']], envId: 'Dev', testCase: '', timeframeStart: 1587605159000, timeframeStop: 0
}
perfSigDynatraceReports envId: 'Dev', metrics: [[metricId: 'com.dynatrace.builtin:service.requests'], [metricId: 'com.dynatrace.builtin:host.disk.usedspace']], nonFunctionalFailure: 1, specFile: ''
}
Response:
[Pipeline] perfSigDynatraceReports
[PERFSIG] getting available time series definitions [PERFSIG] process available specifications [PERFSIG] getting metric data from Dynatrace for [PERFSIG] Timeseries com.dynatrace.builtin:service.requests has no data points [PERFSIG] created 0 DashboardReports
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.CommandExecutionException: error while querying timeseries data: {"error":{"code":403,"message":"The query has returned too many entities. Please use filter options."}} Stacktrace: de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.ApiException: {"error":{"code":403,"message":"The query has returned too many entities. Please use filter options."}} at de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.ApiClient.handleResponse(ApiClient.java:251) at de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.ApiClient.execute(ApiClient.java:223) at de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.DynatraceServerConnection.getTimeseriesData(DynatraceServerConnection.java:133) at de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.DynatraceServerConnection.getTimeseriesData(DynatraceServerConnection.java:115) at de.tsystems.mms.apm.performancesignature.dynatracesaas.DynatraceReportStepExecution.lambda$null$13(DynatraceReportStepExecution.java:304) at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321) at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747) at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721) at java.util.stream.AbstractTask.compute(AbstractTask.java:316) at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
at de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.DynatraceServerConnection.getTimeseriesData(DynatraceServerConnection.java:136) at de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.DynatraceServerConnection.getTimeseriesData(DynatraceServerConnection.java:115) at de.tsystems.mms.apm.performancesignature.dynatracesaas.DynatraceReportStepExecution.lambda$null$13(DynatraceReportStepExecution.java:304) at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321) at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747) at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721) at java.util.stream.AbstractTask.compute(AbstractTask.java:316) at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) Finished: FAILURE
Solved! Go to Solution.
27 May 2020 09:11 AM
Hi. The error message indicates that there are too many requests coming back from your query because you only selected a metric but didnt specify the entityId when calling perfSigDynatraceReports. Please have a look at the documentation of that plugin which is supported by our partner T-Systems: https://github.com/jenkinsci/performance-signature-dynatrace-plugin/blob/master/dynatrace/README.md
Also - as this is a partner supported plugin you can send them an email as indicates on that github readme.
Another option is to move towards our Keptn Quality Gate implementation and using our Keptn Jenkins Library. Here is a link to a tutorial: https://github.com/keptn-sandbox/keptn-jenkins-library/
29 Sep 2021 01:02 PM
Hi there,
I have been getting below error while executing the Performance signature reporting in Jenkins -
[PERFSIG] getting available time series definitions
[PERFSIG] process available specifications
[PERFSIG] getting metric data from Dynatrace for test
[PERFSIG] Timeseries com.dynatrace.builtin:service.requests has no data points
[PERFSIG] created 1 DashboardReports
However, there is no Dashboard report generated in Jenkins. My Performance signature report pipeline step is as below:
stage('PerformanceSignatureReports') {
perfSigDynatraceReports entityIds: [[$class: 'Service', entityId: 'SERVICE-C839DD873CDBD8A7']], envId: 'Dynatrace Performance Signature', metrics: [[metricId: 'com.dynatrace.builtin:service.requests']], nonFunctionalFailure: 2, specFile: ''
I used the specFile as well without the metrics key in the pipeline above but still did not succeed -
{
"lowerLimit": 1,
"upperLimit": 4,
"timeseries": [
{
"timeseriesId": "com.dynatrace.builtin:service.responsetime",
"aggregation": "avg",
"tags": "jenkins",
"lowerLimit": 2.5,
"upperLimit": 10
}
]
}
Can someone please advise what am doing wrong here. Thanks!