-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated README with app level index routing #292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
You can also update the env on the fly using cf-cli command: | ||
``` | ||
cf set-env <APP_NAME> SPLUNK_INDEX <ENV_VAR_VALUE> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this, if you set-env via CLI, you still need to restage the application for those updated envs to take effect. Please cross check. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this, if you set-env via CLI, you still need to restage the application for those updated envs to take effect. Please cross check. Thanks!
In my testing, I was able to route data-gen events to the index provided using cf command. I tested following scenarios:
- deployed data_gen without setting SPLUNK_INDEX env variable and set env after it is deployed
- deployed data_gen with setting SPLUNK_INDEX env variable and update env with new index value
In both cases, event were ingested in newly specified index.
I think, if the app is using the environment variable then we are required to restage the application. For our use case, app doesn't rely on SPLUNK_INDEX, so no need to restage. Cloud controller endpoint will always returns latest env data. So as long as connector is invalidating app cache, it should be fine
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. |
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. |
39d3254
to
1a00c2d
Compare
README.md
Outdated
Index routing is a feature that can be used to send different Cloud Foundry logs to different indexes for better ACL and data retention control in Splunk. | ||
|
||
#### Per application index routing via application manifest | ||
### Per application index routing via application manifest | ||
To enable per app index routing, you are required to set environmt variable `SPLUNK_INDEX`in your application and enable ADD_APP_INFO(Select at least one metadata) to enable app info caching. Make sure that given HEC token can ingest events to the SPLUNK_INDEX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update as below:
To enable per application index routing:
- Please set environment variable
SPLUNK_INDEX
in your application's manifest (example below - link to the example) - Make sure Splunk nozzle is configured with ADD_APP_INFO (Select at least one of AppName, OrgName/Id, SpaceName/id) to enable app info caching
- Make sure SPLUNK_INDEX specified in app's manifest exist in Splunk and can receive data for the configured Splunk HEC token.
Thanks for the update @harshit-splunk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this - note for SPLUNK_VERSION
Please remove this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* update docs (#276) * Update Go version and migrate to Go modules (#287) * Adding go.mod and go.sum to migrate to Go modules from Glide * Removed old Vendor folder after migrating to Go modules * Adding new Vendor folder after migrating to Go mudules * Removed Glide files, references in readme and updated CI/CD * Migrated from bolt to bbolt for cache module to resolve race issue * Added tags from the envelope to the events * Updated tile.yml with new config * Updated README * Updated migration script to prevent unnecessary migration (#288) * Updated cache.GetApp logic to retrieve app info from boltdb database as well * Bugfix/disconnect due to slow consumer event drop (#289) * dropping events when the queue is full * Corrected the newly added test case with data race condition * minor change in logging * added event drop warning threshold in config * minor update in the logging * Updated comments and log info * Trimmed white space for ApiEndPoint and SplunkHost * Updated docs with required field & optional value * Added default value in README * Updated events doc * Removed SPLUNK_VERSION config as not needed anymore * Removed SplunkVersion from eventsink.splunk_test * Updated README with app level index routing (#292) * Updated README with app level index routing * Removed unnecessary changes * added required config to enable index routing * updated index routing doc * added warning in index routing docs * upgraded module version * upgraded gogo/protobuf version * executed go mod tidy * upgraded indirect dependency * updated version in a build example in readme * Corrected index routing docs * Added more details (#299) * Updated docs around - Add Tags: Performance impact of adding tags in events - How to detect slow downstream related issues and event drops * added 'drop_warn_threshold' config in tile (#300) Co-authored-by: Matthew Heidemann <[email protected]> Co-authored-by: Shubham Jain <[email protected]> Co-authored-by: harshit-splunk <[email protected]> Co-authored-by: harshit-splunk <[email protected]>
No description provided.