{"id":13838572,"url":"https://github.com/aparo/opensearch-prometheus-exporter","last_synced_at":"2025-04-13T06:32:04.639Z","repository":{"id":39552193,"uuid":"379337224","full_name":"aparo/opensearch-prometheus-exporter","owner":"aparo","description":"OpenSearch Prometheus Exporter (fork of https://github.com/vvanholl/elasticsearch-prometheus-exporter)","archived":false,"fork":false,"pushed_at":"2022-06-01T01:34:29.000Z","size":421,"stargazers_count":41,"open_issues_count":11,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T23:11:23.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aparo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-06-22T16:39:21.000Z","updated_at":"2025-02-18T02:53:22.000Z","dependencies_parsed_at":"2022-09-20T05:43:50.865Z","dependency_job_id":null,"html_url":"https://github.com/aparo/opensearch-prometheus-exporter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aparo%2Fopensearch-prometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aparo%2Fopensearch-prometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aparo%2Fopensearch-prometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aparo%2Fopensearch-prometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aparo","download_url":"https://codeload.github.com/aparo/opensearch-prometheus-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674659,"owners_count":21143760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T16:00:21.868Z","updated_at":"2025-04-13T06:32:04.269Z","avatar_url":"https://github.com/aparo.png","language":"Java","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Prometheus Exporter Plugin for OpenSearch\n\nThis is a builtin exporter from OpenSearch to Prometheus based on the code of Vincent Van Hollebeke and others at https://github.com/vvanholl/elasticsearch-prometheus-exporter .\nIt collects all relevant metrics and makes them available to Prometheus via the OpenSearch REST API.\n\n**Currently, the available metrics are:**\n\n- Cluster status\n- Nodes status:\n    - JVM\n    - Indices (global)\n    - Transport\n    - HTTP\n    - Scripts\n    - Process\n    - Operating System\n    - File System\n    - Circuit Breaker\n- Indices status\n- Cluster settings\n\n## Compatibility matrix\n\n### Versions\n\n| OpenSearch  | Plugin         | Release date |\n| ----------- | -------------- | ------------ |\n| 1.0.0       | 1.0.0          | Jun 24, 2021 |\n| 1.1.0       | 1.1.0          | Oct 08, 2021 |\n| 1.2.0       | 1.2.0          | Nov 27, 2021 |\n| 1.2.2       | 1.2.2          | Dec 19, 2021 |\n| 1.2.3       | 1.2.3          | Dec 24, 2021 |\n\n## Install\n\n`./bin/opensearch-plugin install -b https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip`\n\n**Do not forget to restart the node after the installation!**\n\nNote that the plugin needs the following special permissions:\n\n- java.lang.RuntimePermission accessClassInPackage.sun.misc\n- java.lang.RuntimePermission accessDeclaredMembers\n- java.lang.reflect.ReflectPermission suppressAccessChecks\n\nIf you have a lot of indices and think this data is irrelevant, you can disable in the main configuration file:\n\n```\nprometheus.indices: false\n```\n\nTo disable exporting cluster settings use:\n```\nprometheus.cluster.settings: false\n```\n\nThese settings can be also [updated dynamically](https://www.elastic.co/guide/en/opensearch/reference/master/cluster-update-settings.html).\n\n## Uninstall\n\n`./bin/opensearch-plugin remove prometheus-exporter`\n\nDo not forget to restart the node after installation!\n\n## Usage\n\nMetrics are directly available at:\n\n    http://\u003cyour-opensearch-host\u003e:9200/_prometheus/metrics\n\nAs a sample result, you get:\n\n```\n# HELP es_process_mem_total_virtual_bytes Memory used by ES process\n# TYPE es_process_mem_total_virtual_bytes gauge\nes_process_mem_total_virtual_bytes{cluster=\"develop\",node=\"develop01\",} 3.626733568E9\n# HELP es_indices_indexing_is_throttled_bool Is indexing throttling ?\n# TYPE es_indices_indexing_is_throttled_bool gauge\nes_indices_indexing_is_throttled_bool{cluster=\"develop\",node=\"develop01\",} 0.0\n# HELP es_jvm_gc_collection_time_seconds Time spent for GC collections\n# TYPE es_jvm_gc_collection_time_seconds counter\nes_jvm_gc_collection_time_seconds{cluster=\"develop\",node=\"develop01\",gc=\"old\",} 0.0\nes_jvm_gc_collection_time_seconds{cluster=\"develop\",node=\"develop01\",gc=\"young\",} 0.0\n# HELP es_indices_requestcache_memory_size_bytes Memory used for request cache\n# TYPE es_indices_requestcache_memory_size_bytes gauge\nes_indices_requestcache_memory_size_bytes{cluster=\"develop\",node=\"develop01\",} 0.0\n# HELP es_indices_search_open_contexts_number Number of search open contexts\n# TYPE es_indices_search_open_contexts_number gauge\nes_indices_search_open_contexts_number{cluster=\"develop\",node=\"develop01\",} 0.0\n# HELP es_jvm_mem_nonheap_used_bytes Memory used apart from heap\n# TYPE es_jvm_mem_nonheap_used_bytes gauge\nes_jvm_mem_nonheap_used_bytes{cluster=\"develop\",node=\"develop01\",} 5.5302736E7\n\n...\n```\n\n### Configure the Prometheus target\n\nOn your Prometheus servers, configure a new job as usual.\n\nFor example, if you have a cluster of 3 nodes:\n\n```YAML\n- job_name: opensearch\n  scrape_interval: 10s\n  metrics_path: \"/_prometheus/metrics\"\n  static_configs:\n  - targets:\n    - node1:9200\n    - node2:9200\n    - node3:9200\n```\n\nOf course, you could use the service discovery service instead of a static config.\n\nJust keep in mind that `metrics_path` must be `/_prometheus/metrics`, otherwise Prometheus will find no metric.\n\nIf you enable security in OpenSearch, remember to set up the credentials also in Prometheus configuration.\n\n## Credits\n\nThis plugin mainly uses the [Prometheus JVM Client](https://github.com/prometheus/client_java).\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faparo%2Fopensearch-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faparo%2Fopensearch-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faparo%2Fopensearch-prometheus-exporter/lists"}