Getting Data In

i am trying to collect event metrics from application logs from splunk for prometheus. Can anyone please guide me how to do ?

iamlucky92
Observer

For eg via below code i get the logs but how to get metrics from them and how i can use them in prometheus ?

import splunklib.client as client
import splunklib.results as results
service = client.connect( 
                host='host', 
                port=8089,
                username='usr',
                password='pwd')

query="search index=some index"
#rr = results.ResultsReader(service.jobs.export(query))
kwargs_export = { "output_mode": "json"}
rr = service.jobs.export(query)

for item in rr:
    print(item)
Tags (2)
0 Karma

p_gurav
Champion

Please try Prometheus Metrics for Splunk app.
https://splunkbase.splunk.com/app/4077/

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...