Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Grafana dashboards and alerts to monitor Thanos #73

Merged
merged 3 commits into from
Feb 9, 2024
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
32 changes: 30 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v3.0.1"`
Default: `"v3.1.0"`

==== [[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -172,6 +172,22 @@ Type: `any`

Default: `{}`

==== [[input_enable_service_monitor]] <<input_enable_service_monitor,enable_service_monitor>>

Description: Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here].

Type: `bool`

Default: `false`

==== [[input_enable_monitoring_dashboard]] <<input_enable_monitoring_dashboard,enable_monitoring_dashboard>>

Description: Boolean to enable the provisioning of multiple Grafana dashboards, one for each component of Thanos. These dashboards are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/tree/main/examples/dashboards[here]. Requires the variable `enable_service_monitor` to be set to `true`.

Type: `bool`

Default: `true`

=== Outputs

The following outputs are exported:
Expand Down Expand Up @@ -261,7 +277,7 @@ Description: ID to pass other modules in order to refer to this module as a depe
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v3.0.1"`
|`"v3.1.0"`
|no

|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down Expand Up @@ -320,6 +336,18 @@ object({
|`{}`
|no

|[[input_enable_service_monitor]] <<input_enable_service_monitor,enable_service_monitor>>
|Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here].
|`bool`
|`false`
|no

|[[input_enable_monitoring_dashboard]] <<input_enable_monitoring_dashboard,enable_monitoring_dashboard>>
|Boolean to enable the provisioning of multiple Grafana dashboards, one for each component of Thanos. These dashboards are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/tree/main/examples/dashboards[here]. Requires the variable `enable_service_monitor` to be set to `true`.
|`bool`
|`true`
|no

|===

= Outputs
Expand Down
32 changes: 30 additions & 2 deletions aks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v3.0.1"`
Default: `"v3.1.0"`

==== [[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -376,6 +376,22 @@ Type: `any`

Default: `{}`

==== [[input_enable_service_monitor]] <<input_enable_service_monitor,enable_service_monitor>>

Description: Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here].

Type: `bool`

Default: `false`

==== [[input_enable_monitoring_dashboard]] <<input_enable_monitoring_dashboard,enable_monitoring_dashboard>>

Description: Boolean to enable the provisioning of multiple Grafana dashboards, one for each component of Thanos. These dashboards are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/tree/main/examples/dashboards[here]. Requires the variable `enable_service_monitor` to be set to `true`.

Type: `bool`

Default: `true`

=== Outputs

The following outputs are exported:
Expand Down Expand Up @@ -488,7 +504,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v3.0.1"`
|`"v3.1.0"`
|no

|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down Expand Up @@ -547,6 +563,18 @@ object({
|`{}`
|no

|[[input_enable_service_monitor]] <<input_enable_service_monitor,enable_service_monitor>>
|Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here].
|`bool`
|`false`
|no

|[[input_enable_monitoring_dashboard]] <<input_enable_monitoring_dashboard,enable_monitoring_dashboard>>
|Boolean to enable the provisioning of multiple Grafana dashboards, one for each component of Thanos. These dashboards are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/tree/main/examples/dashboards[here]. Requires the variable `enable_service_monitor` to be set to `true`.
|`bool`
|`true`
|no

|===

= Outputs
Expand Down
4 changes: 3 additions & 1 deletion aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ module "thanos" {
target_revision = var.target_revision
cluster_issuer = var.cluster_issuer
deep_merge_append_list = var.deep_merge_append_list
enable_service_monitor = var.enable_service_monitor
app_autosync = var.app_autosync
dependency_ids = var.dependency_ids

thanos = var.thanos
thanos = var.thanos
enable_monitoring_dashboard = var.enable_monitoring_dashboard

helm_values = concat(local.helm_values, var.helm_values)
}
Loading