File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
instance_id = $(shell curl "http://10.1.9.49:4001/api/instance_id?name=cakecloud-db&project_name=${project}")
2
2
hostname = $(shell hostname)
3
+ DATA_SOURCE_NAME ="postgresql://${database_user}:${database_password}@localhost:${port}/${database_name}"
4
+ PG_EXPORTER_CONSTANT_LABELS="domain =${instance_id}_${hostname}"
3
5
4
6
all : prepare_files save_env_vars start_service
5
7
@@ -9,10 +11,8 @@ prepare_files:
9
11
sudo cp -r ./cakecloud-postgres-exporter.service /etc/systemd/system/
10
12
11
13
save_env_vars :
12
- DATA_SOURCE_NAME=" postgresql://${database_user} :${database_password} @localhost:${port} /${database_name} "
13
- echo $(DATA_SOURCE_NAME ) >> vars/DATA_SOURCE_NAME
14
- PG_EXPORTER_CONSTANT_LABELS=" domain=${instance_id} _${hostname} "
15
- echo $(PG_EXPORTER_CONSTANT_LABELS ) >> vars/PG_EXPORTER_CONSTANT_LABELS
14
+ echo $(DATA_SOURCE_NAME ) > vars/DATA_SOURCE_NAME
15
+ echo $(PG_EXPORTER_CONSTANT_LABELS ) > vars/PG_EXPORTER_CONSTANT_LABELS
16
16
17
17
start :
18
18
export DATA_SOURCE_NAME=$(shell cat ./vars/DATA_SOURCE_NAME) ; \
You can’t perform that action at this time.
0 commit comments