An open API service indexing awesome lists of open source software.

https://github.com/exhuma/pgflux-origin

Monitoring Script for PostgreSQL and InfluxDB
https://github.com/exhuma/pgflux-origin

Last synced: 11 months ago
JSON representation

Monitoring Script for PostgreSQL and InfluxDB

Awesome Lists containing this project

README

          

pgflux
======

A simple Python utility to send PostgreSQL metrics to InfluxDB

Development
===========

* Set up development environment::

fab develop

* Run a docker container for testing::

docker run --rm \
-e POSTGRES_PASSWORD=mys3cr37passw0rd \
-p :5432 \
postgresql:latest

* Create a ``.env`` file (use ``.env.template`` as guide)::

PGFLUX_DSN=postgresql://postgres:mys3cr37passw0rd@localhost:/postgres

* Run the tests::

./env/bin/pytest

Setting up Influx for Testing
=============================

::

docker run \
-p 8086:8086 \ ✓
--rm \
--name influxdb \
influxdb:1.8
docker exec -ti influxdb influx
> CREATE DATABASE postgres_stats