Is it possible to retrieve an env flag for the mon...
# ask-elementary-ai
c
Is it possible to retrieve an env flag for the monitor function to display the concerned env on slack ?
k
Using --env Flag with edr monitor The
--env
flag accepts only
dev
or
prod
as valid values — custom values like
prod-us
or
UAT
are not supported. [CLI options] However, there is an important limitation: the
--env
flag does not currently affect the content of individual Slack alerts sent by
edr monitor
. It only influences: 1.
edr report
— shows the environment in the top right of the report. 2.
edr send-report
— includes the environment in the summary title sent to Slack. [env flag behavior] A bug was previously reported where the
--env
flag was not visible in Teams/Slack alerts even though it appeared in the report. This was acknowledged and fixed in a subsequent release. [bug fix] Workarounds for environment visibility in alerts Since
--env
is limited to `dev`/`prod` and doesn't enrich individual alert messages, a common community approach is to use separate Slack channels per environment (e.g.,
data-alerts-prod
vs
data-alerts-dev
), which makes the environment immediately obvious without expanding the alert. [community approach] If you need a custom environment label (e.g.,
prod-us
), you can use the
--project-name
flag as a workaround:
Copy code
edr monitor --project-name "MyProject (prod-us)" --slack-token <token> --slack-channel-name <channel>
[project-name workaround] 👍 0 button 👎 0 button â„šī¸ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.
c
The project name flag doesn't exists