File tree 5 files changed +78
-0
lines changed
5 files changed +78
-0
lines changed Original file line number Diff line number Diff line change
1
+ [grafana]
2
+ name=grafana
3
+ baseurl=https://packages.grafana.com/oss/rpm
4
+ repo_gpgcheck=1
5
+ enabled=1
6
+ gpgcheck=1
7
+ gpgkey=https://packages.grafana.com/gpg.key
8
+ sslverify=1
9
+ sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Original file line number Diff line number Diff line change
1
+ [prometheus]
2
+ name=prometheus
3
+ baseurl=https://packagecloud.io/prometheus-rpm/release/el/7/$basearch
4
+ repo_gpgcheck=1
5
+ enabled=1
6
+ gpgkey=https://packagecloud.io/prometheus-rpm/release/gpgkey
7
+ https://raw.githubusercontent.com/lest/prometheus-rpm/master/RPM-GPG-KEY-prometheus-rpm
8
+ gpgcheck=1
9
+ sslverify=1
10
+ sslcacert=/etc/pki/tls/certs/ca-bundle.crt
11
+ metadata_expire=300
Original file line number Diff line number Diff line change
1
+ Page up
2
+ # my global config
3
+ global :
4
+ scrape_interval : 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
5
+ evaluation_interval : 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
6
+ # scrape_timeout is set to the global default (10s).
7
+ # Attach these labels to any time series or alerts when communicating with
8
+ # external systems (federation, remote storage, Alertmanager).
9
+ external_labels :
10
+ monitor : ' codelab-monitor'
11
+ # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
12
+ rule_files :
13
+ # - "first.rules"
14
+ # - "second.rules"
15
+ # A scrape configuration containing exactly one endpoint to scrape:
16
+ # Here it's Prometheus itself.
17
+ scrape_configs :
18
+ # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
19
+ - job_name : ' prometheus'
20
+ # metrics_path defaults to '/metrics'
21
+ # scheme defaults to 'http'.
22
+ static_configs :
23
+ - targets : ['localhost:9090']
24
+ # scrape Redis Enterprise central
25
+ - job_name : redis-enterprise
26
+ scrape_interval : 30s
27
+ scrape_timeout : 30s
28
+ metrics_path : /
29
+ scheme : https
30
+ tls_config :
31
+ insecure_skip_verify : true
32
+ static_configs :
Original file line number Diff line number Diff line change @@ -356,6 +356,12 @@ Resources:
356
356
Tags :
357
357
- Key : ' Name'
358
358
Value : !Join ['', [!Ref AWS::StackName, 'APPEC2'] ]
359
+ BlockDeviceMappings :
360
+ - DeviceName : " /dev/xvda"
361
+ Ebs :
362
+ DeleteOnTermination : ' true'
363
+ VolumeSize : ' 60'
364
+ VolumeType : gp2
359
365
UserData :
360
366
Fn::Base64 :
361
367
!Sub |
@@ -377,6 +383,18 @@ Resources:
377
383
make install
378
384
cd /home/ec2-user
379
385
chown -R ec2-user:ec2-user memtier_benchmark
386
+ cp redisSMSLuaA-A/grafana.repo /etc/yum.repos.d
387
+ cp redisSMSLuaA-A/prometheus.repo /etc/yum.repos.d
388
+ cp redisSMSLuaA-A/prometheus.yml /etc/prometheus
389
+ echo " - targets : [${RedisNSRecord}:${RedisDatabasePort}]">> /etc/prometheus/prometheus.yml
390
+ yum -y makecache fast
391
+ yum install -y grafana
392
+ systemctl enable --now grafana-server.service
393
+ systemctl enable --now prometheus.service
394
+ yum install -y prometheus2.x86_64
395
+ grafana-cli plugins install redis-datasource
396
+ systemctl restart grafana
397
+
380
398
381
399
RedisARecord1E :
382
400
Type : AWS::Route53::RecordSet
Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ Resources:
120
120
CidrIp : !Join ['', [!Ref LocalIp, "/32"] ]
121
121
FromPort : 22
122
122
ToPort : 22
123
+ - IpProtocol : " tcp"
124
+ CidrIp : !Join ['', [!Ref LocalIp, "/32"] ]
125
+ FromPort : 3000
126
+ ToPort : 3000
123
127
- IpProtocol : " tcp"
124
128
CidrIp : " 0.0.0.0/0"
125
129
FromPort : 9443
@@ -128,6 +132,10 @@ Resources:
128
132
CidrIp : " 0.0.0.0/0"
129
133
FromPort : 8080
130
134
ToPort : 8080
135
+ - IpProtocol : " tcp"
136
+ CidrIp : " 0.0.0.0/0"
137
+ FromPort : 9081
138
+ ToPort : 9081
131
139
- IpProtocol : " tcp"
132
140
CidrIp : " 0.0.0.0/0"
133
141
FromPort : 8443
You can’t perform that action at this time.
0 commit comments