-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.forms.yml
1097 lines (1046 loc) · 42.6 KB
/
.forms.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
shared:
- &cycloid-api-key
name: Cycloid API key
groups:
- name: API KEY
technologies: [pipeline]
vars:
- name: "Cycloid API Key"
description: "Cycloid API Key with full rigths to manage credentials"
key: cycloid_api_key
type: string
widget: cy_cred
required: true
widget_config:
cred_types: [custom]
default: "((cycloid_io_api_key.api_key))"
- &advanced
name: Advanced
groups:
- name: Enable Advanced
technologies: [pipeline]
vars:
- name: Display stack advanced options
description: Check to see stack options.
key: advanced_opt
widget: switch
type: boolean
default: false
- name: Version selection
condition: $advanced_opt == true
technologies: [pipeline]
vars:
- name: "Terraform version"
description: "Terraform version to use."
key: terraform_version
widget: simple_text
type: string
default: "1.6.3"
- name: "Ansible version"
description: "Ansible version to use."
key: ansible_version
widget: simple_text
type: string
default: "10.1"
- &aws-creds
name: AWS Credentials
groups:
- name: Setup
technologies: [pipeline]
vars:
- name: "AWS access credential"
description: "AWS access credential which should be used"
key: aws_access_cred
widget: cy_cred
widget_config:
display_keys: false
cred_types:
- aws
type: string
default: "((aws))"
- name: "AWS Assume Role"
description: "Amazon AWS access key for Terraform."
key: aws_role_arn
widget: simple_text
type: string
default: ""
- name: "Amazon AWS region"
description: "Amazon AWS region to use for Terraform."
key: aws_default_region
widget: auto_complete
type: string
values: ["eu-north-1","ap-south-1","eu-west-3","eu-west-2","eu-west-1","ap-northeast-2","ap-northeast-1","sa-east-1","ca-central-1","ap-southeast-1","ap-southeast-2","eu-central-1","us-east-1","us-east-2","us-west-1","us-west-2"]
default: eu-west-1
version: "2"
use_cases:
- name: aws-vm
sections:
- *cycloid-api-key
- *aws-creds
- name: VM Configuration
groups:
- name: General
technologies: [terraform]
vars:
- name: "Instance type"
description: "Instance type for the worker."
key: module.aws-vm.vm_size
widget: auto_complete
type: string
default: "t3.small"
values:
- "t3.small"
- "t3.medium"
- "t3.large"
- "t3.xlarge"
- "t3.2xlarge"
- name: "Disk size"
unit: Go
description: "Root Disk size for the instance."
key: module.aws-vm.os_disk_size
widget: slider_range
type: integer
default: 30
values:
- 30
- 250
- name: "Subnet ID"
description: "Subnet ID where to create VM."
key: module.aws-vm.subnet_id
widget: simple_text
type: string
required: true
- name: "VPC ID"
description: "VPC ID where to create VM."
key: module.aws-vm.vpc_id
widget: simple_text
type: string
required: true
- name: "IAM policies"
description: "Array of IAM ARN policies to associate to the VM."
key: module.aws-vm.vm_iam_policies
widget: text_area
type: array
default:
[
"ec2:DescribeTags",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricData",
]
- name: SSH access
technologies: [terraform]
vars:
- name: "SSH CIDR and CIDR to allow"
description: "Map containing the CIDR and security groups IDs to allow SSH access to the monitoring VM, use the map keys cidr and sg. Default CIDR:0.0.0.0/0"
key: module.aws-vm.ssh_to_allow
widget: text_area
type: map
default:
cidr:
- 0.0.0.0/0
sg: []
- name: Bastion enable
technologies: [pipeline]
vars:
- name: "Use Bastion"
description: "Select wheter to use a Bastion to SSH instance.The bastion CIDR or SG should be added in the SSH allowed above"
key: use_bastion
type: boolean
widget: switch
default: true
- name: Bastion Access
condition: $use_bastion == true
technologies: [pipeline]
vars:
- name: "Bastion URL"
description: "The URL to be used to connect to the bastion, in the format {USER}@{INSTANCE}"
key: bastion_url
type: string
widget: simple_text
- name: "Bastion Private SSH key"
description: "The private SSH key to use to connect to the bastion"
key: bastion_private_ssh_key
widget: cy_cred
type: string
- name: "Bastion Public SSH key"
description: "The public SSH key to use to connect to the bastion"
key: bastion_public_ssh_key
widget: cy_cred
type: string
- name: Enable SSL
condition: $advanced_opt == true
technologies: [pipeline]
vars:
- name: "Enable HTTPs"
description: "Select wheter to enable HTTPs traffic and use SSL certificates."
key: enable_tls
type: boolean
widget: switch
default: true
- name: "Create self signed certificate"
description: "Wheter to create a self signed certificate automatically. Otherwise a certificate needs to be imported"
key: create_self_signed_certificate
type: boolean
widget: switch
default: true
- name: SSL certificate import
condition: $advanced_opt == true && $enable_tls == true && $create_self_signed_certificate == false
technologies: [pipeline]
vars:
- name: "Certificate"
description: "Credential containing certificate"
key: tls_crt
type: string
widget: cy_cred
- name: "Certificate key"
description: "Credential containing ssl certificate"
key: tls_key
type: string
widget: cy_cred
- name: DNS record creation
technologies: [terraform]
vars:
- name: Create DNS
description: Wheter to create DNS records for prometheus, alertmanager and grafana using AWS Route53. Note! Requires a DNS Zone
key: module.aws-vm.create_dns
widget: switch
type: boolean
default: false
- name: DNS Zone
technologies: [terraform]
condition: $module.aws-vm.create_dns == true
vars:
- name: "AWS Route53 Zone ID"
description: "AWS Route53 Zone ID to use for creating the different monitoring records."
key: module.aws-vm.aws_dns_zone_id
widget: simple_text
type: string
default: ""
- name: Optional VM parameters
condition: $advanced_opt == true
technologies: [pipeline]
vars:
- name: "Extra tags"
description: "Dict of extra tags to add to resources."
key: module.aws-vm.aws_extra_tags
widget: text_area
type: map
default: {}
- name: Monitoring tools
groups:
- name: Tools to install
technologies: [terraform, ansible, pipeline]
vars:
- name: "Grafana install"
description: "Wheter to install [Grafana](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/grafana) on the machine as a service."
key: grafana_install
widget: switch
type: boolean
default: false
- name: "Alertmanager install"
description: "Wheter to install [Alertmanager](https://github.com/prometheus-community/ansible/tree/main/roles/alertmanager) on the machine as a service."
key: alertmanager_install
widget: switch
type: boolean
default: false
- name: "Prometheus install"
description: "Wheter to skip install [Prometheus](https://github.com/prometheus-community/ansible/tree/main/roles/prometheus) on the machine as a service."
key: prometheus_install
widget: switch
type: boolean
default: true
- name: Exporters
groups:
- name: Select exporters to install
technologies: [ansible]
vars:
- name: "Blackbox exporter install"
description: "Wheter to install [blackbox exporter](https://github.com/prometheus-community/ansible/tree/main/roles/blackbox_exporter) on the machine as a service."
key: blackbox_exporter_install
widget: switch
type: boolean
default: true
- name: "MYSQL exporter install"
description: "Wheter to install [mysql exporter](https://github.com/prometheus-community/ansible/tree/main/roles/mysqld_exporter) on the machine as a service."
key: mysqld_exporter_install
widget: switch
type: boolean
default: false
- name: "Postgres exporter install"
description: "Wheter to install [postgres exporter](https://github.com/prometheus-community/ansible/tree/main/roles/postgres_exporter) on the machine as a service."
key: postgres_exporter_install
widget: switch
type: boolean
default: false
- name: "Node exporter install"
description: "Wheter to install [node exporter](https://github.com/prometheus-community/ansible/tree/main/roles/node_exporter) on the machine as a service."
key: node_exporter_install
widget: switch
type: boolean
default: true
- name: "Cadvisor install"
description: "Wheter to install [cadvisor](https://github.com/google/cadvisor) on the machine as a service."
key: cadvisor_install
widget: switch
type: boolean
default: true
- name: Prometheus
groups:
- name: Prometheus login
condition: $prometheus_install == true
technologies: [terraform]
vars:
- name: "Prometheus DNS"
description: "DNS to use for Prometheus."
key: module.aws-vm.prometheus_domain_name
widget: simple_text
type: string
default: prometheus.local
- name: General Configuration
condition: $prometheus_install == true
technologies: [ansible]
vars:
- name: "Prometheus scraping config"
description: "Prometheus scraping config to use. Note! prometheus, alertmanager and the database exporters are scraped. For more information check [prometheus wiki](https://prometheus.io/docs/prometheus/latest/configuration/configuration/)"
key: prometheus_custom_configs
widget: text_area
type: array
default:
## Node_exporter
- job_name: 'Node_exporter'
scheme: http
ec2_sd_configs:
- region: "{{ aws_default_region }}"
port: 9100
relabel_configs:
- source_labels: [__meta_ec2_tag_monitoring_discovery]
action: drop
regex: false
- source_labels: [__meta_ec2_private_ip]
regex: '^(.+)$'
replacement: '${1}:9100'
target_label: __address__
# Force labels on metrics
# Instance label : Public IP, if not, default private IP
- source_labels: [__meta_ec2_private_ip]
action: replace
target_label: instance
- source_labels: [__meta_ec2_public_ip]
regex: '^(.+)$'
replacement: '${1}'
target_label: instance
# Get some ec2 labels
- source_labels: [__meta_ec2_tag_Name]
target_label: Name
- source_labels: [__meta_ec2_tag_project]
target_label: project
- source_labels: [__meta_ec2_tag_env]
target_label: env
- source_labels: [__meta_ec2_tag_role]
target_label: role
- source_labels: [__meta_ec2_tag_organization]
target_label: organization
- source_labels: [__meta_ec2_instance_id]
target_label: instance_id
metric_relabel_configs:
# Don't store unwanted metrics
- source_labels: [__name__]
action: drop
regex: go_(.*)
# Overrides mechanism of ec2 labels on the metric scope
- source_labels: [cycloid_tag_Name]
regex: '(.+)'
target_label: Name
- source_labels: [cycloid_tag_project]
regex: '(.+)'
target_label: project
- source_labels: [cycloid_tag_env]
regex: '(.+)'
target_label: env
- source_labels: [cycloid_tag_role]
regex: '(.+)'
target_label: role
- source_labels: [cycloid_tag_organization]
regex: '(.+)'
target_label: organization
- source_labels: [cycloid_tag_instance_id]
regex: '(.+)'
target_label: instance_id
# Remove cycloid_tag_* labels
- regex: 'cycloid_tag_.*'
action: labeldrop
- name: "Prometheus custom rules"
description: "Definition of custom prometheus alert rules that will be saved at templates/rules/$organization.rules file. The syntax to follow can be find in the [prometheus doc](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/). You just need to specify the set of group array without the groups keyword. "
key: prometheus_custom_rules
widget: text_area
type: array
default:
- name: example_empty
rules: []
- name: "Default prometheus rules"
description: "Default prometheus rules to use. You can see all the values available [here](TODO)."
key: prometheus_default_rule_files
widget: text_area
type: array
default:
- alertmanager.rules
- name: "Default prometheus rules configuration"
description: "Change the default prometheus values that are defined. You can see all the values available [here](TODO)."
key: prometheus_default_rules_custom
widget: text_area
type: map
- name: Blackbox Exporter
groups:
- name: Configuration
condition: $blackbox_exporter_install == true
technologies: [ansible]
vars:
- name: "Blackbox exporter modules"
description: "Blackbox exporter modules to be used, for more information please check the [official documentation](https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md)"
key: blackbox_exporter_configuration_modules
widget: text_area
type: map
default:
http_2xx:
prober: http
timeout: 15s
http:
method: GET
valid_http_versions:
- HTTP/1.1
- HTTP/2.0
fail_if_not_ssl: true
no_follow_redirects: false
preferred_ip_protocol: ip4
- name: "Prometheus blackbox scraping"
description: "Blackbox scraping configuration to be added to prometheus, for more information please check the [official documentation](https://github.com/prometheus/blackbox_exporter/tree/master)"
key: prometheus_blackbox_config
widget: text_area
type: array
default:
- job_name: 'blackbox-targets'
params:
module: [http_2xx]
metrics_path: /probe
relabel_configs:
- source_labels: [ "__address__" ]
target_label: "__param_target"
- target_label: "__address__"
replacement: "localhost:9115"
static_configs:
- targets: ["https://cycloid.io"]
labels:
Name: "cycloid-website"
organization: "{{organization}}"
project: "website"
env: "prod"
- name: MySQL Exporter
groups:
- name: Configuration
condition: $mysqld_exporter_install == true
technologies: [pipeline]
vars:
- name: "DB Username"
description: "MySQL database username to be used to connect to the database."
key: mysql_db_user
widget: cy_cred
type: string
- name: "DB Username"
description: "MySQL Database password to be used to connect to the database"
key: mysql_db_password
widget: cy_cred
type: string
- name: "DB host"
description: "MySQL Database host where the metrics should be collected"
key: mysql_db_host
widget: simple_text
type: string
- name: "DB port"
description: "MySQL Database port where the metrics should be collected"
key: mysql_db_port
widget: simple_text
type: string
- name: PostgreSQL Exporter
groups:
- name: Configuration
condition: $postgres_exporter_install == true
technologies: [pipeline]
vars:
- name: "DB Username"
description: "PostgreSQL database username to be used to connect to the database."
key: postgres_db_user
widget: cy_cred
type: string
- name: "DB Username"
description: "PostgreSQL Database password to be used to connect to the database"
key: postgres_db_password
widget: cy_cred
type: string
- name: "DB host"
description: "PostgreSQL Database host where the metrics should be collected"
key: postgres_db_host
widget: simple_text
type: string
- name: "DB port"
description: "PostgreSQL Database port where the metrics should be collected"
key: postgres_db_port
widget: simple_text
type: string
- name: Alertmanager
groups:
- name: Alertmanager DNS
condition: $alertmanager_install == true
technologies: [terraform]
vars:
- name: "Alertmanager DNS"
description: "DNS to use for Alertmanager."
key: module.aws-vm.alertmanager_domain_name
widget: simple_text
type: string
default: alertmanager.local
- name: Alertmanager Configuration
technologies: [ansible]
condition: $alertmanager_install == true
vars:
- name: "Alertmanager route"
description: "The root node of the routing tree. More info about the syntax can be found in the [oficial documentation](https://prometheus.io/docs/alerting/latest/configuration/#route)."
key: alertmanager_route
widget: text_area
type: map
default:
receiver: default
group_by:
- organization
- project
- env
- alertname
group_wait: 30s
group_interval: 5m
repeat_interval: 15m
routes:
- match: # Send "critical" alerts to the default receiver
severity: critical
receiver: default
- match: # Send other alerts to a dummy receiver (no action)
receiver: 'null'
receiver: dev_null
- name: "Alertmanager inhibition rules"
description: "A list of inhibition rules to mute existing alerts. More info about the syntax can be found in the [oficial documentation](https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule)."
key: alertmanager_inhibit_rules
widget: text_area
type: array
default:
- source_match: # mutes alerts warning when a critical alert related is active
severity: critical
target_match:
severity: warning
equal:
- instance
- organization
- project
- env
- alertname
- name: Alertmanager Secret Configuration
technologies: [pipeline]
condition: $alertmanager_install == true
vars:
- name: "Alertmanager receivers"
description: "A cycloid credential containing a list of notification receivers.For more information about syntax check the [official alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/#general-receiver-related-settings). Note! BY default it should always have a reciever -name: 'null'"
key: alertmanager_receivers
widget: cy_cred
type: string
- name: External Alertmanager (not deployed in machine)
technologies: [pipeline]
condition: $alertmanager_install == false && $prometheus_install == true
vars:
- name: "Username"
description: "Basic authentification username to use to connect to external alertmanager"
key: external_alertmanager_username
widget: cy_cred
type: string
- name: "Password"
description: "Basic authentification password to use to connect to external alertmanager"
key: external_alertmanager_password
widget: cy_cred
type: string
- name: "External Alertmanager list"
description: "Array of targets to connect to external alertmanager"
key: external_alertmanager_targets
widget: text_area
type: array
default:
- alertmanager-0.test.com
- alertmanager-1.test.com
- name: Grafana
groups:
- name: Grafana DNS
condition: $grafana_install == true
technologies: [terraform]
vars:
- name: "Grafana DNS"
description: "DNS to use for Grafana."
key: module.aws-vm.grafana_domain_name
widget: simple_text
type: string
default: grafana.local
- name: Grafana Configuration
technologies: [ansible]
condition: $grafana_install == true
vars:
- name: "Grafana Dashboards"
description: "List of dashboards which should be imported by ID, available publicly at [grafana](https://grafana.com/grafana/dashboards/)"
key: grafana_dashboards
type: array
widget: text_area
default:
- dashboard_id: 1860 #node-exporter
revision_id: 37
datasource: prometheus
- dashboard_id: 13659
revision_id: 1
datasource: prometheus
- *advanced
- name: k8s
sections:
- *cycloid-api-key
- name: K8s config
groups:
- name: k8s config
technologies: [pipeline]
vars:
- name: "K8s config file"
description: "The k8s config file content to be used to connect to the cluster and deploy the different monitoring resources."
key: kubeconfig_content
widget: cy_cred
type: string
required: true
- name: "K8s namespace"
description: "The name of the namespace to create, where the resources will be created. Defaults to 'stack-monitoring'. Beware that changing this value may destroy previously deployed elements."
key: namespace
widget: simple_text
type: string
default: "stack-monitoring"
- name: Monitoring tools
groups:
- name: Tools to install
technologies: [pipeline]
vars:
- name: "Grafana install"
description: "Wheter to install [Grafana](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/grafana) on the k8s cluster."
key: grafana_install
widget: switch
type: boolean
default: false
- name: "Alertmanager install"
description: "Wheter to install [Alertmanager](https://github.com/prometheus-community/ansible/tree/main/roles/alertmanager) on the k8s cluster."
key: alertmanager_install
widget: switch
type: boolean
default: false
- name: "Prometheus install"
description: "Wheter to skip install [Prometheus](https://github.com/prometheus-community/ansible/tree/main/roles/prometheus) on the k8s cluster."
key: prometheus_install
widget: switch
type: boolean
default: true
#- name: "Thanos install"
# description: "Wheter to skip install [Thanos](https://thanos.io/) on the k8s cluster."
# key: thanos_install
# widget: switch
# type: boolean
# default: false
- name: Blackbox Exporter
groups:
- name: Install
technologies: [terraform]
vars:
- name: "Blackbox exporter install"
description: "Wheter to install [blackbox exporter](https://github.com/prometheus-community/ansible/tree/main/roles/blackbox_exporter) on the machine as a service."
key: module.prometheus-blackbox-exporter.blackbox_exporter_install
widget: switch
type: boolean
default: false
- name: Configuration
condition: $module.prometheus-blackbox-exporter.blackbox_exporter_install == true
technologies: [terraform]
vars:
- name: "Blackbox exporter modules"
description: "Blackbox exporter modules to be used, for more information please check the [official documentation](https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md)"
key: module.prometheus-blackbox-exporter.blackbox_exporter_modules
widget: text_area
type: map
default:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
follow_redirects: true
preferred_ip_protocol: "ip4"
- name: "Prometheus blackbox scraping"
description: "Blackbox scraping configuration to be added to prometheus, for more information please check the [official documentation](https://github.com/prometheus/blackbox_exporter/tree/master)"
key: module.kube-prometheus.prometheus_blackbox_scrape
widget: text_area
type: array
default:
- job_name: blackbox-targets
metrics_path: /probe
params:
module:
- http_2xx
relabel_configs:
- source_labels:
- __address__
target_label: __param_target
- source_labels:
- __param_target
target_label: instance
- replacement: stack-monitoring-blackbox-exporter:9115
target_label: __address__
static_configs:
- labels:
aws_region: eu-west-3
ip_priv: 10.3.5.16
org: cycloid
project: cycloidio-website
provider_service: aws-vm
vm_name: cycloidio-website-front-prod
wiki: https://github.com/cycloidio/cycloid/wiki/cycloidio-website
targets:
- https://cycloid.io/
- name: Prometheus
groups:
- name: Prometheus login
condition: $prometheus_install == true
technologies: [terraform]
vars:
- name: "Prometheus DNS"
description: "DNS to use for Prometheus."
key: module.kube-prometheus.prometheus_domain_name
widget: simple_text
type: string
default: prometheus.local
- name: General Configuration
condition: $prometheus_install == true
technologies: [terraform]
vars:
- name: "Prometheus disable k8s component scraping"
description: "Prometheus disable default k8s compponent scraping. TODO example docs"
key: module.kube-prometheus.disable_component_scraping
widget: text_area
type: array
default: []
- name: "Prometheus scraping extra config"
description: "Prometheus scraping extra config to use. TODO "
key: module.kube-prometheus.prometheus_additional_scrape
widget: text_area
type: array
default: []
- name: "Prometheus disable default rules"
description: "Customize the default rules to disable. For more information about syntax and default rules check the k8s prometheus stack [chart default rules](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L49C3-L49C8)"
key: module.kube-prometheus.prometheus_default_rules_disabled
widget: text_area
type: array
default: []
- name: "Prometheus default rules customize"
description: "Customize the default enabled rules for and severity parameters. For more information about syntax and default rules check the k8s prometheus stack [chart default values](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L38)"
key: module.kube-prometheus.prometheus_change_default_rules
widget: text_area
type: map
default: {}
- name: "Prometheus disable default alerts"
description: "Customize the default alerts to disable. For more information about syntax check the k8s prometheus stack [here](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L181)"
key: module.kube-prometheus.prometheus_default_alerts_disabled
widget: text_area
type: array
default: []
- name: "Prometheus aditional rules"
description: "Provide custom rules to be deployed in the cluster. For more information about syntax and default rules check the k8s prometheus stack [chart default values](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L198)"
key: module.kube-prometheus.prometheus_additional_rules
widget: text_area
type: map
default: {}
- name: Data persistency
condition: $prometheus_install == true
technologies: [terraform]
vars:
- name: "Persist data"
description: "Wheter to persist prometheus data on the k8s cluster, by creating a PVC."
key: module.kube-prometheus.enable_prometheus_persistence
widget: switch
type: boolean
default: false
- name: PVC Configuration
condition: $prometheus_install == true && $module.kube-prometheus.enable_prometheus_persistence == true
technologies: [terraform]
vars:
- name: "Prometheus PVC size"
description: "The size of the persisent volume claim to create in Gb."
key: module.kube-prometheus.prometheus_pvc_size
widget: simple_text
type: string
default: "10"
- name: "Prometheus Data retention"
description: "The time prometheus will retain data before deletion. Must match the regular expression [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours)."
key: module.kube-prometheus.prometheus_data_retention
widget: simple_text
type: string
default: "10d"
- name: Alertmanager
groups:
- name: Alertmanager DNS
condition: $alertmanager_install == true
technologies: [terraform]
vars:
- name: "Alertmanager DNS"
description: "DNS to use for Alertmanager."
key: module.kube-prometheus.alertmanager_domain_name
widget: simple_text
type: string
default: alertmanager.local
- name: Alertmanager Secret Configuration
technologies: [pipeline]
condition: $alertmanager_install == true
vars:
- name: "Alertmanager receivers"
description: "Alertmanager receivers configuration. Note! BY default it should always have a recevier -name: 'null' for example to be used as default. corresponds to the helm chart default value for the config of alertmanager. For more information about syntax check the [official alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/#general-receiver-related-settings)"
key: alertmanager_config_receivers
widget: cy_cred
type: string
- name: Alertmanager Configuration
technologies: [terraform]
condition: $alertmanager_install == true
vars:
- name: "Alertmanager intervals"
description: "Alertmanager intervals configuration. For more information about syntax check the [official alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/#time_interval)"
key: module.kube-prometheus.alertmanager_time_intervals
widget: text_area
type: array
default: []
- name: "Alertmanager routes"
description: "Alertmanager route configuration. Note! The default value corresponds to the helm chart default value for the config of alertmanager. For more information about syntax check the [official alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/#route-related-settings)"
key: module.kube-prometheus.alertmanager_config_route
widget: text_area
type: map
default:
group_by: ['namespace']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- receiver: 'null'
matchers:
- alertname = "Watchdog"
- name: "Alertmanager inhibit rules"
description: "Alertmanager inhibit rules configuration. Note! The default value corresponds to the helm chart default value for the config of alertmanager. For more information about syntax check the [official alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/#inhibition-related-settings)"
key: module.kube-prometheus.alertmanager_config_inhibit_rules
widget: text_area
type: array
default:
- source_matchers:
- 'severity = critical'
target_matchers:
- 'severity =~ warning|info'
equal:
- 'namespace'
- 'alertname'
- source_matchers:
- 'severity = warning'
target_matchers:
- 'severity = info'
equal:
- 'namespace'
- 'alertname'
- source_matchers:
- 'alertname = InfoInhibitor'
target_matchers:
- 'severity = info'
equal:
- 'namespace'
- target_matchers:
- 'alertname = InfoInhibitor'
- name: Basic Auth users
condition: $alertmanager_install == true
technologies: [terraform]
vars:
- name: "Basic Auth extra users"
description: "By default a admin user is created to access alertmanager but you can specify an array of usernames to create also accesses."
key: module.kube-prometheus.alertmanager_users
widget: text_area
type: array
default: []
- name: Data persistency
condition: $alertmanager_install == true
technologies: [terraform]
vars:
- name: "Persist data"
description: "Wheter to persist alertmanager data on the k8s cluster, by creating a PVC."
key: module.kube-prometheus.enable_alertmanager_persistence
widget: switch
type: boolean
default: false
- name: PVC Configuration
condition: $alertmanager_install == true && $module.kube-prometheus.enable_alertmanager_persistence == true
technologies: [terraform]
vars:
- name: "Alertmanager PVC size"
description: "The size of the persisent volume claim to create in Gb."
key: module.kube-prometheus.alertmanager_pvc_size
widget: simple_text
type: string
default: "10"
- name: "Alertmanager Data retention"
description: "The time alertmanager will retain data before deletion. Must match the regular expression [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours)."
key: module.kube-prometheus.alertmanager_data_retention
widget: simple_text
type: string
default: "10d"
- name: External Alertmanager (not deployed in k8s cluster)
technologies: [pipeline]
condition: $alertmanager_install == false && $prometheus_install == true
vars:
- name: "External endpoint"
description: "External alertmanager endpoints to be used to send prometheus alerts. You should create a credential that allows to specify how to connet to it. For more information on the parameters check the [following link](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#alertmanagerendpoints)"
key: alertmanager_use_external
widget: cy_cred
type: string
- name: Grafana
groups:
- name: Grafana DNS
condition: $grafana_install == true
technologies: [terraform]
vars:
- name: "Grafana DNS"
description: "DNS to use for Grafana."
key: module.kube-prometheus.grafana_domain_name
widget: simple_text
type: string
default: grafana.local
- name: Grafana Configuration
technologies: [terraform]
condition: $grafana_install == true
vars:
- name: "Grafana Dashboard Timezone"
description: "Timezone for the default dashboards"
key: module.kube-prometheus.grafana_default_timezone
type: string
widget: simple_text
default: Europe/France
- name: Use default grafana dashboards
description: "Wheter to use of not the default grafana dashboards"
key: module.kube-prometheus.enable_default_grafana_dashboards
widget: switch
type: boolean
default: true
- name: Default dashboards to delete
description: "Array of all dashboard corresponding configmaps to delete. TODO doc of all"
key: module.kube-prometheus.grafana_cms_to_remove
widget: text_area
type: array
default: []
- name: Grafana dashboards import
description: "Defines the public dashboards to import. TODO add link in doc on how to add"
key: module.kube-prometheus.grafana_dashboard_import
widget: text_area
type: map
default: {}
#default:
#prometheus-stats:
# # Ref: https://grafana.com/dashboards/14900
# gnetId: 14900