conf/goosefs-site.properties by adding the configuration items below. Then, use goosefs copyDir conf/ to copy all worker nodes and use ./bin/goosefs-start.sh all to restart the cluster.goosefs.user.metrics.collection.enabled=truegoosefs.user.metrics.heartbeat.interval=10s
curl <LEADING_MASTER_HOSTNAME>:<MASTER_WEB_PORT>/metrics/prometheus/# HELP Master_CreateFileOps Generated from Dropwizard metric import (metric=Master.CreateFileOps, type=com.codahale.metrics.Counter)...curl <WORKER_IP>:<WOKER_PORT>/metrics/prometheus/# HELP pools_Code_Cache_max Generated from Dropwizard metric import (metric=pools.Code-Cache.max, type=com.codahale.metrics.jvm.MemoryUsageGaugeSet$$Lambda$51/137460818)...
prometheus.yml as follows:# prometheus.ymlglobal:scrape_interval: 10sevaluation_interval: 10sscrape_configs:- job_name: 'goosefs masters'metrics_path: /metrics/prometheusfile_sd_configs:- refresh_interval: 1mfiles:- "targets/cluster/masters/*.yml"- job_name: 'goosefs workers'metrics_path: /metrics/prometheusfile_sd_configs:- refresh_interval: 1mfiles:- "targets/cluster/workers/*.yml"
targets/cluster/masters/masters.yml and add the IP and port of the master:- targets:- "<TARGERTS_MASTER_IP>:<TARGERTS_MASTER_PORT>"
targets/cluster/workers/workers.yml and add the IP and port of the worker:- targets:- "<TARGERTS_WORKER_IP>:<TARGERTS_WORKER_PORT>"
--web.listen-address specifies the Prometheus listen address. The default port number is 9090.nohup ./prometheus --config.file=prometheus.yml --web.listen-address="<LISTEN_IP>:<LISTEN_PORT>" > prometheus.log 2>&1 &
http://<PROMETHEUS_BI_IP>:<PROMETHEUS_BI_PORT>
http://<PROMETHEUS_BI_IP>:<PROMETHEUS_BI_PORT>/targets
wget https://rig-1258344699.cos.ap-guangzhou.myqcloud.com/prometheus-agent/agent_install && chmod +x agent_install && ./agent_install prom-12kqy0mw agent-grt164ii ap-guangzhou <secret_id> <secret_key>
job_name: goosefs-mastershonor_timestamps: truemetrics_path: /metrics/prometheusscheme: httpfile_sd_configs:- files:- /usr/local/services/prometheus/targets/cluster/masters/*.ymlrefresh_interval: 1mjob_name: goosefs-workershonor_timestamps: truemetrics_path: /metrics/prometheusscheme: httpfile_sd_configs:- files:- /usr/local/services/prometheus/targets/cluster/workers/*.ymlrefresh_interval: 1m
job_name. However, the value of job_name in single-machine Prometheus can contain spaces.job_name: goosefs mastershonor_timestamps: truemetrics_path: /metrics/prometheusscheme: httpstatic_configs:- targets:- "<TARGERTS_MASTER_IP>:<TARGERTS_MASTER_PORT>"refresh_interval: 1mjob_name: goosefs workershonor_timestamps: truemetrics_path: /metrics/prometheusscheme: httpstatic_configs:- targets:- "<TARGERTS_WORKER_IP>:<TARGERTS_WORKER_PORT>"refresh_interval: 1m
masters.yml and workers.yml files under targets/cluster/masters/.nohup ./bin/grafana-server web > grafana.log 2>&1 &
http://<GRAFANA_IP>:<GRAFANA_PORT>. By default, Grafana will be listening on port 3000, and both the “username” and “password” are “admin”. You can change the password after your initial login.<PROMETHEUS_IP>:<PROMETHEUS_PORT>
job_name should be consistent.masukan