I tried to link grafana and postgres [docker-compose]

starting method

git clone https://github.com/guedim/grafana-postgres.git
docker-compose up -d

Login to grafana

Access http: // localhost: 3000 / from your browser user : admin password: foobar Log in with. (Set in grafana-postgres / grafana / dashboard / post.sh)

How to set in grafana GUI

Press Add data source to set up postgres The most difficult part is the following setting location. Set the host name to ** postgres: 5432 ** instead of localhost: 5432

grafana_postres_setting.png After inputting, press ** Save & Test ** and if Database Connection OK appears, the cooperation is completed.

Visualize the table

dashboard> table> edit will bring up a screen where you can write sql statements. Since https://github.com/guedim/grafana-postgres.git originally contains data, I displayed that data. tableのeditを選んでsql文を書いた.png

View postgres data

docker-compose exec postgres bash
su postgres
psql
\d #Table list display
\l #View database list
\d account_metrics #Display column list Since it is a column, specify the database
\q #exit

Recommended Posts

I tried to link grafana and postgres [docker-compose]
I tried to link JavaFX and Spring Framework.
I started MySQL 5.7 with docker-compose and tried to connect
I tried to integrate AWS I oT button and Slack
I tried to chew C # (reading and writing files)
I tried to verify yum-cron
Bad Gateway came out when I tried to connect Grafana and InfluxDB on Docker
I tried to summarize the basics of kotlin and java
I tried to verify this and that of Spring @ Transactional
I tried to make Java Optional and guard clause coexist
I tried to link chat with Minecraft server with Discord API
I tried to summarize personally useful apps and development tools (development tools)
I tried to summarize personally useful apps and development tools (Apps)
[Rails] I tried to implement "Like function" using rails and js
I want to pass the startup command to postgres with docker-compose.
I tried to chew C # (indexer)
I tried to summarize iOS 14 support
I tried to interact with Java
I tried to explain the method
I want to docker-compose up Next.js!
I tried to summarize Java learning (1)
I tried to understand nil guard
I tried to summarize Java 8 now
I tried to chew C # (polymorphism: polymorphism)
I tried to explain Active Hash
I tried to integrate Docker and Maven / Netbean nicely using Jib
I tried to see if Koalas and Elasticsearch can work together
I tried to summarize the methods of Java String and StringBuilder
I tried to summarize the methods used
I tried to introduce CircleCI 2.0 to Rails app
I tried migrating Processing to VS Code
I tried to summarize Java lambda expressions
I tried to get started with WebAssembly
[Amateur remarks] I tried to automate SSL possible (self-signed certificate) with Docker-Compose
I tried to summarize the key points of gRPC design and development
I tried to solve AOJ's Binary Search
I tried to make my own transfer guide using OpenTripPlanner and GTFS
I made a virtual currency arbitrage bot and tried to make money
I tried to implement the Iterator pattern
I tried to summarize the Stream API
I tried to build AdoptOpenjdk 11 on CentOS 7
What is Docker? I tried to summarize
I tried to build Ruby 3.0.0 from source
I tried to use Selenium like JQuery
I tried to touch JavaScript Part.2 Object-oriented
I tried to implement ModanShogi with Kinx
How to write and explain Dockerfile, docker-compose
I introduced OpenAPI (Swagger) to Spring Boot (gradle) and tried various settings
I tried to measure and compare the speed of GraalVM with JMH
I tried to create a portfolio with AWS, Docker, CircleCI, Laravel [with reference link]
A story when I tried to make a video by linking Processing and Resolume
I tried to verify whether it would be fun to combine "programming" and "hobbies".
[JDBC ③] I tried to input from the main method using placeholders and arguments.
I tried to convert JavaBean and XML with Jackson formatter XML in this era
I tried to summarize about JVM / garbage collection
I tried to make Basic authentication with Java
I tried to implement polymorphic related in Nogizaka.
I tried to manage struts configuration with Coggle
I tried to manage login information with JMX
I tried to organize the session in Rails
java I tried to break a simple block