Closed hvaghani221 closed 3 years ago
Lets also add that "ADD_APP_INFO" (cache info) is required to be enabled for per app index routing feature. If Add-app-info is not enabled, nozzle will not have app's metadata which will include SPLUNK_INDEX value.
It doen't depend on ADD_APP_INFO config. As you can see in router, as long as event has app_id, it will call event.AnnotateWithAppData method. In event.AnnotateWithAppData method, it gets app information from cache from cf_app_id. If it find's SPLUNK_INDEX in app env, it'll add _info_splunkindex field in the event
ADD_APP_INFO config triggers nozzle to fetch cache info for apps. If it's not selected, then nozzle won't have cache info, which means it won't have env variables either. Let me know if it's otherwise.
Lets also add that "ADD_APP_INFO" (cache info) is required to be enabled for per app index routing feature. If Add-app-info is not enabled, nozzle will not have app's metadata which will include SPLUNK_INDEX value.
It doen't depend on ADD_APP_INFO config. As you can see in router, as long as event has app_id, it will call event.AnnotateWithAppData method. In event.AnnotateWithAppData method, it gets app information from cache from cf_app_id. If it find's SPLUNK_INDEX in app env, it'll add _info_splunkindex field in the event
ADD_APP_INFO config triggers nozzle to fetch cache info for apps. If it's not selected, then nozzle won't have cache info, which means it won't have env variables either. Let me know if it's otherwise.
On further analysis, found that boltdb cache is initialised only if ADD_APP_INFO is enabled otherwise NoCache is initialised. And app info will never be fetched from remote. I'll make changes according to that. Thanks.
Thanks for the update @harshit-splunk.
It doen't depend on ADD_APP_INFO config. As you can see in router, as long as event has app_id, it will call event.AnnotateWithAppData method. In event.AnnotateWithAppData method, it gets app information from cache from cf_app_id. If it find's SPLUNK_INDEX in app env, it'll add _info_splunkindex field in the event