Last active
November 22, 2017 03:50
-
-
Save rmmartins/896e4f6a22d8b8b1bc427418e7c53ca3 to your computer and use it in GitHub Desktop.
collect-info-azure-with-grafana
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@jarvis:~$ az group create --name rg-grafana --location eastus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@jarvis:~$ az vm create --resource-group rg-grafana --name grafana-server --image UbuntuLTS --location eastus --generate-ssh-keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@jarvis:~$ az network nsg list -g rg-grafana -o table | |
Location Name ProvisioningState ResourceGroup ResourceGuid | |
---------- ----------------- ------------------- --------------- ------------------------------------ | |
eastus grafana-serverNSG Succeeded rg-grafana 9bfbd4f6-95ad-48c9-a3b7-d68af0d707f5 | |
rmartins@jarvis:~$ az network nsg rule create --resource-group rg-grafana --nsg-name grafana-serverNSG --name allow-grafana --description "Allow access to port 3000 for HTTPS" --access Allow --protocol Tcp --direction Inbound --priority 102 --source-address-prefix "*" --source-port-range "*" --destination-address-prefix "*" --destination-port-range "3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@jarvis:~$ az vm show --resource-group rg-grafana --name grafana-server -d --query publicIps -otsv | |
rmartins@jarvis:~$ ssh rmartins@[PublicIP] -i /home/rmartins/.ssh/id_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo sh -c 'echo "deb https://packagecloud.io/grafana/stable/debian/ jessie main" >> /etc/apt/sources.list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo curl https://packagecloud.io/gpg.key | sudo apt-key add - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo apt-get install grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo systemctl daemon-reload | |
rmartins@grafana-server:~$ sudo systemctl start grafana-server | |
rmartins@grafana-server:~$ sudo systemctl status grafana-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo systemctl enable grafana-server.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo grafana-cli plugins install grafana-azure-monitor-datasource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartins@grafana-server:~$ sudo systemctl restart grafana-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment