Getting Data In

Listing all Client

ganapathymanian
Loves-to-Learn Lots

I am getting only 100 data using this option, could someone suggest how we can get all client details.

import splunklib.client as client

import splunklib.results as results

import json

service = client.connect(host = 'SPLUNKSERVER', port=8089, username = 'admin', password = 'PASSWEORD')

kwargs_oneshot = {"earliest_time": "-2h",

                           "latest_time": "now"}

searchquery_oneshot = "| metadata type=hosts index=wineventlog, **{'exec_mode':'blocking'}"

oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot, **kwargs_oneshot)

oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot)

reader = results.ResultsReader(oneshotsearch_results)

for item in reader:

              print(item)

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...