Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch 2.13.0
Describe the issue:
Like elasticsearch self monitoring, How to enable opensearch cluster monitoring? self monitoring available with opensearch? If yes , how to achieve this?
Configuration:
Relevant Logs or Screenshots:
Hi @mangesh.mathe.9 ,
What data would you like to monitor?
To monitor your cluster, you can use Performance analyzer
:
Also, it’s possible to use Metricbeat
:
If you want to use a version of Metricbeat higher than 7.12.1, you have to use Logstash between OpenSearch and Metricbeat.
In elasticsearch, we have self monitoring without installing metricbeat.
So this capability is available with opensearch or not?
I have just read topics about self-monitoring in ElasticSearch. It is not recommended for use in production and was removed in Elasticsearch version 8.0:
I haven’t found any information in the documentation about self-monitoring in OpenSearch.
Hello Eugene,
I have found this , this is what I’m looking for . If it is possible how can achieve this?
I’m trying to enable cluster monitoring using Performance analyzer.
I can see I have the opensearch-performance-analyzer plugin and service.
Also , did change the performance-analyzer.properties and started opensearch-performance-analyzer.service (started)
But could not be able to get the metrics using API
GET myhostname:9600/_plugins/_performanceanalyzer/metrics/units
could you please suggest If I mised something to configure.
# ======================== OpenSearch performance analyzer plugin config =========================
# NOTE: this is an example for Linux. Please modify the config accordingly if you are using it under other OS.
# Metrics data location
metrics-location = /dev/shm/performanceanalyzer/
# Metrics deletion interval (minutes) for metrics data.
# Interval should be between 1 to 60.
metrics-deletion-interval = 1
# If set to true, the system cleans up the files behind it. So at any point, we should expect only 2
# metrics-db-file-prefix-path files. If set to false, no files are cleaned up. This can be useful, if you are archiving
# the files and wouldn't like for them to be cleaned up.
cleanup-metrics-db-files = true
# WebService exposed by App's port
webservice-listener-port = 9600
# Port for RPC Communication
rpc-port = 9650
# Metric DB File Prefix Path location
metrics-db-file-prefix-path = /tmp/metricsdb_
https-enabled = true
# Setup the correct path for server certificates
#certificate-file-path = specify_path
#private-key-file-path = specify_path
#trusted-cas-file-path = specify_path
# Setup the correct path for client certificates (by default, the client will just use the server certificates)
#client-certificate-file-path = specify_path
#client-private-key-file-path = specify_path
#client-trusted-cas-file-path = specify_path
# WebService bind host; default only to local interface
webservice-bind-host = 0.0.0.0
# Plugin Stats Metadata file name, expected to be in the same location
plugin-stats-metadata = plugin-stats-metadata
# Agent Stats Metadata file name, expected to be in the same location
agent-stats-metadata = agent-stats-metadata
Hi @mangesh.mathe.9,
According to the following documentation, setting https-enabled = true
enables encryption in transit for requests.
If it is enabled, you also need to specify certificate-file-path
and private-key-file-path
.
Have you tried setting https-enabled = false
or adding certificate-file-path
and private-key-file-path
?
Yes, I have tried setting https-enabled = false also…Still not able to fetch the cluster metrics data.
I have added this https-enabled=true…because I’m using https opensearch and opensearch-dashboard
@mangesh.mathe.9 ,
Please check if the plugin is installed. For that, you can execute the following command and check if there is the opensearch-performance-analyzer
plugin in the list.
GET _cat/plugins?v
What is the output of the command above?
Where did you execute the command? How did you install OpenSearch?
No output…I have run this in Dev tool.
in output,
{
“error”: “no handler found for uri [myhostname:9600/_plugins/_performanceanalyzer/metrics/units] and method [GET]”
}
Hi @mangesh.mathe.9 ,
Could you please share the output of the following commands?
GET _plugins/_performanceanalyzer/cluster/config
GET _plugins/_performanceanalyzer/config
Hello Eugene,
here’s the output,
GET _plugins/_performanceanalyzer/cluster/config
{
“currentPerformanceAnalyzerClusterState”: 0,
“shardsPerCollection”: 0,
“batchMetricsRetentionPeriodMinutes”: 7
}
GET _plugins/_performanceanalyzer/config
{
“performanceAnalyzerEnabled”: false,
“rcaEnabled”: false,
“loggingEnabled”: false,
“shardsPerCollection”: 0,
“batchMetricsEnabled”: false,
“threadContentionMonitoringEnabled”: false,
“batchMetricsRetentionPeriodMinutes”: 7
}
Hi @mangesh.mathe.9 ,
The performanceAnalyzer is not enabled in your configurations. As per the documentation, you need to execute the following command to enable Performance Analyzer:
curl -XPOST localhost:9200/_plugins/_performanceanalyzer/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}'
Hello Eugene,
Even I have enabled the performanceAnalyzer, I’m not able to view metrics.
GET _plugins/_performanceanalyzer/cluster/config
{
“currentPerformanceAnalyzerClusterState”: 7,
“shardsPerCollection”: 0,
“batchMetricsRetentionPeriodMinutes”: 7
}
GET _plugins/_performanceanalyzer/config
{
“performanceAnalyzerEnabled”: true,
“rcaEnabled”: true,
“loggingEnabled”: true,
“shardsPerCollection”: 0,
“batchMetricsEnabled”: false,
“threadContentionMonitoringEnabled”: false,
“batchMetricsRetentionPeriodMinutes”: 7
}
When I do , GET _plugins/_performanceanalyzer/metrics/units
Below error output is coming on dev tool,
{
“error”: “no handler found for uri [/_plugins/_performanceanalyzer/metrics/units] and method [GET]”
}
Hi @mangesh.mathe.9,
I have tested Performance Analyzer by running different versions of OpenSearch. It seems that starting from version 2.12, an example from the documentation doesn’t work.
Could you please create an issue on GitHub?