Getting Data In

What date format does splunk HTTP Event Collector use?

mark-jones
Explorer

I want to parse local log files and add the date to the body of the post request, but not exactly certain what is the best date form at to use?  Can someone please provide some example options?

Thank You,

Mark

$params = @{
    Uri = 'https://prd-p.splunkcloud.com:8088/services/collector'
    Method = 'POST'
    Headers = @{
        Authorization = 'Splunk 2caf8cde'
    }
    Body   = @{
        index = 'job1'
        sourcetype = '_json'
        event      = @{
            name1 = "value1"
            name2 = "value2"
            array1 = @(
                "value1"
                "value2"
            )
        }
    } | ConvertTo-Json
}
Invoke-RestMethod -SkipCertificateCheck @params
Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust
0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @mark-jones 

https://docs.splunk.com/Documentation/Splunk/9.0.1/Data/FormateventsforHTTPEventCollector#Event_meta...

You could take a look at this link and there are examples deep links to follow inside.

--

Hope it helps!

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...