Klarity

Events

By default, Klarity's daily chart might not give you all information that you need to understand how cloud costs impact your business. In Klarity, you can add another dimension to your application overview by integrating events. For example, you can integrate Klarity with Jira, CI/CD Pipelines, Service Now, Remedy Force, and so on.

In the Klarity UI, using GraphQL, you can set up an event directly, and this requires only one API call. Alternatively, to make the same call using cURL, you must first gain authentication by using GraphQL, and then make the cURL call.

When you execute one of the above calls, you create an event in the application which will be visible on the daily spend application chart.

Adding an event

Prerequisites

You need to copy the application's ID.

Go to Menu, then Applications view, and then copy the applications's ID from the URL. In the URL, the application's ID (nid) is the UUID that follows the final forward-slash:

Application

Adding an event using GraphQL

In Klarity, in the top-right of the dashboard, hover the mouse over your username. From the drop-down menu, click API playground. In Klarity GraphQL API playground, you can now create the API call.

For example, to addEvent, you must add 4 fields:

  • nid - application ID in Klarity
  • title - event name
  • type - event type
  • content - event description

API call example:

mutation add {
addEvent(
input: {
nid: "a64b2789-faaa-4d86-bbf0-d7aece238d8c",
title: "Test event",
type: "Jira",
content: "This is the event that notifies that a "release" was created in Jira"}
)
}

Adding an event using cURL

  1. First, generate an API key and secret, as follows:
  • Go to Overwatch API playground

  • Run this mutation:

    mutation {
    createAccessKey(input: {role: ADMIN, description: "Event sender"}) {
    id
    secret
    }
    }

The propagation of the new key can take up to 5 minutes. After that time, the secret should work.

The format of YOUR_API_KEY format is: key_id/secret

  1. Second, make this call in cURL:
curl -H "x-api-key: ID_HERE/SECRET_HERE" -H "Content-Type: application/json" -d '{ "query": "mutation add { addEvent( input: { nid: \"a64b2789-faaa-4d86-bbf0-d7aece238d8c\", title: \"Test event2\", type: \"Jira\", content: \"This is the event that notifies that a "release" was created in Jira\"} ) }", "operationName":"add" }' -X POST https://api.cnop-int.nordcloudapp.com/graphql

Integration with Jira

To Be Added

Edit this page on GitHub