0
我目前正在嘗試將一個基本的JSON文件導入到我的ELK堆棧中。我想通過這樣的POST請求直接將其導入:彈性搜索+ JSON導入(ELK堆棧)
捲曲-XPOST http://localhost:9200/kwd_results/TS_Cart -d @ /家庭/本地/ TS_Cart.json
ES說OK的進口,但是當我試圖查看在Kibanna中的日誌中,它們沒有被JSON文件的節點索引。我猜我需要像模板映射來正確查看它。
我的JSON文件看起來像這樣:
{ "testResults": { "FitNesseVersion": "v20160618", "rootPath": "K1System.CountryDe.DriverFirefox.TestCases.MainFolder.TestVariants.SmokeTests_B2C.TS_Cart", "result": [ { "counts": { "right": "16", "wrong": "2", "ignores": "3", "exceptions": "1" }, "date": "2017-05-10T00:01:11+02:00", "runTimeInMillis": "117242", "relativePageName": "TestCase_1", "pageHistoryLink": "K1System.CountryDe.DriverFirefox.TestCases.MainFolder.TestVariants.SmokeTests_B2C.TS_Cart.B2CFreeCatalogueOrder?pageHistory&resultDate=20170510000111", "tags": "de, at" }, { "counts": { "right": "16", "wrong": "0", "ignores": "0", "exceptions": "0" }, "date": "2017-05-10T00:03:08+02:00", "runTimeInMillis": "85680", "relativePageName": "TestCase_2", "pageHistoryLink": "K1System.CountryDe.DriverFirefox.TestCases.MainFolder.TestVariants.SmokeTests_B2C.TS_Cart.B2CGiftCardOrderWithAdvancePayment?pageHistory&resultDate=20170510000308", "tags": "at, de" } ], "finalCounts": { "right": "4", "wrong": "1", "ignores": "0", "exceptions": "0" }, "totalRunTimeInMillis": "482346" } }
基本上我需要ROOTPATH被用作一個索引,同時具有以下孩子的:counts, relativePageName, date and tags
。請注意,我有兩個節點是結果[]數組的子節點。
任何幫助將不勝感激!
謝謝。