How to customize metrics in sonar? - customization

I'm a new user of sonar. Now I need to customize metrics, but I didn't find the related documentation. If I have to coding a plugin? I do the same with http://docs.sonarqube.org/display/SONAR/Getting+Started, but I failed. There is no difference at the localhost:9000/profiles.

For proper integration into the Sonar build you need to write plugin:
http://docs.sonarqube.org/display/DEV/Developing+Plugins
If you just want to add some additional adhoc metrics to your dashboard,
an option is to use manual measures:
http://docs.sonarqube.org/display/SONAR/Manual+Measures
There's a REST API available to creating and posting manual metric values:
http://docs.sonarqube.org/pages/viewpage.action?pageId=2392169

You can create a new Metric using Manual Metrics through the sonar GUI (I think you need admin rights).
Manual metrics can be updated through the GUI too.
If your plugin built OK but there are no numbers appearing: you must also run an analysis to populate the new Metrics with some Measures.

Related

Does anyone know how to retrieve the list of tasks in Camunda 8, without using tasklist?

I am currently evalauting Camunda, having previously used version 7 in the past which seems to be significantly more open source than version 8.
I am aware that tasklist and an official tasklist-api exist, however they are only permitted during development and testing without a license.
In Bernd Rücker's medium post How Open is Camunda Platform 8?, there is a section:
A path to production with source-available software
...
Additionally, you will need to find solutions to replace the tools you cannot use.
Tasklist
You will need to implement your own task management solution based on using workers subscribing to Zeebe as described in the docs. That also means you have to build your own persistence to allow task queries, as the Tasklist API is part of the Tasklist component and is not free for production use.
I have tried to search the zeebe source for any hints, but the only job/task related APIs I seem to be able to find are:
activateJobs
completeJob
I do not believe that these could be the endpoints that tasklist uses as the jobs have to be manually claimed by user interaction from the UI.
Does anyone know how this is achieved?
Your own zeebe exporter allows you to export any events the engine produces, such as user task state updates. You could store this information in a data sink of your choice and and implement an API on top of it.
See, e.g. https://camunda.com/blog/2019/05/exporter-part-1/

Why does Dataflow not allow the download of a certain metric

I was running a test job on Google dataflow, and I wanted to download the metrics for it afterwards. I can view the metrics in the job metric section of the job, but it doesn't let me download it as a CSV. (It lets me download a PNG only) Some jobs allow for that which is why I am confused. Is there a way I can enable the metric download option on every job?
There are 2 versions of the job metrics section. It occurs to me that only the plots in the newer one (with a button "GO BACK TO CLASSIC METRICS") allow you to download as CSV when you click and expand the three-dots menu.
You can always "View in Metrics Explorer", do some analysis there and read metric data programmatically. More details about how to export cloud monitoring data can be found here.

Update GCP asset labels

What is the most efficient way to update all assets labels per project?
I can list all project resources and their labels with gcloud asset search-all-resources --project=SomeProject. The command also returns the labels for those assets.
Is there something like gcloud asset update-labels?
I'm unfamiliar with the service but, APIs Explorer (Google's definitive service documentation), shows a single list method.
I suspect (!?) that you will need to iterate over all your resource types and update instances of them using any (there may not be) update (PATCH) method that permits label changes for that resource type.
This seems like a reasonable request and you may wish to submit a feature request using Google's issue tracker
gcloud does not seem to have a update-labels command.
You could try the Cloud Resource Manager API. For example, call the REST or Python API: https://cloud.google.com/resource-manager/docs/creating-managing-labels#update-labels

Fetch Build Statistics for an Application from Bamboo REST API

I am looking for the Bamboo REST API which give us all recent Build Activity of an Application within a time-frame like all build of Last_7_Days, Last_1_Day, Last_30_Days etc. Similar to the report we get in Bamboo UI for Build Activity of a Plan. In Bamboo Report we have three section Chart, Data Table and Builds. We have REST API for Chart. But I still couldn't found any REST API to get the Build Activity. Report format attached for reference.
I tried Bamboo Chart API but its giving output as a chart image. Does anyone know any Bamboo REST API to fetch Build Activity of an Application?
I will appreciate your help. Thanks
As you have found there are no direct REST APIs for build activity by time period.
I'd use the build REST API (https://developer.atlassian.com/bamboodev/rest-apis/bamboo-rest-resources#BambooRESTResources-BuildService%E2%80%94AllBuilds) and XLST to filter the results by time period.

Issues With Google Log Exporter

Is it possible to filter out columns of Appengine Logs from streaming into Big Query when Project Sinks are used in the Google Log Exporter?
We do not currently support partial log entry content in general in Stackdriver Logging. You can see the full spec for the LogSink resource here.