Assignment

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

I searched on YouTube and follow this

https://youtu.be/GnWZsHjM5To
First Step
I will install podman

pawan@pawan-Standard:~$ sudo apt install podman


pawan@pawan-Standard:~$ sudo apt update

This command for start your service


I will start podman
systemctl start podman
systemctl status podman

Then I will install grafana


podman run -d -p 3000:3000 --name=grafanaserver -e
"GF_SECURITY_ADMIN_USER=pawan" -e "GF_SECURITY_ADMIN_PASSWORD=123"
docker.io/grafana/grafana:latest

Output

Trying to pull docker.io/grafana/grafana:latest...


Getting image source signatures
Copying blob 7968ff9bb24e done
Copying blob cb28c6be7fe3 done
Copying blob 11b3a5281d5b done
Copying blob 9621f1afde84 done
Copying blob 4b1f0ac2d676 done
Copying blob 66010bbaf309 done
Copying blob aef7a30be82c done
Copying blob 73ae7393b1ec done
Copying blob bb2d51fb84dd done
Copying config 573273e02b done
Writing manifest to image destination
Storing signatures
8262854f9f69806a3dd87e41aa7df273ba1e7f72eb1e8c3c9b90a1447e2f90f2

Check the container Status:


Using this command podman ps

pawan@pawan-Standard:~$ podman ps

OUTPUT
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
8262854f9f69 docker.io/grafana/grafana:latest 2 minutes ago Up 2 minutes ago
0.0.0.0:3000->3000/tcp grafanaserver

Then i will go inside the container and install google sheet -datasource

pawan@pawan-Standard:~$ podman exec -it grafanaserver bash


bash-5.1$ grafana-cli plugins install grafana-googlesheets-datasource
\u2714 Downloaded and extracted grafana-googlesheets-datasource v1.1.5 zip successfully
to /var/lib/grafana/plugins/grafana-googlesheets-datasource

Please restart Grafana after installing plugins. Refer to Grafana documentation for
instructions if necessary.

bash-5.1$
After installation I will check it is working properly or not
Localhost:3000
Again it will restart.
#podman restart grafanaserver

Create google API (google sheet API) and enable google sheets API

To create the API key you need to google cloud .google.com. To create the API key , open
your browser type “console.cloud.google.com/home ”.
It will open a cloud console where you will google sheet API .But first you need to create a
project in google cloud.and if there is any error related to the restriction on your company
gmail id then you need to use your ansible account .so then you need to create project with
any name then click on credential and select API key and you we able to see api key.and if
you don't see any credential.then you need go with library option it will open search bar type
google sheet there.then you will get an option “enable” google sheet API. then clink on
credential option and select on create credential and select on API key . you need to
Configure google sheets as datasource in grafana

Now copy google sheet API key from the google cloud and paste the google sheet data
source API key . then click on save and test.
Then you can go with the explore option and there you need a spreadsheet id . so open your
google spreadsheet and go to share option and allow link to anyone and copy link but we
dont need whole link. We just need a spreadsheet id so we just copy the middle part of the
link (after d/ and before /edit) that is spreadsheet id .

For example spreadsheet


link:https://docs.google.com/spreadsheets/d/1QuCzXoYxT5PQWoaQRavwWKJ6vEowW_l1
SffDoRReQIQ/edit#gid=0

Spreadsheet id = 1QuCzXoYxT5PQWoaQRavwWKJ6vEowW_l1SffDoRReQIQ
You will see whole data coming . and you can go with adding a new panel where you will
get more options for showing data in graphs .

You might also like