# `Hemdal.Config.Backend.Env`
[🔗](https://github.com/altenwald/hemdal/blob/v1.4.0/lib/hemdal/config/backend/env.ex#L1)

Configuration backend reader using the environment or Elixir configuration.
See `Hemdal.Config.Backend` for further information.

The backend is needing the configuration (see `Application` or `Config`)
for specify the configuration as follows:

```elixir
# config/config.exs
import Config

config :hemdal, Hemdal.Config, [
  [
    id: "36c16e85-7221-4021-8d6d-89f38a6d136c",
    name: "valid alert check",
    enabled: true,
    host: [
      id: "ec8fff22-41c2-4245-8a7b-5157d40c33a7",
      module: Hemdal.Host.Local,
      name: "localhost"
    ],
    command: [
      name: "get ok status",
      type: "line",
      command: "echo '["OK", "valid one!"]'"
    ],
    check_in_sec: 60,
    recheck_in_sec: 1,
    broken_recheck_in_sec: 10,
    retries: 1
  ]
]
```

See `Hemdal.Config.Alert` and `Hemdal.Config.Host` for further information.

# `get_all_alerts`

```elixir
@spec get_all_alerts() :: [Hemdal.Config.Alert.t()]
```

Retrieve the full list of the alerts which appear in the environment
configuration.

# `get_all_hosts`

```elixir
@spec get_all_hosts() :: [Hemdal.Config.Host.t()]
```

Retrieve the full list of the hosts which appear in the environment
configuration.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
