Looking for shell based elasticsearch client or something similar to curator run in command line

Hi All,

I'm curious whether there's any shell based elasticsearch client implementation or something similar to curator exists in community. I can see there are many types of elasticsearch clients documented at https://www.elastic.co/guide/en/elasticsearch/client/index.html, including both officially supported and community contributed, but couldn't find any one that is built on shell script.

While I was writing something using bash shell these days by myself due to project needs, I'm just wondering if someone has already created some before so that I can leverage. Curator is great and can do a lot of things. It can also run in command line, but just, wonder if anyone knows there's something can be run in command line that's purely built by shell, and do no need python... I googled for a while but w/ no luck...

P.S. It would be nice if that can be run interactively... e.g. allows to input an index name to be created... or, guess I can wrap up curator to do so...

Thanks in advance...

There's probably a good explanation for that, and it's the inherent difficulty and repetition necessary to do everything with curl. It's not an API at that point, but a whole lot of URL endpoints to manage.

On the flip side, what is it that you want to be able to do that curator_cli is not meeting your needs? Enhancement requests are always welcome.

Hey Aaron, thanks for your prompt reply!

Originally, I was just looking for some shell snippets that can (partially) automate elasticsearch rolling (or full-restart) upgrade and remote reindex... I figured that curator has reindex action, but it looks it's more like at the atomic level, and it's a bit lack of reporting... e.g. I was investigating the best tuning-ups for reindex approach w/ my business data in prod env, so, I need some matrix regarding each run w/ different set of tuning-ups... and for upgrade, it looks nothing is natively supported within curator... Correct me if I miss something...

Then, I go back to self-created one... now I am focusing on my shell scripts, and maybe I could share them out later... Just another option for people and just for fun as I learned during the time that bash shell is great to do lots of things... :slight_smile:

But I think that makes perfect sense... "enhancement requests are always welcome." I'm going to look back curator_cli if you think that to have curator natively support upgrade at some level is reasonable, or, it's better to be at higher level and call curator at low level, which also sounds good to me...

Curator will only ever be for index management. Restart assistance is not likely to be a part of it, though tools to help automate remote reindex are definitely on the table.

Restart assistance is not likely to be a part of it...

Yeah, that makes sense... sorry for the confusion... I'm not saying to have curator support restart... but just to give assistant to some extent, e.g. give upgrade suggestions based on source and target elasticsearch versions, a bit similar to Upgrade to Elastic 8.11.1 | Elastic Installation and Upgrade Guide [8.11] | Elastic, or show current upgrade status, or auto-adjust shard allocation before and after upgrade, and so on. I was doing that kind of work in my shell script at the moment... but of course, upgrade itself is more complicated that involves manual steps inevitably which doesn't have to be part of curator...

tools to help automate remote reindex are definitely on the table...

That's cool... wonder where I could find it... is there anything documented for this, e.g a github issue or something?

https://github.com/elastic/curator is the Curator repository address.

Cool, thanks Aaron... Just FYI, here's what I created using bash shell :slight_smile: https://github.com/morningspace/elastic-shell
Have fun!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.