Skip to main content

KnowBe4 API Source

The KnowBe4 API integration collects user data into Sumo Logic to store, analyze and alert. It ingests events data from the Events API.

note

To access the Knowbe4 API, you must have either the Platinum or Diamond user plan.

Prerequisites

Before you begin setting up your KnowBe4 Source, which is required to connect to the KnowBe4 API, you'll need to configure your integration with the Base URL and KnowBe4 API Token.

Base URL

The Base URL is the URL where your KnowBe4 account is located. To get the base URL, follow the steps below:

  1. Log in to the KnowBe4 application.
  2. At the top of the browser, you will see the Base URL inside the address bar.
  3. Choose the Base URL from the table below. The following table contains the base URLs based on the location of your KnowBe4 account:
Server locationServer located atBase URLs
US Servertraining.knowbe4.comhttps://api.events.knowbe4.com
EU Servereu.knowbe4.comhttps://api-eu.events.knowbe4.com
CA Serverca.knowbe4.comhttps://api-ca.events.knowbe4.com

API Token

The API security token is used to authenticate with KnowBe4 HTTP API. To get the KnowBe4 API token, follow the steps below:

  1. Log in to the KnowBe4 application.
  2. Navigate to the Events section from left panel and click Settings.
  3. Select User Profile. The KnowBe4 Secure API token is displayed in the UI.
  4. You can copy the generated token for use, or click the Reset Token button to generate a new one.
    note

    When you reset the token, the previous token issued becomes invalid immediately.

Metadata

If the Source is configured with the SIEM forward option, the metadata field _siemparser will be set to /Parsers/System/KnowBe4/KnowBe4 KMSAT.

Data Sources

The KnowBe4 integration fetches all types of user events for the KnowBe4 account.

States

A KnowBe4 API integration Source is an integrated Security Awareness Training and Simulated Phishing platform that helps to train users to understand the dangers of spam, phishing, spear phishing, malware, ransomware, and social engineering through simulated phishing and security awareness training.

When a KnowBe4 API Source is created, it goes through the following states:

  1. Pending. Once the Source is submitted, it is validated, stored, and placed in a Pending state.
  2. Started. A collection task is created on the Hosted Collector.
  3. Initialized. The task configuration is completed in Sumo Logic.
  4. Authenticated. The Source is successfully authenticated with KnowBe4.
  5. Collecting. The Source is actively collecting data from KnowBe4.

If the Source has any issues during any one of these states, it is placed in an Error state.

When you delete the Source, it is placed in a Stopping state. When it has successfully stopped, it is deleted from your Hosted Collector.

On the Collection page, the Health and Status for Sources is displayed. Use Health Events to investigate issues with collection.

Hover your mouse over the status icon to view a tooltip with a count of the detected errors and warnings.
hover c2c error.png

Set up KnowBe4 Source

When you create a KnowBe4 API Source, you add it to a Hosted Collector. Before creating the Source, identify the Hosted Collector you want to use or create a new Hosted Collector. For instructions, see Configure a Hosted Collector.

To configure the KnowBe4 API Source:

  1. In Sumo Logic, select Manage Data > Collection > Collection
  2. On the Collectors page, click Add Source next to a Hosted Collector.
  3. Select KnowBe4 icon.
    knowbe4-icon.png
  4. Enter a Name to display for the Source in the Sumo Logic web application. The description is optional.
    knowbe4-config-main.png
  5. (Optional) For Source Category, enter any string to tag the output collected from the Source. Category metadata is stored in a searchable field called _sourceCategory.
  6. (Optional) Fields. Click the +Add Field link to define the fields you want to associate. Each field needs a name (key) and value.
    • green check circle.png A green circle with a check mark is shown when the field exists in the Fields table schema.
    • orange exclamation point.png An orange triangle with an exclamation point is shown when the field doesn't exist in the Fields table schema. In this case, an option to automatically add the nonexistent fields to the Fields table schema is provided. If a field is sent to Sumo Logic that does not exist in the Fields schema it is ignored, known as dropped.
  7. In Base URL, choose the URL where your KnowBe4 account is located. See Base URL section to know your base URL.
  8. In API Key, authenticate your account by entering your secret API key. You can access your API key or generate a new one from User Event API Management Console. See API Token section.
  9. When you are finished configuring the Source, click Save.

Error types

When Sumo Logic detects an issue, it is tracked by Health Events. The following table shows three possible error types. It tells the reason for the error, if the source attempts to retry, and the name of the event log in the Health Event Index.

TypeReasonRetriesRetry BehaviorHealth Event Name
ThirdPartyConfigNormally due to an invalid configuration. You'll need to review your Source configuration and make an update.No retries are attempted until the Source is updated.Not applicableThirdPartyConfigError
ThirdPartyGenericNormally due to an error communicating with the third-party service APIs.YesThe Source will retry for up to 90 minutes, after which it quits.ThirdPartyGenericError
FirstPartyGenericNormally due to an error communicating with the internal Sumo Logic APIs.YesThe Source will retry for up to 90 minutes, after which it quits.FirstPartyGenericError

Restarting your Source

import useBaseUrl from '@docusaurus/useBaseUrl';

If your Source encounters ThirdPartyConfig errors, you can restart it from either the Sumo Logic UI or Sumo Logic API.

UI

To restart your source in the Sumo Logic platform, follow the steps below:

  1. Open the Collection page, and go to Manage Data > Collection > Collection.
  2. Select the source and click the information icon on the right side of the row.
  3. The API usage information popup is displayed. Click the Restart Source button on the bottom left.
    restart-source-button.png
  4. Click Confirm to send the restart request.
    restart-source-confirm.png
  5. The bottom left of the platform will provide a notification informing you the request was successful.
    source-restart-initiated.png

API

To restart your source using the Sumo Management API, follow the instructions below:

  • Method: POST
  • Example endpoint: https://api.sumologic.com/api/v1/collectors/{collector_id}/sources/{source_id}/action/restart.

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western U.S.) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

JSON configuration

Sources can be configured using UTF-8 encoded JSON files with the Collector Management API. See how to use JSON to configure Sources for details. 

ParameterTypeRequiredDescriptionAccess
configJSON ObjectYesContains the configuration-parameters of the Source.na
schemaRefJSON ObjectYesUse {"type":"KnowBe4"} for KnowBe4 Source.not modifiable
sourceTypeStringYesUse Universal for KnowBe4 Source.not modifiable

Config Parameters

ParameterTypeRequiredDescriptionAccess
nameStringYesType the desired name of the Source and it must be unique per Collector. This value is assigned to the metadata field _sourcemodifiable
descriptionStringNoType the description of the Source.modifiable
categoryStringNoType the category of the source. This value is assigned to the metadata field _sourceCategory.modifiable
fieldsJSON ObjectNoJSON map of key-value fields (metadata) to apply to the Collector or Source. Use the boolean field _siemForward to enable forwarding to SIEM.modifiable
baseURLStringYesRegion URL of the KnowBe4 application.modifiable
apiKeyStringYesSecret api key to authenticate your account.modifiable

JSON Example

{
"api.version": "v1",
"source": {
"config": {
"name": "KnowBe4",
"description": "Test Source",
"category": "source_category",
"baseURL": "https://api.events.knowbe4.com",
"apiKey": "************"
},
"schemaRef": {
"type": "KnowBe4"
},
"sourceType": "Universal"
}
}

Limitations

The number of licensed users on your account can make a maximum of ten requests per day using the KnowBe4 API. You may access the APIs only four times per second.

Legal
Privacy Statement
Terms of Use

Copyright © 2023 by Sumo Logic, Inc.