Aim :
Install Grafana OSS (open-source version) on Ubuntu using Docker.
Grafana Installation Steps
Step 1: Pull and Run the Grafana Container
- Pull and start the Grafana container:
sudo docker run -d -p 3000:3000 --name=grafana grafana/grafana-oss
-d
: Detaches the container and runs it in the background.-p 3000:3000
: Maps port 3000 on your host machine to port 3000 inside the container, enabling access to Grafana's web interface.--name=grafana
: Specifies the name of the container asgrafana
.
Step 2: Access Grafana
- Once the container is running, access Grafana by opening a web browser and navigating to:
http://localhost:3000
If Grafana is running on a remote server or different IP, replacelocalhost
with the server's IP or hostname.
Step 3: Initial Setup
- On the first visit, you'll be prompted to:
- Set up an admin password (default username:
admin
). - Configure data sources and dashboards as needed.
- Set up an admin password (default username:
Step 4: Change Admin Password
- After logging in with the default credentials:
- Click on the user icon in the lower-left corner, then select "Admin" to access the Admin menu.
- Go to "Profile" and then "Change password" to update the admin password.
Useful Grafana and Docker Commands
- Grafana Commands:
- Restart Grafana container:
sudo docker restart grafana
- View logs of Grafana container:
sudo docker logs grafana
- Restart Grafana container:
- Docker Commands:
- List all running containers:
sudo docker ps
- Stop and remove Grafana container:
sudo docker stop grafana
sudo docker rm grafana
- Clean up unused Docker resources (containers, images, networks):
sudo docker system prune
- List all running containers:
Comments
Post a Comment