How to write elasticsearch plugin for 2.2 version

i just want to write simple plugin for elasticsearch !! following seems not valid one

please help on this?

You could take a plugin that is similar to the one that you are trying to build and modify it to suit your needs?

is there any standard procedure to develop a plugin?

No, there is no guide about writing plugins and the API is actually quite unstable. The plugin API is mainly a way for us to provide additional functionality through plugins so that we do not have to fold everything into a single release artifact that would be quite huge. Some community membors have writter plugins by taking inspiration of existing plugins but we do not want to commit on a stable API for plugins as this might prevent us from improving other areas of elasticsearch.

We're getting it more stable in 5.0. In the master branch mostly you create a class that extends Plugin and implements SearchPlugin or implements AnalysisPlugin or something like that. Those interfaces have methods that you implement to build the things you are adding. Like SearchPlugin has getScoreFunctions which you could implement to make a new score function (like script_score or field_value_factor).

I've got an open PR that'll add getQueries which you can use add new queries.

What is it you want to add?

when elasticsearch starts need to send info (metadata about this server) to register in Eureka server (netflix). they have some tool it has lot things difficult to understand.
basically i'm new to elasticsearch.

Can you describe what task you want to solve by writing a plugin?

need to send the info to Eureka (which provides rest api). need to invoke some rest api (from eureka) in specified interval

But that looks more like a task for a simple ES client application.

what is mean by ES Client? any example plz