apiman: [Gateways][2.1.0] Unable to set different index metrics name for each gateway instance

Bonjour,

In our configuration, we have decided to create elasticsearch indices per gateway (more than 20 gateways)

With version 1.5.1, there was no problem with this configuration fixing index propertie for each component (snippet of relevant configuration below)

apiman.es.index=${env:APIMAN_GATEWAY_REGISTRY_CLIENT_INDEX}
apiman-gateway.registry.client.index=${apiman.es.index}_registry
apiman-gateway.metrics.client.index=${apiman.es.index}_metrics
apiman-gateway.components.ISharedStateComponent.client.index=${apiman.es.index}_share
apiman-gateway.components.IRateLimiterComponent.client.index=${apiman.es.index}_quota
apiman-gateway.components.ICacheStoreComponent.client.index=${apiman.es.index}_cache

With version 2.1.0, we want to keep the same configuration but index has been replaced by indexPrefix and the behaviour differs. With the configuration below

apiman.es.index=${env:APIMAN_GATEWAY_REGISTRY_CLIENT_INDEX}
apiman-gateway.registry.client.indexPrefix=${apiman.es.index}_registry
apiman-gateway.metrics.client.indexPrefix=${apiman.es.index}_metrics
apiman-gateway.components.ISharedStateComponent.client.indexPrefix=${apiman.es.index}_share
apiman-gateway.components.IRateLimiterComponent.client.indexPrefix=${apiman.es.index}_quota
apiman-gateway.components.ICacheStoreComponent.client.indexPrefix=${apiman.es.index}_cache

The first launch give us on elasticsearch those indices (with env APIMAN_GATEWAY_REGISTRY_CLIENT_INDEX=gw_test)

yellow open gw_test_metrics              ZnqEP2s0T5izK3lTY9drzg 1 1 0 0 208b 208b
yellow open gw_test_registry_apis        2AEQK4r7QVWJSYw7JE8zxw 1 1 0 0 208b 208b
yellow open gw_test_registry_clients     uNAjbeFxSOmTsPZdADmtVw 1 1 0 0 208b 208b
yellow open gw_test_registry_dataversion 9jpMxnsZQGWLNABGUvUPuw 1 1 0 0 208b 208b

On next step i declare a test api and request it, that generates a new apiman_metrics indice which will be global for all my gateway instances

yellow open apiman_metrics               uTWxXbqaQ0CSM7K5uDcp2Q 1 1 1 0 10.4kb 10.4kb
yellow open gw_test_metrics              ZnqEP2s0T5izK3lTY9drzg 1 1 0 0   208b   208b
yellow open gw_test_registry_apis        2AEQK4r7QVWJSYw7JE8zxw 1 1 1 0    7kb    7kb
yellow open gw_test_registry_clients     uNAjbeFxSOmTsPZdADmtVw 1 1 0 0   208b   208b
yellow open gw_test_registry_dataversion 9jpMxnsZQGWLNABGUvUPuw 1 1 1 0  3.1kb  3.1kb

Can you change the code to keep the same behaviour as before so we will keep the possibility to isolate each gateway datas on its proper indices group ?

Merci,

Regards,

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@volkflo , I had fix that issue … please let me know how can i contribute that .