dmcinnes / splunk-golang

REST API Client for Splunk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Splunk REST API Client

Example Usage:

package main

import (
    "fmt"
    "github.com/drewrm/splunk"
)

func main() {
    conn := splunk.SplunkConnection {
            Username: "admin",
            Password: "changeme",
            BaseURL: "https://localhost:8089",
    }

    key, err:= conn.Login()

    if err != nil {
            fmt.Println("Couldn't login to splunk: %s", err)
    }

    fmt.Println("Session key: ", key.Value)
}

About

REST API Client for Splunk

License:Apache License 2.0


Languages

Language:Go 100.0%