Useful reports for Jira administrators from the Jira audit log

eazyBI data cube of Jira issues can help with some use cases for the Jira administrators but is insufficient for more advanced cases. Jira provides REST API to access the audit log records allowing the creation of many useful reports by importing the audit records in a custom data cube of eazyBI.

The example explained below is based on the REST API for Jira Server, but a similar API is also available for Jira Cloud.

You can create a new REST API data source from the auditing REST API and create data mapping like this:

The data cube allows reporting on the audit events by type, category, time, object, and object type. For instance, the following report can show the number of users updated and groups created in a period:

Please, find below the data source definition.

REST API data source for Jira audit log records
{
  "application_type": "rest_api",
  "application_params": {
    "source_params": {
      "url": "<JIRA_BASE>/rest/api/latest/auditing/record?from=<AUDIT_EVENT_START_DATE>",
      "pagination": "offset_limit",
      "offset_parameter": "offset",
      "limit_parameter": "limit",
      "limit_value": 50,
      "incremental": null,
      "incremental_stop_import": null,
      "authentication_type": "basic",
      "username": "<USER_NAME>",
      "content_type": "json",
      "json_data_path": "$.records",
      "custom_javascript_code": "doc.event_count=1"
    },
    "columns_options": {
      "hide_unmapped": true
    },
    "extra_options": {
      "regular_import_frequency": 0,
      "regular_import_at": "",
      "time_zone": "Helsinki"
    }
  },
  "source_cube_name": "Jira admin",
  "columns": [
    {
      "name": "id",
      "data_type": "integer"
    },
    {
      "name": "summary",
      "data_type": "string",
      "dimension": "Event type"
    },
    {
      "name": "remoteAddress",
      "data_type": "string"
    },
    {
      "name": "authorKey",
      "data_type": "string",
      "dimension": "Author"
    },
    {
      "name": "created",
      "data_type": "datetime",
      "dimension": "Time"
    },
    {
      "name": "category",
      "data_type": "string",
      "dimension": "Event Category"
    },
    {
      "name": "eventSource",
      "data_type": "string"
    },
    {
      "name": "objectItem\nid",
      "data_type": "string"
    },
    {
      "name": "objectItem\nname",
      "data_type": "string",
      "dimension": "Object name"
    },
    {
      "name": "objectItem\ntypeName",
      "data_type": "string",
      "dimension": "Object type"
    },
    {
      "name": "objectItem\nparentId",
      "data_type": "integer"
    },
    {
      "name": "objectItem\nparentName",
      "data_type": "string"
    },
    {
      "name": "changedValues",
      "data_type": "array"
    },
    {
      "name": "event_count",
      "data_type": "integer",
      "dimension": "Measures",
      "dimension_member": "Event count"
    },
    {
      "name": "associatedItems",
      "data_type": "array"
    }
  ]
}
2 Likes

This is just beautiful!

1 Like