Splunk Enterprise

Splunk and Visual Studio Code

genesiusj
Builder

Hello,

I'm trying to find information on how to use Splunk with Visual Studio Code.

I have an authentication token on my development instance.
I've installed the Visual Studio Code Extension for Splunk on GitHub.

I'm lost from here on.

What do I enter in the url and webroot fields in the launch.json file?

    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "https://<host name>:8080",
            "webRoot": "${workspaceFolder}"
        }
    ]

This opens Splunk in my Chrome browser, but it is an empty search field.

I created splnb file in VSC, but when I run it, I receive ERROR: Unauthorized.

Thanks in advance for any direction provided.
God bless, Genesius

Labels (3)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

I'm expecting that you are running splunk on normal port 8089 and host is e.g. my.splunk.host. Then just put on your URL "https://my.splunk.host:8089" and it should work. Maybe it needs to restart VScode before it work?

Also you should create Token for authentication on splunk side and add it to your configuration. 

For some reason I haven't those entries on my settings.json? I just use GUI to configure Splunk extension for vscode with items:

  • Splunk Rest Url
  • Token

Those two should be enough for using REST api for queries. 3rd one which you probably want to set it Splunk Search Head (https://my.splunk.host:8000).

r. Ismo

0 Karma
Get Updates on the Splunk Community!

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...