File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ WantedBy=multi-user.target
117117EOF
118118
119119[ -s /etc/rsyslog.d/vm-agent.conf ] || cat << EOF > /etc/rsyslog.d/vm-agent.conf
120- if $programname == 'vm-agent' then /var/log/vm-agent.log
120+ if \ $ programname == 'vm-agent' then /var/log/vm-agent.log
121121& stop
122122EOF
123123
@@ -131,11 +131,21 @@ EOF
131131}
132132EOF
133133[ -s /opt/victoriametrics/scraper.yml ] || cat << EOF > /opt/victoriametrics/scraper.yml
134+ global:
135+ scrape_interval: 15s
136+ static_configs:
137+ - labels:
138+ hostname: $( hostname)
139+
134140scrape_configs:
135141 - job_name: node
136- scrape_interval: 15s
142+ relabel_configs:
143+ - source_labels: [__hostname__]
144+ target_label: instance
145+ replacement: "$( hostname) "
137146 static_configs:
138147 - targets: ['localhost:9100']
148+
139149EOF
140150
141151systemctl daemon-reload
You can’t perform that action at this time.
0 commit comments