My configuration, it works....
into prometheus.yml
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
Into SOLR_HOME/contrib/prometheus-exporter
bin/solr-exporter -p 9090 -b http://Ip-solr:8983/solr -f ./conf/solr-exporter-config.xml
Then into prometheus home (same prometheus.yml)
./prometheus --log.level=debug --web.listen-address="localhost:9854"
Restart grafana service
systemctl restart grafana-server
Connect to grafana (port 3000 by default)
Create datasource prometheus
Name: Prometheus (default: Yes)
URL: http://yourservername:9854
Access: Server
Save & Test
Into Dashboard --> manage import the json file for solr
The template location is SOLR_HOME/contrib/prometheus-exporter/conf/grafana-solr-dashboard.json
Note : Use DNS name instead of localhost