top of page
Search

How to Use ChatGPT in Splunk®

This will be the first of many blog posts detailing how to use Dataflect to implement AI driven workflows without leaving Splunk®.


There are several options out here for integrating Splunk® with ChatGPT. Dataflect allows you to approach this integration with maximum ease and flexibility.


This very basic example will demonstrate how you could leverage Dataflect to enable your users to interact with ChatGPT without leaving Splunk®.



This dashboard leverages two of Dataflect's core functionalities:


Using dfsearch, we create a dynamic dropdown that allows the user to select from available models:


ree


| dfsearch url="https://api.openai.com/v1/models" credential=openai | stats count by id

Then, we use the selected model, and the prompt entered by the user, to interact with the OpenAI API and output the ChatGPT response.


Use ChatGPT in Splunk®
Use ChatGPT in Splunk®
| dfengage url="https://api.openai.com/v1/chat/completions" credential=openai headers="{'Content-Type': 'application/json'}" data="{'model': '$model$', 'messages': [{'role': 'user', 'content': '$message$'}]}" data_format=json containing_field=choices  | spath input=message  | table content


You'll notice that all of the API calls are authenticated using a stored credential, to maximize security and control.


it's really that simple and quick. This is a fairly basic example, but you can imagine using this capability to:


  • Allow SOC analysts to gain information on a potential incident

  • Allow Splunk Admins to gain troubleshooting support

  • Allow Splunk Users to gain SPL support, or get ideas for dashboards.


All of this without ever leaving Splunk® web.


If you would like help implementing this or other related use cases - reach out to us today at sales@dataflect.com.

 
 

Dataflect LLC

Denver, CO

USA

Dataflect LLC is in no way associated with Splunk, Inc. or any of its affiliates.

Splunk, Splunk>, and Turn Data Into Doing are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners. © 2025 Splunk Inc. All rights reserved.

© 2025 Dataflect LLC

bottom of page