Table of Contents

Creating a scripted connector

This tutorial will teach you how to create your first scripted connector with Python.

Using example code, you will create a scripted connector that connects to the Amsterdam Internet Exchange (AMS) and collects traffic data from some of its available locations. This will give you real-life data illustrating how the Data Sources module works.

The content and screenshots for this tutorial were created in DataMiner version 10.4.2.

Expected duration: 15 minutes.

Tip

See also: Kata #18: Creating a scripted connector on DataMiner Dojo Video

Prerequisites

Note

If you use a DaaS system, these prerequisites are automatically met.

Overview

Step 1: Set up your system

Navigate to https://admin.dataminer.services/ and deploy the latest version of the DataAPI and DataAggregator DxMs.

Admin

Nodes Installer

Step 2: Create a scripted connector

  1. Open the Data Sources module:

    • In DataMiner Cube, click Apps in the sidebar to the left and select Data Sources, or

    • Navigate to https://<dmaip>/data-sources/ using any modern browser.

  2. Click Create Data Source.

    Create New

  3. Configure the Data source name field with an identifiable name (e.g. AMS) and ensure the Type is set to Python.

    Basic Settings

  4. Go to the SLC-SC-Example_ScriptedConnectors GitHub repository and copy the Amsterdam Internet Exchange Python example.

    Copy Github

  5. In the Data Sources module, paste the example code in the code editor window and click the Create button.

    Final DataSource

The scripted connector you have just created will now be automatically configured to run every minute. It will collect traffic data and send it to DataMiner via the Data API.

When the scripted connector is first executed, an element named ams-ix.net will automatically be created.

Step 3: View your data source

  1. Open DataMiner Cube and locate the newly created element in the Surveyor.

  2. Verify that the element is being populated with data.

    New Element