prometheus-exporter-plugin-for-opensearch
prometheus-exporter-plugin-for-opensearch copied to clipboard
Installing the exporter on k8s env
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!
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.
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.
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?
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.
@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).