Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Output SmartThings Logs to HTTP Event Collector

$
0
0
So I've been working on modifying this code here [https://github.com/TheFuzz4/SmartThingsSplunkLogger/blob/master/splunklogger.groovy][1] [1]: https://github.com/TheFuzz4/SmartThingsSplunkLogger/blob/master/splunklogger.groovy I want it to send the json objects off to Splunk. This is for smartthings. I finally got it to hit my splunk server but now I'm getting a 400 error when it hits the splunk server. Here is a sample of the data that its sending to splunk [code] 2:20:45 PM: debug [uri:http://mysplunkserver:8088/services/collector/event, headers:[Authorization:Splunk mysplunktoken], body:{"date":"Sat Feb 13 21:20:44 UTC 2016","name":"power","displayName":"Home Energy","device":"Home Energy","deviceId":"31ea905e-28d3-4779-a8b1-82bcd528c520","value":"2233","isStateChange":"true","id":"a4b491a0-d297-11e5-897c-22000bb6c3f8","description":"zw device: 0F, command: 3202, payload: 21 74 00 22 11 C0 00 00 00 00 00 00","descriptionText":"Total Power: 2233 Watts","installedSmartAppId":"null","isoDate":"2016-02-13T21:20:44.892Z","isDigital":"false","isPhysical":"false","location":"Home","locationId":"846d6e0a-dcc0-44e8-a09b-bac269bfa6c1","unit":"W","source":"DEVICE"}] [/code] The original code was written for logstash so I've been working on it to get it modified for splunk but I'm not sure if the json just isn't being formatted correctly for splunk. Thank you all in advance for your help and once we can get this working properly it will make a lot of SmartThings users very happy.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>