# Configure PCM dashboard on NP04 ###### tags: `DUNE-DAQ` ## Install `pcm-sensor-server` This is done already for `np04-srv-028`. ## Configure Prometheus to scrape the data Adding the following to `/log/prometheus/prometheus-2.2.1.linux-amd64/prometheus.yml`, and restart Prometheus via `supervisord` (go to np04-srv-009:9001) ```yaml! - job_name: 'pcm' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['np04-srv-028.cern.ch:9738'] ``` Once Prometheus is restarted, go to http://np04-srv-009.cern.ch:9090/ and execue queries on the data points from `pcm-sensor-server` to verify new data are being scraped. ## Import PCM dashboard to Grafana * Run `curl -o pcm-dashboard.json np04-srv-028.cern.ch:9738/dashboard/prometheus` to download the JSON file of PCM dashboard; * In the JSON file, change `datasource` field from `-- Grafana --` to `NP04DAQ_sysadmin`; * Open Grafana web interface, and create a new dashboard with uploading the JSON file.