Introducing scripted connectors: Integrate new products and data sources seamlessly with Python or PowerShell

Introducing scripted connectors: Integrate new products and data sources seamlessly with Python or PowerShell

As we approach the dawn of a new year, we're excited to introduce a groundbreaking feature that will empower you to swiftly and effortlessly integrate new products and data sources into your operations. Embrace the freedom to script and deploy ad hoc integrations on the fly thanks to the latest addition to our toolkit: the ability to script and deploy with Python, PowerShell and similar languages.

The power of ad hoc integrations

Imagine needing a specific Key Performance Indicator (KPI), but alas, there's no connector available. Or perhaps you're eager to pull metrics from a webpage or database that's not on the conventional list. Our new capability turns these challenges into opportunities. With just a small scripted connector, you can seamlessly push data directly to DataMiner.

How it works

The beauty of this new capability lies in its simplicity and real-time adaptability. The scripted connector, hosted on DataMiner, sends data in JSON format to DataMiner's Data API, dynamically creating elements with the necessary parameters.

Each time the script runs, the parameters are updated on the fly. These parameters are automatically trended and can be used in alarm templates, dashboards, Visual Overviews, alarm filters, and more.

Versatile data formats supported

Our scripting capability supports sending DataMiner both single values and JSON arrays. The latter seamlessly translates into tables, offering a structured approach to handling diverse datasets. Furthermore, we proudly support nested arrays, enabling the creation of tables with foreign keys for more complex data structures.

Here's an example of a Python script fetching components from the GitHub status page. Each component is listed along with its status. The script leverages the Status Page API and pushes the received response directly to DataMiner.

# Importing the 'requests' library for making HTTP requests
import requests

def main():
    # Defining header parameters for the API request
    header_params = {
        "identifier": "GitHub Status",
        "type": "Status Page",
    }
    
    # Creating a session object using the 'requests' library
    session = requests.Session()
    
    # Making a GET request to GitHub Status API to fetch components information
    components = session.get("https://www.githubstatus.com/api/v2/components.json")    
    
    # Making a PUT request to a local API endpoint with the fetched JSON data and custom headers
    session.put("http://localhost:34567/api/data/parameters", json=components.json(), headers=header_params)

if __name__ == "__main__":
    # Calling the main function when the script is executed
    main()

After configuring alarm thresholds for the Status column, the element should look like this in DataMiner Cube:

Easy script modifications

Need to tweak your scripted connector? No problem! As your script evolves and starts pushing more data, new parameters seamlessly integrate into the process, ensuring a hassle-free experience. Focus on extracting valuable insights without getting bogged down by integration complexities.

Your feedback shapes the future

The soft launch of this scripting capability is just around the corner, scheduled for next month. We are eager to hear about your experiences and welcome your valuable feedback. Your insights will play a crucial role in refining and enhancing the road ahead, ensuring we meet and exceed your expectations.

As we close the chapter on this year, we hope to have ignited your enthusiasm for what lies ahead. Embrace the power of scripting and ad hoc integrations, and gear up for a data-driven new year like never before. Cheers to innovation, flexibility, and the limitless possibilities that await you in 2024!

1 thought on “Introducing scripted connectors: Integrate new products and data sources seamlessly with Python or PowerShell

Leave a Reply