# Performance\_analyzer: Config

**URL:** <https://forum.opensearch.org/t/performance-analyzer-config/19951>\
**Category:** Performance Analyzer\
**Tags:** configure\
**Created:** [June 21, 2024, 2:51pm UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951 "2024-06-21T14:51:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![learnawsnaresh](https://avatars.discourse-cdn.com/v4/letter/l/ee7513/32.png) [@learnawsnaresh](https://forum.opensearch.org/u/learnawsnaresh)\
**Post date:** [June 21, 2024, 2:51pm UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/1 "2024-06-21T14:51:06Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
Open search helm vesion= 2.20.0  
Dashboard version= 2.18.0  
Opensearch version= 2.14.0

**Describe the issue** :  
As I am using the latest version 2.14.0 by default performance analyzer plugin is available. How should I enable to collect the metrics. When I execute the API call ## GET localhost:9200/\_plugins/\_performanceanalyzer/metrics/units. I got the response like {  
“error”: “no handler found for uri [/localhost:9200/\_plugins/\_performanceanalyzer/metrics/units] and method [GET]”  
}

I saw the document, there is no straight forward congif explained for helm chart. should I do below settings. and this setup has to be done on both master, data, and dashboards?

config:  
opensearch.yml: |  
plugins.performance\_analyzer.enabled: true

Under node I should use this config?

extraEnvs:  
- name: OPENSEARCH\_JAVA\_OPTS  
value: “-Dcom.amazon.opendistro.elasticsearch.performanceanalyzer.enabled=true”  
extraVolumes:  
- name: performance-analyzer-logs  
emptyDir:  
medium: Memory  
sizeLimit: 1Gi  
extraVolumeMounts:  
- name: performance-analyzer-logs  
mountPath: /dev/shm  
extraInitContainers:  
- name: install-performance-analyzer-agent  
image: busybox:1.31.1  
command: [‘sh’, ‘-c’, ‘mkdir -p /dev/shm && chown -R 1000:1000 /dev/shm’]

**Configuration** :

## My current config.

clusterName: “opensearch-cluster”  
nodeGroup: “data”

roles:

- ingest
- data
- remote\_cluster\_client

replicas: 2

masterService: “opensearch-cluster-master”

extraEnvs:

- name: OPENSEARCH\_INITIAL\_ADMIN\_PASSWORD  
value: ###########
- name: AWS\_ROLE\_ARN  
value: ${DATA\_AWS\_ROLE\_ARN}

