Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/provectus/sak-prometheus

Prometheus & alertmanager & grafana module for SAK project
https://github.com/provectus/sak-prometheus

aws devops monitoring open-source prometheus swiss-army-kube

Last synced: 4 days ago
JSON representation

Prometheus & alertmanager & grafana module for SAK project

Awesome Lists containing this project

README

        

# About this module

This module can install:
### Prometheus: [Documentation](https://prometheus.io/docs/introduction/overview/)
### Grafana: [Documentation](https://grafana.com/docs/)
### Thanos. [Documentation](https://thanos.io/tip/thanos/getting-started.md/)

## How to change infrastructure

* New namespace will be created (by default name "monitoring")
* New 3 applications for ArgoCD (grafana, prometheus, thanos)
* New ingress and dns records will be created (thanos.domain.name, grafana.domain.name). You can disable ingress if provide additional config (grafana_conf = {ingress.enabled = false} and thanos_conf = {queryFrontend.ingress.enabled = false}
* If ingress is disabled, you can test locally by port-forwarding (example: kubectl port-forward grafana-pod 3000:3000)
* By default, thanos backend will create s3 bucket "-thanos and IAM policy.
## Prometheus
Install the [kube-prometheus](https://github.com/bitnami/charts/tree/master/bitnami/kube-prometheus), de-facto standard for monitoring.
## Grafana
Install the [grafana](https://github.com/grafana/helm-charts/tree/main/charts/grafana), web dashboarding system
## Thanos
Install the [thanos](https://github.com/bitnami/charts/tree/master/bitnami/thanos), long term storage capabilities for prometheus
## Example
``` hcl
module "prometheus" {
depends_on = [module.argocd]
source = "github.com/provectus/sak-prometheus"
cluster_name = module.eks.cluster_id
argocd = module.argocd.state
domains = local.domain
tags = local.tags
}
```

Optional parameters
```
namespace = "moniroting" # Set namespace to install all charts
thanos_enabled = true # Enable install thanos application
grafana_enabled = true # Enable install prometheus application
prometheus_enabled = true # Enable install grafana application
thanos_storage = "s3" # Object storage backend.
thanos_password = "password" # Use as minio secret if thanos_storage = "minio"
grafana_password = "password" # Set grafana admin password, autogenerate and store to paramstore if empty
grafana_google_auth = true
grafana_client_id = "xxxxx"
grafana_client_secret = "xxxxx"
grafana_allowed_domains = "example.com"
thanos_conf = {} # Additional thanos configurations
grafana_conf = {} # Additional grafana configurations
prometheus_conf = {} # Additional prometheus configurations
```

## Requirements

```
terraform >= 1.1
```

## Providers

| Name | Version |
|------|---------|
| aws | >= 3.0 |
| helm | >= 1.0 |
| kubernetes | >= 1.11 |
| local | >= 2.1.0 |
| random | >= 3.1.0 |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| argocd | A set of values for enabling deployment through ArgoCD | `map(string)` | `{}` | no |
| cluster\_name | A name of the Amazon EKS cluster | `string` | `null` | no |
| domains | A list of domains to use for ingresses | `list(string)` |

[
"local"
]
| no |
| grafana\_allowed\_domains | Allowed domain for Grafana Google auth | `string` | `"local"` | no |
| grafana\_chart\_version | A Grafana Chart version | `string` | `"6.13.9"` | no |
| grafana\_client\_id | The id of the client for Grafana Google auth | `string` | `""` | no |
| grafana\_client\_secret | The token of the client for Grafana Google auth | `string` | `""` | no |
| grafana\_conf | A custom configuration for deployment | `map(string)` | `{}` | no |
| grafana\_enabled | Enable install grafana | `bool` | `true` | no |
| grafana\_google\_auth | Enables Google auth for Grafana | `string` | `false` | no |
| grafana\_password | Password for grafana admin | `string` | `""` | no |
| module\_depends\_on | A list of explicit dependencies | `list(any)` | `[]` | no |
| namespace | A name of the existing namespace | `string` | `""` | no |
| namespace\_name | A name of namespace for creating | `string` | `"monitoring"` | no |
| prometheus\_chart\_version | A Prometheus Chart version | `string` | `"6.1.1"` | no |
| prometheus\_conf | A custom configuration for deployment | `map(string)` | `{}` | no |
| prometheus\_enabled | Enable install prometheus | `bool` | `true` | no |
| tags | A tags for attaching to new created AWS resources | `map(string)` | `{}` | no |
| thanos\_chart\_version | A Thanos Chart version | `string` | `"5.1.0"` | no |
| thanos\_conf | A custom configuration for deployment | `map(string)` | `{}` | no |
| thanos\_enabled | Enable install thanos | `bool` | `true` | no |
| thanos\_password | Password for thanos objstorage if thanos\_storage minio | `string` | `""` | no |
| thanos\_storage | The type of thanos object storage backend | `string` | `"s3"` | no |

## Outputs

| Name | Description |
|------|-------------|
| path\_to\_grafana\_password | A SystemManager ParemeterStore key with Grafana admin password |