Skip to content

Commit 7b10fa5

Browse files
committed
working version of signoz
1 parent 833d4d3 commit 7b10fa5

23 files changed

+6659
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ terraform.tfvars
55
*.backup
66
.idea
77
.external_momdules
8+
tracing-sample

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ No providers.
211211
| <a name="module_elasticsearch"></a> [elasticsearch](#module\_elasticsearch) | ./modules/elasticsearch | n/a |
212212
| <a name="module_fluentbit"></a> [fluentbit](#module\_fluentbit) | ./modules/fluent-bit | n/a |
213213
| <a name="module_fluentd"></a> [fluentd](#module\_fluentd) | ./modules/fluentd | n/a |
214+
| <a name="module_jaeger"></a> [jaeger](#module\_jaeger) | ./modules/jaeger | n/a |
214215
| <a name="module_prometheus"></a> [prometheus](#module\_prometheus) | ./modules/prometheus | n/a |
216+
| <a name="module_signoz"></a> [signoz](#module\_signoz) | ./modules/signoz | n/a |
215217

216218
## Resources
217219

@@ -230,7 +232,9 @@ No resources.
230232
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace for the resources. | `string` | n/a | yes |
231233
| <a name="input_prometheus_config"></a> [prometheus\_config](#input\_prometheus\_config) | Configuration settings for deploying Prometheus | <pre>object({<br> name = optional(string, "prometheus")<br> k8s_namespace = object({<br> name = optional(string, "metrics")<br> create = optional(bool, true)<br> })<br> log_level = optional(string, "info")<br> replica_count = optional(number, 1)<br> storage = optional(string, "8Gi")<br> storage_class = optional(string, "gp2")<br> enable_kube_state_metrics = optional(bool, true)<br> enable_node_exporter = optional(bool, true)<br> cpu_limit = optional(string, "100m")<br> memory_limit = optional(string, "512Mi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "128Mi")<br> retention_period = optional(string, "15d")<br><br> grafana_config = object({<br> name = optional(string, "grafana")<br> replica_count = optional(number, 1)<br> ingress_enabled = optional(bool, false)<br> lb_visibility = optional(string, "internet-facing") # Options: "internal" or "internet-facing"<br> aws_certificate_arn = optional(string, "")<br> ingress_host = optional(string, "")<br> admin_user = optional(string, "admin")<br> cpu_limit = optional(string, "100m")<br> memory_limit = optional(string, "128Mi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "128Mi")<br> dashboard_list = optional(list(object({<br> name = string<br> json = string<br> })), [])<br> })<br><br> blackbox_exporter_config = object({<br> name = optional(string, "blackbox-exporter")<br> replica_count = optional(number, 1)<br> cpu_limit = optional(string, "100m")<br> memory_limit = optional(string, "500Mi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "50Mi")<br> monitoring_targets = list(object({<br> name = string # Target name (e.g., google)<br> url = string # URL to monitor (e.g., https://google.com)<br> scrape_interval = optional(string, "60s") # Scrape interval (e.g., 60s)<br> scrape_timeout = optional(string, "60s") # Scrape timeout (e.g., 60s)<br> status_code_pattern_list = optional(string, "[http_2xx]") # Blackbox module to use (e.g., http_2xx)<br> }))<br> })<br><br> alertmanager_config = object({<br> name = optional(string, "alertmanager")<br> replica_count = optional(number, 1)<br> cpu_limit = optional(string, "100m")<br> memory_limit = optional(string, "128Mi")<br> cpu_request = optional(string, "10m")<br> memory_request = optional(string, "32Mi")<br> custom_alerts = optional(string, "")<br> alert_notification_settings = optional(string, "")<br> })<br> })</pre> | <pre>{<br> "alertmanager_config": {<br> "name": "alertmanager"<br> },<br> "blackbox_exporter_config": {<br> "monitoring_targets": [],<br> "name": "blackbox-exporter"<br> },<br> "enable_kube_state_metrics": true,<br> "enable_node_exporter": true,<br> "grafana_config": {<br> "admin_user": "admin",<br> "ingress_enabled": false,<br> "lb_visibility": "internet-facing",<br> "prometheus_endpoint": "prometheus"<br> },<br> "k8s_namespace": {<br> "create": true,<br> "name": "metrics"<br> },<br> "log_level": "info",<br> "replica_count": 1,<br> "resources": {<br> "cpu_limit": "100m",<br> "cpu_request": "100m",<br> "memory_limit": "512Mi",<br> "memory_request": "128Mi"<br> },<br> "retention_period": "15d",<br> "storage": "8Gi"<br>}</pre> | no |
232234
| <a name="input_search_engine"></a> [search\_engine](#input\_search\_engine) | (optional) Search engine for logs | `string` | `null` | no |
235+
| <a name="input_signoz_config"></a> [signoz\_config](#input\_signoz\_config) | Configuration for observability components in the monitoring stack. This variable encapsulates<br>settings for the following components:<br><br>- ClickHouse:<br> Used as the backend storage engine for observability data (like traces and metrics).<br> Includes credentials and resource limits/requests for tuning performance.<br><br>- SigNoz:<br> Provides the UI and analytics for monitoring and tracing applications.<br> Includes ingress setup and compute resource configuration.<br><br>- Alertmanager:<br> Handles alerting rules and notifications for monitoring data.<br> Includes configuration for storage, scaling, and ingress settings.<br><br>- OTEL Collector:<br> Collects telemetry data (logs, metrics, traces) from the applications and<br> routes it to appropriate backends.<br> Includes resource definitions and optional ingress configuration.<br><br>This structure enables centralized management of observability stack deployment in Kubernetes<br>via Terraform. | <pre>object({<br> k8s_namespace = object({<br> name = optional(string, "signoz")<br> create = optional(bool, false)<br> })<br> name = string<br> storage_class = optional(string, "gp3")<br> cluster_name = string<br> clickhouse = optional(object({<br> user = optional(string, "admin")<br> password = optional(string, "27ff0399-0d3a-4bd8-919d-17c2181e6fb9")<br> cpu_limit = optional(string, "2000m")<br> memory_limit = optional(string, "4Gi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "200Mi")<br> storage = optional(string, "20Gi")<br> }))<br><br> signoz_bin = optional(object({<br> replica_count = optional(number, 1)<br> cpu_limit = optional(string, "750m")<br> memory_limit = optional(string, "1000Mi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "200Mi")<br> enable_ingress = optional(bool, false)<br> certificate_arn = optional(string, null)<br> domain = optional(string, "signoz.example.com")<br> }))<br><br> alertmanager = optional(object({<br> enable = optional(bool, false)<br> replica_count = optional(number, 1)<br> cpu_limit = optional(string, "750m")<br> memory_limit = optional(string, "1000Mi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "200Mi")<br> storage = optional(string, "100Mi")<br> enable_ingress = optional(bool, false)<br> certificate_arn = optional(string, null)<br> domain = optional(string, "signoz.example.com")<br> }))<br><br> otel_collector = optional(object({<br> cpu_limit = optional(string, "1")<br> memory_limit = optional(string, "2Gi")<br> cpu_request = optional(string, "100m")<br> memory_request = optional(string, "200Mi")<br> storage = optional(string, "100Mi")<br> enable_ingress = optional(bool, false)<br> certificate_arn = optional(string, null)<br> domain = optional(string, "signoz.example.com")<br> }))<br> })</pre> | <pre>{<br> "cluster_name": null,<br> "k8s_namespace": {<br> "create": true,<br> "name": "signoz"<br> },<br> "name": null<br>}</pre> | no |
233236
| <a name="input_tags"></a> [tags](#input\_tags) | (optional) Tags for AWS resources | `map(string)` | `{}` | no |
237+
| <a name="input_tracing_stack"></a> [tracing\_stack](#input\_tracing\_stack) | (optional) Distributed tracing stack | `string` | `null` | no |
234238

235239
## Outputs
236240

examples/signoz/.terraform.lock.hcl

Lines changed: 125 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/signoz/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# terraform-aws-module-template example
2+
3+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
4+
## Requirements
5+
6+
| Name | Version |
7+
|------|---------|
8+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4, < 2.0.0 |
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0, < 6.0 |
10+
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | 2.17.0 |
11+
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | = 2.24.0 |
12+
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
13+
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.6.0 |
14+
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | ~> 4.0.6 |
15+
16+
## Providers
17+
18+
| Name | Version |
19+
|------|---------|
20+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.94.1 |
21+
22+
## Modules
23+
24+
| Name | Source | Version |
25+
|------|--------|---------|
26+
| <a name="module_signoz"></a> [signoz](#module\_signoz) | ../../ | n/a |
27+
28+
## Resources
29+
30+
| Name | Type |
31+
|------|------|
32+
| [aws_eks_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source |
33+
| [aws_eks_cluster_auth.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster_auth) | data source |
34+
35+
## Inputs
36+
37+
| Name | Description | Type | Default | Required |
38+
|------|-------------|------|---------|:--------:|
39+
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name | `string` | `"poc"` | no |
40+
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace for the resources. | `string` | `"arc"` | no |
41+
| <a name="input_region"></a> [region](#input\_region) | AWS region | `string` | `"us-east-1"` | no |
42+
43+
## Outputs
44+
45+
No outputs.
46+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/signoz/locals.tf

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
locals {
2+
signoz_config = {
3+
name = "signoz-monitoring"
4+
storage_class = "gp3"
5+
cluster_name = data.aws_eks_cluster.this.name
6+
7+
k8s_namespace = {
8+
name = "signoz"
9+
create = true
10+
}
11+
12+
13+
clickhouse = {
14+
user = "admin"
15+
password = "27ff0399-0d3a-4bd8-919d-17c2181e6fb9"
16+
cpu_limit = "2000m"
17+
memory_limit = "4Gi"
18+
cpu_request = "100m"
19+
memory_request = "200Mi"
20+
storage = "20Gi"
21+
}
22+
23+
signoz_bin = {
24+
replica_count = 1
25+
cpu_limit = "750m"
26+
memory_limit = "1000Mi"
27+
cpu_request = "100m"
28+
memory_request = "200Mi"
29+
enable_ingress = false
30+
# certificate_arn = "arn:aws:acm:us-east-1:123456789012:certificate/abcde12345"
31+
# domain = "signoz.mycompany.com"
32+
}
33+
34+
alertmanager = {
35+
enable = true
36+
replica_count = 1
37+
cpu_limit = "500m"
38+
memory_limit = "500Mi"
39+
cpu_request = "100m"
40+
memory_request = "200Mi"
41+
storage = "200Mi"
42+
}
43+
44+
otel_collector = {
45+
cpu_limit = "1"
46+
memory_limit = "2Gi"
47+
cpu_request = "200m"
48+
memory_request = "300Mi"
49+
storage = "200Mi"
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)