prometheus-exporter-plugin-for-opensearch icon indicating copy to clipboard operation
prometheus-exporter-plugin-for-opensearch copied to clipboard

Installing the exporter on k8s env

Open idanl21 opened this issue 2 years ago • 5 comments

Hey all! Im running my OpenSearch cluster on k8s env and i want to install the exporter on the OpenSearch nodes (pods), from a quick look on your repo i noticed that a restart is needed after installing the exporter on a node. what will be the best why to install it? init container to the pods ?

Thanks!

idanl21 avatar Jun 23 '22 08:06 idanl21

Hi, I would recommend preparing your own container image that has the OpenSearch node with pre-installed plugin in it. In any case you want to install the plugin before the node is started. IMO that is the easiest solution.

But of course this depends on your use case. If you plan to give user the option to install any plugins on the OS node (including 3rd party or custom plugins) then this is completely different conversation.

lukas-vlcek avatar Jun 23 '22 09:06 lukas-vlcek

Also it is worth considering the fact that the plugin can be installed on specific nodes only, still it can provide metrics from the whole cluster. So it is possible to think about scenario where the plugin will be running on "dedicated nodes" only (and prometheus will need to have access to those nodes only as well). Not saying this is typical use case but is possible.

lukas-vlcek avatar Jun 23 '22 09:06 lukas-vlcek

Hey @lukas-vlcek, thanks ! Do you mean that i can install the plugin only on one node and still export metrics from all the cluster?

idanl21 avatar Jun 23 '22 13:06 idanl21

Yes, @idanl21 that is exactly possible too.

See nodes filter feature: https://github.com/aiven/prometheus-exporter-plugin-for-opensearch#nodes-filter To learn more details about nodes filter see OpenSearch docs: https://opensearch.org/docs/latest/opensearch/rest-api/nodes-apis/index/#node-filters

This can give users a lot of flexibility, for example you can pull metrics from [data nodes | ML nodes | master nodes] only if you want ... or you may decide that you do not want to install the plugin on master nodes and still be able to get all nodes stats ... the possibilities are quite generic.

lukas-vlcek avatar Jun 23 '22 14:06 lukas-vlcek

@idanl21 What do you mean by SecurityConfig file? I am not sure I understand.

The plugin ZIP basically needs to be extracted in <OS_HOME>/plugins/<PLUGIN_NAME> folder then it will be recognised when the node starts. I think it is also possible to install plugins into a custom folder (see https://github.com/opensearch-project/OpenSearch/pull/848 - I was not able to find a documentation for this feature hence the link to the ticket).

lukas-vlcek avatar Jun 29 '22 10:06 lukas-vlcek