All Apps and Add-ons

Load Data from REST with JSON payload

lukas_loder
Communicator

Hi everybody

I'm trying to get data from the Zabbix API into Splunk. For this I need to be able to send some parameters in JSON format to the API. For example:

{
    "jsonrpc": "2.0",
    "method": "host.get",
    "params": {
        "output": ["hostid"],
        "selectParentTemplates": [
            "templateid",
            "name"
        ],
        "hostids": "10084",
        "user":"username",
        "password":"password"
    },
    "id": 1,
    "auth": "asdf"
}

With the Add-On Builder I'm only able to add simple parameters but not JSON.
Is there any other possibility?

Thanks and kind regards,
Lukas

0 Karma
1 Solution

asieira
Path Finder
0 Karma

asieira
Path Finder

You write Python code to perform the API access and submit JSON or any other kind of data this way. You can find more details at https://docs.splunk.com/Documentation/AddonBuilder/2.2.0/UserGuide/ConfigureDataCollectionAdvanced and https://docs.splunk.com/Documentation/AddonBuilder/2.2.0/UserGuide/PythonHelperFunctions.

0 Karma
Get Updates on the Splunk Community!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...