Hey Elementary team, We are trying Elementary OSS...
# community-support
m
Hey Elementary team, We are trying Elementary OSS. While pushing slack alerts, the cli commands are working as expected. however if we want to make use of config file or env variables, we are getting below error.
Copy code
Error: elementary.exceptions.exceptions.InvalidArgumentsError: You must provide a platform to upload the report to (Slack token / S3 / GCS).

Command we are trying: edr send-report --slack-channel-name elementary-poc-alerts
We are using variable -
EDR_SEND_REPORT_SLACK_TOKEN
cc: @Maayan Salom
n
Hey @Mandar! Have you tried adding this:
Copy code
slack:
  token: <your_slack_token>
  channel_name: <slack_channel_to_post_at>
  group_alerts_by: <"table"> or <"alert">

# optional #
timezone: <optional_timezone_for_timestamps>
to your config.yml file? (as mentioned here)
m
@Noa Kurman We can’t add slack_token to config.yml as it will be available in git.
n
Got you 👍 So how exactly are you trying to provide the variable in the command? Since I don’t see you’re
--slack-token
in the command
m
Copy code
edr monitor --suppression-interval 24 --slack-token $EDR_SEND_REPORT_SLACK_TOKEN --slack-channel-name kyx-domain-data-alerts
EDR_SEND_REPORT_SLACK_TOKEN is a workspace variable which has value of slack token. Earlier we were providing config file path in command..
m
Hey @Mandar, The error means the CLI is not getting the token. As your syntax looks correct, I assume it means the env var isn't configured / accessible. The way to validate it would be to pass the token itself in the command and see if the error is resolved. Could you please try and let us know?