Nitesh Sharoff
03/17/2025, 8:04 AMkapa.ai
03/17/2025, 8:04 AMkapa.ai
03/17/2025, 8:04 AM.edr directory, typically at ~/.edr/config.yml (home directory) or you can specify a custom location using the --config-dir flag. ### Basic Structure For Slack configurations, your config.yml would look like: yaml slack: token: <your_slack_token> channel_name: <slack_channel_to_post_at> group_alerts_by: "table" # or "alert" anonymous_usage_tracking: False For Google Cloud Storage: yaml google: service_account_path: <path_to_service_account> gcs_bucket_name: <bucket_name> update_bucket_website: true ### Command Usage To use the config file, you would run: edr monitor --config-dir ./.edr or edr send-report --config-dir ./.edr ### Limitations There are several important limitations to be aware of: 1. Environment Variables: The config.yml file doesn't support environment variables or Jinja templating directly [as mentioned in multiple discussions](https://slack.com/archives/C02CTC89LAX/p1685126855599089). You cannot use syntax like ${WEBHOOK_URL} or {{ env_var('SLACK_TOKEN') }} in the config file. 2. Limited Parameters: Not all edr command parameters can be configured through config.yml. As noted by an Elementary staff member, "We have some tech debt around config.yml to be honest. At some point we decided to deprecate it, so didn't add new configs support to it" [from this discussion](https://slack.com/archives/C02CTC89LAX/p1695959017539929). 3. Command-specific Parameters: Parameters like --file-path, --target-path, --open-browser, --project-name, and --env cannot be set in the config.yml file [as confirmed here](https://slack.com/archives/C02CTC89LAX/p1736350825518229). ### Workarounds For parameters that can't be set in config.yml, you have two alternatives: 1. Use CLI Parameters: Pass parameters directly in the command line. 2. Use Environment Variables: Set environment variables like EDR_MONITOR_SLACK_TOKEN or EDR_SEND_REPORT_SLACK_TOKEN [as mentioned here](https://slack.com/archives/C02CTC89LAX/p1700737966995449). For example, instead of setting the token in config.yml, you can set the environment variable and leave the token field empty in the config file. If you need to use environment variables with your config file, you might need to use a script to generate the config file dynamically before running edr commands.Nitesh Sharoff
03/17/2025, 8:05 AMkapa.ai
03/17/2025, 8:05 AMkapa.ai
03/17/2025, 8:06 AMyaml # Slack configuration slack: notification_webhook: <your_slack_webhook_url> # or alternatively: token: <your_slack_token> channel_name: <slack_channel_name> # optional workflows: false group_alerts_by: "table" # or "alert" # Teams configuration teams: notification_webhook: <your_teams_webhook_url> # Google Cloud Storage configuration google: service_account_path: <path_to_service_account> gcs_bucket_name: <bucket_name> bucket_file_path: <path_in_bucket> update_bucket_website: true ### Other Settings yaml # Disable anonymous tracking anonymous_usage_tracking: False It's worth noting that there are significant limitations to what can be configured through the config.yml file. As mentioned in the knowledge sources, not all CLI parameters can be set via the config file. Parameters like project directory, profiles directory, file paths, environment settings, and many others must be passed as CLI arguments or environment variables. According to Elementary staff, "most of the configurations in the config.yml are also available through the cli params so you can run 'edr monitor report --help' to see which params are available" [from this discussion](https://slack.com/archives/C02CTC89LAX/p1674837405340689). Additionally, there appears to be some technical debt around the config.yml functionality, with some Elementary staff noting that they had considered deprecating it at one point but didn't follow through [as mentioned here](https://slack.com/archives/C02CTC89LAX/p1695959017539929). For the most up-to-date and comprehensive list of available options, I would recommend running the help command for the specific edr command you're using, such as edr monitor --help or edr report --help. I hope this helps with your configuration needs! User: What are the environment variables that can be used with edr?