Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ability to run multiple GrafanaAgent instances [#157](https://github.com/akoutmos/prom_ex/pull/157)
- Support for GrafanaAgent 28

### Fixed

- Application crashing on startup from being unable to upload dashboards due to folder UID changing [#177](https://github.com/akoutmos/prom_ex/pull/177)

## [1.7.1] - 2022-03-02

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion lib/prom_ex/dashboard_uploader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ defmodule PromEx.DashboardUploader do
{:ok, folder_details} ->
folder_details

{:error, :bad_request} ->
{:error, reason} ->
Logger.error("PromEx.DashboardUploader failed to create folder in Grafana: #{inspect(reason)}.")
{:ok, all_folders} = GrafanaClient.get_all_folders(grafana_conn)

all_folders
Expand Down
1 change: 1 addition & 0 deletions lib/prom_ex/grafana_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ defmodule PromEx.GrafanaClient do
401 => :unauthorized,
403 => :forbidden,
404 => :not_found,
409 => :already_exists,
412 => :already_exists
}

Expand Down
2 changes: 1 addition & 1 deletion test/prom_ex/dashboard_uploader_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ defmodule PromEx.DashboardUploaderTest do
}
"""

Plug.Conn.resp(conn, 400, response_payload)
Plug.Conn.resp(conn, 409, response_payload)
end)

Bypass.expect_once(bypass, "GET", "/api/folders", fn conn ->
Expand Down