leakix / estk Goto Github PK
View Code? Open in Web Editor NEWES ToolKit is a standalone solution to navigate and backup data for a wide range of Elasticsearch and Kibana versions.
License: MIT License
ES ToolKit is a standalone solution to navigate and backup data for a wide range of Elasticsearch and Kibana versions.
License: MIT License
Is there any way to resume a large download? Say from a specific document number?
Can you support conditional filtering like elasticdump's --searchBody?
--searchBody='
{
"query": {
"range": {
"activity.S_T_VD_EVENTOCCURDATE.raw": {
"gte": "2021-11-18",
"lt": "2021-11-19"
}
}
}
}'
error
`estk-win64.exe dump --url=https://xx.xx.xx.xx --index=local-8.0.1-23.03 -o local-8.0.1-23.03.json
2023/03/09 05:24:35 Detecting version...
2023/03/09 05:24:35 Trying elasticsearch
2023/03/09 05:24:35 Found elasticsearch, major version 8
2023/03/09 05:24:35 Dump starting...
2023/03/09 05:24:35 Endpoint : https://xx.xx.xx.xx
2023/03/09 05:24:35 Index : local-8.0.1-23.03
2023/03/09 05:24:35 Output file : local_local-8.0.1-23.03.json
2023/03/09 05:24:35 Got scrollId :
panic: interface conversion: interface {} is nil, not map[string]interface {} [recovered]
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 1 [running]:
github.com/alecthomas/kong.catch(0xc000127ee8)
github.com/alecthomas/[email protected]/kong.go:366 +0xa5
panic({0xd46360, 0xc0001af890})
runtime/panic.go:838 +0x207
github.com/LeakIX/estk/lib.(*DumpCommand).Run(0x105c200, 0xc000074ba0)
github.com/LeakIX/estk/lib/dump.go:56 +0xa38
reflect.Value.call({0xd3bac0?, 0x105c200?, 0x18?}, {0xd8beb4, 0x4}, {0xc000004b88, 0x1, 0x0?})
reflect/value.go:556 +0x845
reflect.Value.Call({0xd3bac0?, 0x105c200?, 0xd2c8e0?}, {0xc000004b88, 0x1, 0x1})
reflect/value.go:339 +0xbf
github.com/alecthomas/kong.callMethod({0xd8ba45, 0x3}, {0xd6e740?, 0x105c200?, 0x3?}, {0xd3bac0?, 0x105c200?, 0xb8de8a?}, 0xc000006020?)
github.com/alecthomas/[email protected]/callbacks.go:71 +0x4e7
github.com/alecthomas/kong.(*Context).RunNode(0xc00012e600, 0xc00001d930, {0xc000127f60, 0x1, 0x1})
github.com/alecthomas/[email protected]/context.go:610 +0x5f7
github.com/alecthomas/kong.(*Context).Run(0xc000074ba0?, {0xc000127f60?, 0x0?, 0xa26679?})
github.com/alecthomas/[email protected]/context.go:627 +0xb8
main.main()
github.com/LeakIX/estk/main.go:35 +0x17a`
Fix was very simple
add
change in /lin/dump.go
import "strings"
and
Line 17
type DumpCommand struct {
Index []string required help:"Index filter" short:"i"
Line 45-51
if cmd.ScrollId == "" {
indexFilter := ""
if len(cmd.Index) > 0 {
indexFilter = "/" + url.PathEscape(strings.Join(cmd.Index, ",")) + "/"
} else {
indexFilter = "/"
}
This will fix the issue
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.