terraform-aws-arc-observability-stack¶
Introduction¶
The Observability Terraform Module is a comprehensive solution designed to simplify the deployment of a full-stack observability ecosystem in Kubernetes environments. This module enables organizations to monitor and troubleshoot their infrastructure and applications effectively, offering the flexibility to choose between various open-source tools.
Key Features:¶
- EFK Stack for Log Management:
- Deploy either Fluentd or Fluent Bit as the log collector, providing lightweight and efficient options for log aggregation.
- Seamlessly integrate with either Elasticsearch or OpenSearch for scalable and reliable log storage.
- Prometheus Stack for Metrics Monitoring:
- Includes Prometheus for metrics collection and Alertmanager for alerting.
- Integrated support for Grafana, offering rich dashboards to visualize metrics effectively.
- Enables monitoring of HTTP endpoints using the Blackbox Exporter.
- Flexibility and Customization:
- Fully customizable configurations for each component, allowing fine-grained control over deployment and resources.
- Supports multiple log collectors and storage backends, giving users the freedom to choose based on their requirements.
- Streamlined Deployment:
- Automates the deployment of the entire observability stack, reducing complexity and ensuring consistency.
- Includes preconfigured dashboards and alert rules for quick setup and immediate insights.
- Signoz Community Edition Support - Adds native support for Signoz CE, an all-in-one observability platform. - Enables logs, metrics, and traces to be collected and correlated in one unified interface. - Simplifies tracing setup with OpenTelemetry Collector and works out of the box with distributed applications.
For more information about this repository and its usage, please see Terraform AWS ARC Observability Module Usage Guide.
Create the following resources in a single region.
- VPC
- Multi-AZ private and public subnets
- Route tables, internet gateway, and NAT gateways
- Configurable VPC Endpoints
Prerequisites¶
Before using this module, ensure you have the following:
- AWS credentials configured.
- Terraform installed.
- A working knowledge of Terraform.
Usage¶
See the examples
folder for a complete example.
EFK Stack¶
Prometheus¶
Requirements¶
Name | Version |
---|---|
terraform | >= 1.4, < 2.0.0 |
aws | >= 4.0, < 6.0 |
helm | 2.17.0 |
random | ~> 3.6.0 |
tls | ~> 4.0.6 |
Providers¶
No providers.
Modules¶
Name | Source | Version |
---|---|---|
elasticsearch | ./modules/elasticsearch | n/a |
fluentbit | ./modules/fluent-bit | n/a |
fluentd | ./modules/fluentd | n/a |
jaeger | ./modules/jaeger | n/a |
prometheus | ./modules/prometheus | n/a |
signoz | ./modules/signoz | n/a |
signoz_metrics_logs | ./modules/signoz-infra | n/a |
Resources¶
No resources.
Inputs¶
Name | Description | Type | Default | Required |
---|---|---|---|---|
elasticsearch_config | Configuration settings for deploying Elasticsearch | object({ |
{ |
no |
environment | Environment name | string |
n/a | yes |
fluentbit_config | Configuration for Fluentbit | object({ |
{ |
no |
fluentd_config | Configuration for Fluentd | object({ |
{ |
no |
log_aggregator | (optional) Log aggregator to choose | string |
null |
no |
metrics_monitoring_system | Monotoring system for metrics | string |
null |
no |
namespace | Namespace for the resources. | string |
n/a | yes |
prometheus_config | Configuration settings for deploying Prometheus | object({ |
{ |
no |
search_engine | (optional) Search engine for logs | string |
null |
no |
signoz_config | Configuration for observability components in the monitoring stack. This variable encapsulates settings for the following components: - ClickHouse: Used as the backend storage engine for observability data (like traces and metrics). Includes credentials and resource limits/requests for tuning performance. - SigNoz: Provides the UI and analytics for monitoring and tracing applications. Includes ingress setup and compute resource configuration. - Alertmanager: Handles alerting rules and notifications for monitoring data. Includes configuration for storage, scaling, and ingress settings. - OTEL Collector: Collects telemetry data (logs, metrics, traces) from the applications and routes it to appropriate backends. Includes resource definitions and optional ingress configuration. This structure enables centralized management of observability stack deployment in Kubernetes via Terraform. |
object({ |
{ |
no |
signoz_infra_monitor_config | Configuration object for deploying SigNoz infrastructure monitoring components. Attributes: - name: A name identifier for the monitoring deployment (used in naming resources). - storage_class: (Optional) The Kubernetes storage class to be used for persistent volumes. Defaults to "gp3". - cluster_name: The name of the Kubernetes cluster where SigNoz is being deployed. - otel_collector_endpoint: The endpoint URL for the OpenTelemetry Collector to which metrics, logs, and traces will be exported. - metric_collection_interval: (Optional) The interval at which metrics are collected. Defaults to "30s". - if any one ofr the values enable_log_collection,enable_metrics_collection is true, then helm chart gets installed This variable is used to centralize configuration related to monitoring infrastructure via SigNoz. |
object({ |
{ |
no |
tags | (optional) Tags for AWS resources | map(string) |
{} |
no |
tracing_stack | (optional) Distributed tracing stack | string |
null |
no |
Outputs¶
Name | Description |
---|---|
grafana_lb_dns | Grafana ingress loadbalancer DNS |
kibana_lb_dns | Kibana ingress loadbalancer DNS |
otel_collector_endpoint | OTEL collector endpoint |
signoz_lb_dns | Signoz ingress loadbalancer DNS |
Development¶
Prerequisites¶
Configurations¶
- Configure pre-commit hooks
- Configure golang deps for tests
Git commits¶
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
Tests¶
- Tests are available in
test
directory - In the test directory, run the below command
Authors¶
This project is authored by: - SourceFuse