rbac:  
create: true  
serviceAccountAnnotations:  
[eks.amazonaws.com/role-arn:](http://eks.amazonaws.com/role-arn:) ${DATA\_AWS\_ROLE\_ARN}  
serviceAccountName: ${data\_service\_account\_name}  
automountServiceAccountToken: true

persistence:  
labels:  
# Add default labels for the volumeClaimTemplate of the StatefulSet  
enabled: false  
accessModes:  
- ReadWriteOnce  
size: 10Gi

plugins:  
enabled: true  
installList:

- repository-s3

extraVolumes:

- name: aws-iam-token  
projected:  
sources:  
- serviceAccountToken:  
audience: [sts.amazonaws.com](http://sts.amazonaws.com)  
expirationSeconds: 86400  
path: token

extraVolumeMounts:

- name: I am-token  
mountPath: /usr/share/opensearch/config/token

config:  
opensearch.yml: |  
cluster.name: opensearch-cluster  
network.host: 0.0.0.0

```
plugins.security.disabled: true
plugins.security.ssl.http.clientauth_mode: NONE
plugins.security.ssl.http.enabled: false
plugins.security.ssl.transport.enabled: false
plugins.security.ssl.transport.enforce_hostname_verification: false

plugins.security.allow_default_init_securityindex: true
plugins.security.allow_unsafe_democertificates: true
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true

plugins.security.protected_indices.enabled: true
plugins.security.protected_indices.roles: ['all_access']
plugins.security.protected_indices.indices: []

plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]

opensearch.experimental.feature.extensions.enabled: true

node.max_local_storage_nodes: 2

cluster.allocator.existing_shards_allocator.batch_enabled: true
cluster.routing.allocation.enable: all

snapshot.max_concurrent_operations: 1

s3.client.default.identity_token_file: /usr/share/opensearch/config/aws-iam-token/token
s3.client.default.region: us-east-1

```

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![learnawsnaresh](https://avatars.discourse-cdn.com/v4/letter/l/ee7513/32.png) [@learnawsnaresh](https://forum.opensearch.org/u/learnawsnaresh)\
**Post date:** [June 24, 2024, 5:02am UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/2 "2024-06-24T05:02:29Z")

</div>

Hi,

Please give me an update on this?

---

<div class="post-metadata">

**Author:** ![learnawsnaresh](https://avatars.discourse-cdn.com/v4/letter/l/ee7513/32.png) [@learnawsnaresh](https://forum.opensearch.org/u/learnawsnaresh)\
**Post date:** [June 24, 2024, 1:15pm UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/3 "2024-06-24T13:15:56Z")

</div>

Can someone please address this ?

---

<div class="post-metadata">

**Author:** ![learnawsnaresh](https://avatars.discourse-cdn.com/v4/letter/l/ee7513/32.png) [@learnawsnaresh](https://forum.opensearch.org/u/learnawsnaresh)\
**Post date:** [June 24, 2024, 8:04pm UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/4 "2024-06-24T20:04:42Z")

</div>

Can someone reply.

I have enabled the plugin by using this cmd "  
curl -XPOST localhost:9200/\_plugins/\_performanceanalyzer/cluster/config -H ‘Content-Type: application/json’ -d ‘{“enabled”: true}’"

I saw some logs are written under the “/dev/shm/performanceanalyzer/” as below.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/e/e110d15d73649b0b6c123f378b4355a5f9113be7.png)

post that what I have to do? How should I create the dashboard to see the metrics?

Should I install the performance analyzer agent and that I will run on the 9600 port? I am using the helm chart I have already given the details above.

---

<div class="post-metadata">

**Author:** ![pdcuong27](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pdcuong27](https://forum.opensearch.org/u/pdcuong27)\
**Post date:** [August 15, 2024, 3:21am UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/5 "2024-08-15T03:21:11Z")

</div>

Hi, did you resolve this problem?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [August 23, 2024, 12:55am UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/6 "2024-08-23T00:55:26Z")

</div>

@pdcuong27 @learnawsnaresh There is an issue with Performance Analyzer and it has already been reported in GitHub. This affects all versions starting from 2.12.0

> <https://github.com/opensearch-project/performance-analyzer-rca/issues/545>
>
> \*\*What is the bug?\*\*
> Opensearch performance analyzer app throws exception on st…artup and is not working.
> 
> \*\*How can one reproduce the bug?\*\*
> Steps to reproduce the behavior:
> 1. Run opensearch from docker image: opensearchproject/opensearch:2.12.0 expose port 9600
> 2. GET localhost:9600/\_plugins/\_performanceanalyzer/metrics
> 3. Hangs indefinitely (aka, no response is ever returned)
> 
> 
> \*\*What is the expected behavior?\*\*
> Expected is that the webserver API on port 9600 returns a response.
> 
> \*\*What is your host/environment?\*\*
> - OS: opensearchproject/opensearch:2.12.0 
> - Version 2.12.0
> - Plugins
> 
> \*\*Do you have any additional context?\*\*
> See logs/PerformanceAnalyzer.log and notice:
> \`\`\`
> Exception in thread "main" java.lang.IllegalArgumentException: cannot add context to list
> at jdk.httpserver/sun.net.httpserver.ContextList.add(ContextList.java:37)
> at jdk.httpserver/sun.net.httpserver.ServerImpl.createContext(ServerImpl.java:276)
> at jdk.httpserver/sun.net.httpserver.HttpServerImpl.createContext(HttpServerImpl.java:74)
> at jdk.httpserver/sun.net.httpserver.HttpServerImpl.createContext(HttpServerImpl.java:39)
> at org.opensearch.performanceanalyzer.PerformanceAnalyzerApp.createClientServers(PerformanceAnalyzerApp.java:354)
> at org.opensearch.performanceanalyzer.PerformanceAnalyzerApp.createClientServers(PerformanceAnalyzerApp.java:319)
> at org.opensearch.performanceanalyzer.PerformanceAnalyzerApp.main(PerformanceAnalyzerApp.java:112)
> \`\`\`
> Checking the source code it is clear that the same handler is added twice, so the createContext functions throws an exception on the second attempt.
> Code from PerformanceAnalyzerApp.java:
> \`\`\`
> httpServer.createContext(Util.METRICS\_QUERY\_URL, queryMetricsRequestHandler);
> httpServer.createContext(
> Util.LEGACY\_OPENDISTRO\_METRICS\_QUERY\_URL, queryMetricsRequestHandler);
> \`\`\`
> The Util.METRICS\_QUERY\_URL and Util.LEGACY\_OPENDISTRO\_METRICS\_QUERY\_URL are equal.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [October 22, 2024, 12:55am UTC](https://forum.opensearch.org/t/performance-analyzer-config/19951/7 "2024-10-22T00:55:43Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
