Hi!
I'm trying to run this tutorial (https://www.percona.com/blog/2016/02/29/graphing-mysql-performance-with-prometheus-and-grafana/) to get MySQL to work with Prometheus, but can't get my Prometheus to work. The config is written underneath and so is the error-message. Please help me!!!
I even tried the code in http://www.yamllint.com, and it said it was valid....
Thank you! :)
cat << EOF > /opt/prometheus/prometheus.yml
global
scrape_interval 5s
evaluation_interval 5s
scrape_configs
- job_name linux
target_groups
- targets ['192.168.56.107:9100']
labels
alias db1
- job_name mysql
target_groups
- targets ['192.168.56.107:9104']
labels
alias db1
EOF
INFO[0000] Starting prometheus (version=1.5.2, branch=master, revision=bd1182d29f462c39544f94cc822830e1c64cf55b) source=main.go:75
INFO[0000] Build context (go=go1.7.5, user=root@a8af9200f95d, date=20170210-14:41:22) source=main.go:76
INFO[0000] Loading configuration file prometheus.yml source=main.go:248
ERRO[0000] Error loading config: couldn't load configuration (-config.file=prometheus.yml): yaml: unmarshal errors:
line 1: cannot unmarshal !!str `cat << ...` into config.plain source=main.go:150