diff --git a/api/config.js b/api/config.js index b86e3d7..9285bb4 100644 --- a/api/config.js +++ b/api/config.js @@ -147,6 +147,17 @@ const ES_PLATFORM_NAME = process.env.ES_PLATFORM_NAME || flags.esPlatformName const ES_CONTINUITY_NAME = process.env.ES_CONTINUITY_NAME || flags.esContinuityName || 'anxincloud' || 'anxinyun'; +const ES_ANXINYUN_RAWS = process.env.ES_ANXINYUN_RAWS || flags.esAnxinyunRaws + || 'anxinyun' + || 'anxincloud' +const ES_ANXINYUN__VBRAWS = process.env.ES_ANXINYUN__VBRAWS || flags.esAnxinyunVbRaws + || 'anxinyun' + || 'anxincloud' +const ES_ANXINCLOUD_ALARMS = process.env.ES_ANXINCLOUD_ALARMS || flags.esAnxinCloudAlarms + || 'anxincloud' + || 'anxinyun'; + + const ANXINCLOUD_ES_NODES_REST = process.env.ANXINCLOUD_ES_NODES_REST || flags.es; // //business_key // const BUSINESS_KEY=process.env.BUSINESS_KEY||['160','161'] @@ -376,17 +387,17 @@ const product = { }, rawData: { rootURL: ANXINCLOUD_ES_NODES_REST.split(','), - index: `${PLATFORM_NAME}_raws`, + index: `${ES_ANXINYUN_RAWS}_raws`, type: flags.esType ? flags.esType : '_doc' }, vbRawData: { rootURL: ANXINCLOUD_ES_NODES_REST.split(','), - index: `${PLATFORM_NAME}_vbraws`, + index: `${ES_ANXINYUN__VBRAWS}_vbraws`, type: flags.esType ? flags.esType : '_doc' }, alarm: { rootURL: ANXINCLOUD_ES_NODES_REST.split(','), - index: `${PLATFORM_NAME}_alarms`, + index: `${ES_ANXINCLOUD_ALARMS}_alarms`, type: flags.esType ? flags.esType : '_doc' }, }