Install Applications
Pigsty can be used to deploy and monitor PostgreSQL and make and distribute data Applications.
Pigsty provides three sample applications.
pglog, which analyzes PostgreSQL CSV log samples.covid, which visualizes WHO COVID-19 data and accesses country outbreak data.pglog, NOAA ISD, allows querying weather observation records from 1901 for 30,000 surface weather stations.
Structure of the application
A Pigsty application typically includes at least one or all of the following.
- A graphical interface (Grafana Dashboard Definition) placed in the
uidir. - Data definitions (PostgreSQL DDL File), placed in the
sqldir. - Data files (various resources, files to download), placed in the
datadir. - Logical scripts (executing various types of logic), placed in the
bindir.
A Pigsty application will provide an installation script in the application root dir: install or a shortcut to it. You need to use an admin user to install the meta node. The installation script detects the current environment (gets METADB_URL, PIGSTY_HOME, GRAFANA_ENDPOINT to perform the installation).
Dashboards with the APP label are included in the App drop-down menu in the Pigsty Grafana home page navigation. The home page dashboard navigation includes dashboards with the APP and Overview labels.
You can download the app with the base data from https://github.com/Vonng/pigsty/releases/download/v1.5.1/app.tgz.
COVID
A more straightforward sample data application: visualize WHO COVID-19 data and access country outbreak data.
Public demo: http://demo.pigsty.cc/d/covid-overview
Installation method
For finer control.
If data is already downloaded (e.g., get applications via downloading app.tgz), run make all2 instead to skip the download.
ISD
A feature-complete data application that queries 30,000 surface weather stations worldwide for weather observations from 1901 onwards.
Public demo: http://demo.pigsty.cc/d/isd-overview
Project address: https://github.com/Vonng/isd
Installation
For more fine-grained control.
PGLOG CSVLOG Sample Analysis
PGLOG Analysis & PGLOG Session provide introspection about PostgreSQL csvlog sample (via table pglog.sample on cmdb).
- PGLOG Analysis: Analysis of csvlog sample on CMDB (focusing on entire log sample).
- PGLOG Session: Analysis of csvlog sample (focusing on the single session).
There are some handy alias & func sets on the meta node.
Load csvlog from stdin into sample table.
Get log from pgsql node.
Combine theme to fetch and load csvlog sample.