How can the default port number in Grafana be changed?

To change the default port of Grafana, you need to edit the Grafana configuration file, grafana.ini. Here are the steps to modify it on a Linux system:

  1. Open the terminal and use a text editor to open the grafana.ini file.
  2. Could you open the grafana.ini file in the /etc/grafana directory using sudo vi command?
  3. Search for the “[server]” section in the file, locate the line “http_port = 3000”, which is the default port number for Grafana.
  4. Change the port number of this line to the new port number you desire, for example:
  5. Port 8080 is set for HTTP communication.
  6. Save and close the file.
  7. Restart the Grafana service to apply the configuration changes by using the following command:
  8. Restart the Grafana server using the command “sudo systemctl restart grafana-server”.

Now, Grafana will be accessed using the new port number you modified. Remember to access the Grafana dashboard in the browser using the new port number.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds