Skip to content

Commit e3a27e9

Browse files
committed
working version of signoz
1 parent 7e85a36 commit e3a27e9

12 files changed

Lines changed: 1950 additions & 0 deletions

File tree

examples/signoz-external-values/.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.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2+
## Requirements
3+
4+
| Name | Version |
5+
|------|---------|
6+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4, < 2.0.0 |
7+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0, < 6.0 |
8+
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | 2.17.0 |
9+
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | = 2.24.0 |
10+
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
11+
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.6.0 |
12+
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | ~> 4.0.6 |
13+
14+
## Providers
15+
16+
| Name | Version |
17+
|------|---------|
18+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.100.0 |
19+
20+
## Modules
21+
22+
| Name | Source | Version |
23+
|------|--------|---------|
24+
| <a name="module_logs_metrics"></a> [logs\_metrics](#module\_logs\_metrics) | ../../ | n/a |
25+
| <a name="module_signoz"></a> [signoz](#module\_signoz) | ../../ | n/a |
26+
| <a name="module_tags"></a> [tags](#module\_tags) | sourcefuse/arc-tags/aws | 1.2.3 |
27+
28+
## Resources
29+
30+
| Name | Type |
31+
|------|------|
32+
| [aws_acm_certificate.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/acm_certificate) | data source |
33+
| [aws_eks_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source |
34+
| [aws_eks_cluster_auth.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster_auth) | data source |
35+
| [aws_ssm_parameter.domain](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
36+
37+
## Inputs
38+
39+
| Name | Description | Type | Default | Required |
40+
|------|-------------|------|---------|:--------:|
41+
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name | `string` | `"poc"` | no |
42+
| <a name="input_namespace"></a> [namespace](#input\_namespace) | namespace for the prject | `string` | `"arc"` | no |
43+
44+
## Outputs
45+
46+
| Name | Description |
47+
|------|-------------|
48+
| <a name="output_otel_collector_endpoint"></a> [otel\_collector\_endpoint](#output\_otel\_collector\_endpoint) | OTEL collector endpoint |
49+
| <a name="output_signoz_lb_arn"></a> [signoz\_lb\_arn](#output\_signoz\_lb\_arn) | Signoz ingress loadbalancer DNS |
50+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
serviceAccount:
2+
name: ${service_account_name}
3+
annotations:
4+
eks.amazonaws.com/role-arn: ${iam_role_arn}
5+
6+
pod:
7+
# allow auto-scraping from prometheus-server
8+
annotations:
9+
prometheus.io/scrape: "true"
10+
prometheus.io/port: "9106" # must match the `service.port`
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
data "aws_ssm_parameter" "domain" {
2+
name = "/iac/route53/domain"
3+
with_decryption = true
4+
}
5+
6+
locals {
7+
domain = data.aws_ssm_parameter.domain.value
8+
prefix = "${var.namespace}-${var.environment}"
9+
}
10+
11+
12+
data "aws_acm_certificate" "this" {
13+
domain = "*.${local.domain}"
14+
types = ["AMAZON_ISSUED"]
15+
most_recent = true
16+
}
17+
18+
data "aws_eks_cluster" "this" {
19+
name = "${local.prefix}-cluster"
20+
}
21+
22+
data "aws_eks_cluster_auth" "this" {
23+
name = data.aws_eks_cluster.this.name
24+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
locals {
2+
3+
k8s_namespace = "signoz"
4+
clickhouse = {
5+
user = "admin"
6+
cpu_limit = "2000m"
7+
memory_limit = "4Gi"
8+
cpu_request = "100m"
9+
memory_request = "200Mi"
10+
storage = "20Gi"
11+
}
12+
13+
signoz_bin = {
14+
replica_count = 1
15+
cpu_limit = "750m"
16+
memory_limit = "1000Mi"
17+
cpu_request = "100m"
18+
memory_request = "200Mi"
19+
ingress_enabled = true
20+
aws_certificate_arn = data.aws_acm_certificate.this.arn
21+
root_domain = local.domain
22+
domain = "signoz.${local.domain}"
23+
lb_visibility = "internet-facing"
24+
}
25+
26+
alertmanager = {
27+
enable = true
28+
replica_count = 1
29+
cpu_limit = "500m"
30+
memory_limit = "500Mi"
31+
cpu_request = "100m"
32+
memory_request = "200Mi"
33+
storage = "200Mi"
34+
}
35+
36+
otel_collector = {
37+
cpu_limit = "1"
38+
memory_limit = "2Gi"
39+
cpu_request = "200m"
40+
memory_request = "300Mi"
41+
storage = "200Mi"
42+
}
43+
44+
45+
## Signoz heml chart values. ###########################
46+
signoz_config = {
47+
name = "signoz"
48+
storage_class = "gp3"
49+
cluster_name = data.aws_eks_cluster.this.name
50+
51+
chart_values = [
52+
templatefile("${path.module}/values/signoz.yaml", {
53+
name = "signoz"
54+
storage_class = "gp3"
55+
cluster_name = data.aws_eks_cluster.this.name
56+
password = "27ff0399-0d3a-4bd8-919d-17c2181e6fb9"
57+
clickhouse = local.clickhouse
58+
otel_collector = local.otel_collector
59+
signoz_bin = local.signoz_bin
60+
alertmanager = local.alertmanager
61+
endpoints = local.endpoints_to_monitor
62+
})
63+
]
64+
65+
signoz_bin = local.signoz_bin
66+
chart_version = "0.88.2"
67+
k8s_namespace = {
68+
name = local.k8s_namespace
69+
create = true
70+
}
71+
}
72+
73+
74+
metrics_logs_config = {
75+
name = "signoz"
76+
storage_class = "gp3"
77+
cluster_name = data.aws_eks_cluster.this.name
78+
79+
80+
chart_values = [
81+
templatefile("${path.module}/values/signoz-infra.yaml", {
82+
name = "signoz"
83+
storage_class = "gp3"
84+
cluster_name = data.aws_eks_cluster.this.name
85+
metric_collection_interval = "30s"
86+
otel_collector_endpoint = "http://signoz-otel-collector:4317"
87+
})
88+
]
89+
90+
chart_version = "0.13.0"
91+
92+
k8s_namespace = {
93+
name = local.k8s_namespace
94+
create = false
95+
}
96+
}
97+
98+
99+
100+
endpoints_to_monitor = [
101+
{
102+
endpoint = "https://example.com/"
103+
method = "GET"
104+
collection_interval = "60s"
105+
}
106+
]
107+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Deploy Signoz stack with Clickhouse , OTEL collector etc
2+
module "signoz" {
3+
source = "../../"
4+
5+
environment = var.environment
6+
namespace = var.namespace
7+
8+
search_engine = "signoz-clickhouse"
9+
signoz_config = local.signoz_config
10+
}
11+
12+
// Deploy metrics and log collection agents
13+
module "logs_metrics" {
14+
source = "../../"
15+
16+
environment = var.environment
17+
namespace = var.namespace
18+
19+
log_aggregator = "signoz"
20+
tracing_stack = "signoz"
21+
metrics_monitoring_system = "signoz"
22+
23+
signoz_infra_monitor_config = local.metrics_logs_config
24+
25+
depends_on = [module.signoz]
26+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
output "signoz_lb_arn" {
2+
description = "Signoz ingress loadbalancer DNS"
3+
value = module.signoz.signoz_lb_dns
4+
}
5+
6+
output "otel_collector_endpoint" {
7+
description = "OTEL collector endpoint"
8+
value = module.signoz.otel_collector_endpoint
9+
}

0 commit comments

Comments
 (0)