Last active
February 16, 2016 19:33
-
-
Save secabstraction/da97bf406f0067ed6b67 to your computer and use it in GitHub Desktop.
Revisions
-
secabstraction revised this gist
Feb 16, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,4 +23,6 @@ $JSON = @' } '@ $JSON = $JSON.Replace(' ','').Replace("`n",'') Invoke-WebRequest -Method Put -Uri http://myelastic:9200/_template/powerstash -Body $JSON -
secabstraction created this gist
Feb 16, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ $JSON = @' { "template": "powerstash-*", "mappings": { "eventlogentry": { "properties" : { "Id": { "type": "string" }, "TimeCreated" : { "type" : "date" }, "DateCreated" : { "type" : "date" }, "EventId" : { "type" : "integer" }, "ComputerName" : { "type" : "string" }, "Level" : { "type" : "string" }, "Provider" : { "type" : "string" }, "LogName" : { "type" : "string" }, "Category" : { "type" : "string" }, "Type" : { "type" : "string" }, "InsertionStrings" : { "type" : "string" }, "Message" : { "type" : "string" }, "User" : { "type" : "string" } } } } } '@ Invoke-WebRequest -Method Put -Uri http://myelastic:9200/_template/powerstash -Body $JSON.Replace(' ','').Replace("`n",'')