Showing preview only (951K chars total). Download the full file or copy to clipboard to get everything.
Repository: credativ/elephant-shed
Branch: rel1_3
Commit: 0e1afe36aa1e
Files: 168
Total size: 899.6 KB
Directory structure:
gitextract_fgr39gxo/
├── .gitignore
├── .gitlab-ci.yml
├── .vimrc
├── LICENSE
├── Makefile
├── README.md
├── ci/
│ ├── .gitignore
│ ├── ansible.cfg
│ ├── build-grafana.sh
│ ├── credativDeutschlandServerCA-chain.pem
│ ├── inventory
│ ├── openstack_remove_instance_if_exists.sh
│ ├── openstackrc.sh
│ ├── rebuild.sh
│ └── setup-gitlab-runner
├── cockpit/
│ ├── cockpit.conf
│ └── port.conf
├── debian/
│ ├── .gitignore
│ ├── changelog
│ ├── clean
│ ├── compat
│ ├── control
│ ├── copyright
│ ├── elephant-shed-cockpit.install
│ ├── elephant-shed-cockpit.postinst
│ ├── elephant-shed-grafana.install
│ ├── elephant-shed-grafana.postinst
│ ├── elephant-shed-omnidb.install
│ ├── elephant-shed-omnidb.postinst
│ ├── elephant-shed-pgbackrest.install
│ ├── elephant-shed-pgbackrest.postinst
│ ├── elephant-shed-pgbadger.dirs
│ ├── elephant-shed-pgbadger.install
│ ├── elephant-shed-pgbadger.postinst
│ ├── elephant-shed-portal.install
│ ├── elephant-shed-portal.lintian-overrides
│ ├── elephant-shed-portal.postinst
│ ├── elephant-shed-postgresql.install
│ ├── elephant-shed-postgresql.postinst
│ ├── elephant-shed-powa.install
│ ├── elephant-shed-powa.postinst
│ ├── elephant-shed-prometheus-node-exporter.install
│ ├── elephant-shed-prometheus-node-exporter.mainscript
│ ├── elephant-shed-prometheus-node-exporter.postinst
│ ├── elephant-shed-prometheus-sql-exporter.install
│ ├── elephant-shed-prometheus-sql-exporter.lintian-overrides
│ ├── elephant-shed-prometheus-sql-exporter.maintscript
│ ├── elephant-shed-prometheus-sql-exporter.postinst
│ ├── elephant-shed-prometheus-sql-exporter.postrm
│ ├── elephant-shed-prometheus.install
│ ├── elephant-shed-prometheus.postinst
│ ├── elephant-shed-shellinabox.postinst
│ ├── elephant-shed-tmate.install
│ ├── elephant-shed-tmate.lintian-overrides
│ ├── elephant-shed-tmate.postinst
│ ├── rules
│ └── source/
│ └── format
├── doc/
│ ├── .gitignore
│ ├── Makefile
│ ├── chapter/
│ │ ├── components.md
│ │ ├── first-steps.md
│ │ ├── installation.md
│ │ ├── intro.md
│ │ ├── issues.md
│ │ ├── license.md
│ │ ├── support.md
│ │ └── users.md
│ ├── conf.py
│ └── index.rst
├── grafana/
│ ├── README
│ ├── dashboard-sed
│ ├── datasource_prometheus.yml
│ ├── elephant-shed-grafana
│ ├── elephant-shed-grafana.conf
│ ├── elephant-shed-grafana.ini
│ ├── node_overview.json
│ ├── node_overview.yml
│ ├── postgresql_server_overview.json
│ └── postgresql_server_overview.yml
├── image-sources/
│ └── Unbenannt-1.psd
├── node-exporter/
│ ├── elephant-shed-prometheus-node-exporter
│ └── elephant-shed-prometheus-node-exporter.conf
├── omnidb/
│ └── wsgi.py
├── pgbackrest/
│ ├── pgbackrest-archivecommand
│ ├── pgbackrest-incr@.service
│ ├── pgbackrest-incr@.timer
│ ├── pgbackrest-run
│ ├── pgbackrest-toggle-archiving
│ ├── pgbackrest-toggle-archiving@.service
│ ├── pgbackrest@.service
│ └── pgbackrest@.timer
├── pgbadger/
│ ├── pgbadger-generator
│ ├── pgbadger-run
│ ├── pgbadger.service
│ ├── pgbadger.timer
│ └── pgbadger@.service
├── portal/
│ ├── cgi-bin/
│ │ ├── backrest.pl
│ │ ├── error.pl
│ │ ├── index_footer.pl
│ │ ├── index_header.pl
│ │ ├── notloggedin.pl
│ │ ├── portalmain.pl
│ │ └── support.pl
│ ├── elephant-shed.conf
│ ├── static/
│ │ └── css/
│ │ ├── elephant-shed.css
│ │ └── esmenu.css
│ └── template/
│ ├── backrest.html
│ ├── error.html
│ ├── footer.html
│ ├── header.html
│ ├── notloggedin.html
│ ├── portalmain.html
│ └── support.html
├── postgresql/
│ ├── elephant-shed.conf
│ ├── es_ctlcluster
│ └── rsyslog-postgresql-discard.conf
├── powa/
│ └── update-powa-web-config
├── prometheus/
│ ├── elephant-shed-prometheus
│ ├── elephant-shed-prometheus.conf
│ └── elephant-shed-prometheus.yml
├── rpm/
│ ├── 56-authnz_external.conf
│ ├── README
│ ├── elephant-shed.spec
│ └── tmate.spec
├── sql-exporter/
│ ├── SAMPLE.yml
│ ├── activity.yml
│ ├── elephant-shed.conf
│ ├── io.yml
│ ├── prometheus-sql-exporter-restart.service
│ ├── prometheus-sql-exporter-restart.timer
│ ├── queries.yml
│ ├── replication.yml
│ ├── update-prometheus-sql-exporter-config
│ └── wal.yml
├── tmate/
│ └── tmate.conf
└── vagrant/
├── .gitignore
├── Vagrantfile
├── Vagrantfile.template
├── ansible.cfg
├── elephant-shed.yml
├── files/
│ ├── git/
│ │ └── gitconfig
│ ├── grafana-key.10458545.asc
│ └── postgresql/
│ ├── ACCC4CF8.asc
│ └── pg_hba.conf
├── group_vars/
│ ├── all
│ ├── dev
│ ├── openpower
│ ├── test
│ ├── test-with-disks
│ └── x86-big
├── handlers.yml
├── inventory
├── openstack/
│ └── Vagrantfile
├── tasks/
│ ├── apache2.yml
│ ├── config-backup.yml
│ ├── config-system.yml
│ ├── ferm.yml
│ ├── grafana.yml
│ ├── packages.yml
│ ├── partitioning.yml
│ ├── postgresql.yml
│ └── repository-local.yml
├── templates/
│ ├── apache2/
│ │ └── mpm_event.conf.j2
│ ├── ferm/
│ │ ├── elephant-shed.conf.j2
│ │ └── ferm.conf.j2
│ ├── postgres/
│ │ └── postgres-limits.conf.j2
│ └── postgresql-common/
│ └── performance-tuning.conf.j2
└── vagrantpackage.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
CONCEPT.html
CONCEPT.pdf
README.html
README.pdf
lintian.log
*.swp
rpm/SOURCES
rpm/SPECS
rpm/RPMS
rpm/SRPMS
rpm/BUILD
rpm/BUILDROOT
================================================
FILE: .gitlab-ci.yml
================================================
image: "debian:stretch"
stages:
- docbuild
- build
- publish
# - test
- deploy
### build ###
docbuild:docs:
stage: docbuild
image: "tianon/latex"
script:
- apt-get update -qq
- apt-get install -y --no-install-recommends make sphinx-common python3-sphinx python3-recommonmark python3-sphinx-rtd-theme
- make docs
artifacts:
paths:
- doc/_build/html
build:stretch: &build
stage: build
script:
- apt-get update -qq
- apt-get -y --no-install-recommends build-dep ./
- apt-get -y --no-install-recommends install devscripts
- ci/rebuild.sh $dist $is_release
- make deb BUILD_ARGS=-Pstretch
- mkdir -p debs
- mv ../*.* debs
variables:
dist: deb9
artifacts:
expire_in: 2 weeks
paths:
- debs/*
- lintian.log
build:stretch-release:
<<: *build
variables:
dist: deb9
is_release: release
when: manual
build:buster: &build_buster
<<: *build
image: "debian:buster"
script:
- apt-get update -qq
- apt-get -y --no-install-recommends build-dep ./
- apt-get -y --no-install-recommends install devscripts
- ci/rebuild.sh $dist $is_release
- make deb
- mkdir -p debs
- mv ../*.* debs
variables:
dist: deb10
build:buster-release:
<<: *build_buster
variables:
dist: deb10
is_release: release
when: manual
build:bionic: &build_bionic
<<: *build_buster
variables:
dist: ubuntu18.04
build:bionic-release:
<<: *build_bionic
variables:
dist: ubuntu18.04
is_release: release
when: manual
build:centos7: &build_centos7
image: "centos:centos7"
stage: build
dependencies:
- docbuild:docs
script:
- yum install -y rpm-build yum-utils git make
- yum-builddep -y rpm/elephant-shed.spec
- make rpmbuild PACKAGE_RELEASE=1~$(date -u +%Y%m%d.%H%M%S)
artifacts:
expire_in: 2 weeks
paths:
- rpm/RPMS/*/*
- rpm/SRPMS/*
build:centos7-release:
<<: *build_centos7
script:
- yum install -y rpm-build yum-utils git make
- yum-builddep -y rpm/elephant-shed.spec
- make rpmbuild
when: manual
### publish ###
publish:stretch: &publish
tags:
- aptly
stage: publish
dependencies:
- build:stretch
script:
- aptly repo add $repo debs/*.dsc debs/*.deb
- aptly publish update $repo
- sync_packages.sh
variables:
repo: stretch-test
only:
- master
- rel1_3
publish:stretch-release:
<<: *publish
dependencies:
- build:stretch-release
variables:
repo: stretch-stable
when: manual
publish:buster: &publish_buster
<<: *publish
dependencies:
- build:buster
variables:
repo: buster-test
publish:buster-release:
<<: *publish_buster
dependencies:
- build:buster-release
variables:
repo: buster-stable
when: manual
publish:bionic: &publish_bionic
<<: *publish
dependencies:
- build:bionic
variables:
repo: bionic-test
publish:bionic-release:
<<: *publish_bionic
dependencies:
- build:bionic-release
variables:
repo: bionic-stable
when: manual
publish:centos7: &publish_centos
<<: *publish
dependencies:
- build:centos7
script:
- rpm --addsign rpm/RPMS/noarch/*.rpm rpm/SRPMS/*.rpm
- cp rpm/RPMS/noarch/*.rpm /home/debian/postgresql/yum/$repo/noarch
- cp rpm/SRPMS/*.rpm /home/debian/postgresql/yum/$repo/src
- cd /home/debian; make $repo
variables:
repo: el7-test
publish:centos7-release:
<<: *publish_centos
dependencies:
- build:centos7-release
variables:
repo: el7
when: manual
### deploy ###
# requires gitlab-runner to be configured to execute shell commands as root:
# rm /home/gitlab-runner/.bash_logout
# systemctl edit gitlab-runner
# [Service]
# ExecStart=
# ExecStart=/usr/bin/gitlab-runner "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--service" --user root
deploy:stretch-x86: &deploy
stage: deploy
dependencies:
- publish:stretch
tags:
- stretch-amd64
script:
- 'test -f /etc/apt/sources.list.d/credativ_postgresql.list || echo "deb https://packages.credativ.com/public/postgresql/ $(lsb_release -cs)-test main" > https://packages.credativ.com/public/postgresql/'
- apt-get update -q
#- apt-get install -y ansible
- apt-get install -y 'elephant-shed.*'
only:
- master
- rel1_3
environment:
name: elephant-shed
url: https://elephant-shed.dev.credativ.de
deploy:buster-x86:
<<: *deploy
dependencies:
- publish:buster
tags:
- buster-amd64
environment:
name: elephant-shed-buster
url: https://elephant-shed-buster.dev.credativ.de
deploy:bionic-x86:
<<: *deploy
dependencies:
- publish:bionic
tags:
- bionic-amd64
environment:
name: elephant-shed-bionic
url: https://elephant-shed-bionic.dev.credativ.de
deploy:centos7-x86:
<<: *deploy
stage: deploy
dependencies:
- build:centos7
tags:
- centos7-x86
script:
- 'test -f /etc/yum.repos.d/pgdg-redhat-all.repo || yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm'
- 'test -f /etc/yum.repos.d/credativ-test.repo || yum install -y https://packages.credativ.com/public/postgresql/yum/credativ-test-repo.rpm'
- yum clean expire-cache
- yum update -y
- yum install -y elephant-shed
environment:
name: elephant-shed-centos7
url: https://elephant-shed-centos7.dev.credativ.de
================================================
FILE: .vimrc
================================================
set sw=2
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: Makefile
================================================
# Default git branch to build in RPM
ifndef GITBRANCH
GITBRANCH=HEAD
endif
all: docs
doc docs:
$(MAKE) -C doc html
deb:
dpkg-buildpackage -us -uc $(BUILD_ARGS)
lintian | tee -a lintian.log
upload_packages: deb
aptly/upload_packages.sh
include_packages:
aptly/include_packages.sh
publish_packages:
aptly/publish_packages.sh
vagrant: deb
cd vagrant && vagrant up --provision
ansible: deb
cd vagrant && ./elephant-shed.yml $(ANSIBLE_ARGS)
deploy_openpower: vagrant/inventory.openpower
cd vagrant && ./elephant-shed.yml $(ANSIBLE_ARGS) \
-i inventory.openpower \
-e "repo=http"
clean:
$(MAKE) -C doc clean
$(MAKE) -C grafana clean
rm -rf rpm/SOURCES/ rpm/SPECS rpm/BUILD rpm/BUILDROOT rpm/RPMS rpm/SRPMS
# rpm
DPKG_VERSION=$(shell sed -ne '1s/.*(//; 1s/).*//p' debian/changelog)
PACKAGE_RELEASE=1
RPMDIR=$(CURDIR)/rpm
TARBALL=$(RPMDIR)/SOURCES/elephant-shed_$(DPKG_VERSION).tar
rpmbuild: $(TMATESOURCE) $(TARBALL).xz
rpmbuild -D"%_topdir $(RPMDIR)" --define='package_version $(DPKG_VERSION)' --define='package_release $(PACKAGE_RELEASE)' -ba rpm/elephant-shed.spec
tarball $(TARBALL).xz:
mkdir -p $(dir $(TARBALL))
rm -f $(TARBALL).xz
git archive --prefix=elephant-shed-$(DPKG_VERSION)/ $(GITBRANCH) > $(TARBALL)
# include pre-built documentation in tarball
tar --append --transform "s!^!elephant-shed-$(DPKG_VERSION)/!" -f $(TARBALL) doc/_build/html
xz $(TARBALL)
# tmate rpm
TMATESOURCE=$(CURDIR)/rpm/SOURCES/$(shell rpmspec --srpm --query --queryformat '%{Source}' rpm/tmate.spec)
rpmbuild-tmate: $(TMATESOURCE)
rpmbuild -D"%_topdir $(RPMDIR)" --define='package_version $(DPKG_VERSION)' -ba rpm/tmate.spec
$(TMATESOURCE):
mkdir -p rpm/SOURCES
spectool -S -g -C rpm/SOURCES rpm/tmate.spec
================================================
FILE: README.md
================================================
<img src="portal/image/button_home.png" width="200">
# Intro
Elephant Shed is a web-based PostgreSQL management front-end that bundles
several utilities and applications for use with PostgreSQL. It currently
manages single-node Linux PostgreSQL servers and appliances.
The main components are:
* PostgreSQL - <https://www.postgresql.org/>
* OmniDB - <https://omnidb.org/>
* postgresql-common - <https://salsa.debian.org/postgresql/postgresql-common>
* pgBadger - <http://dalibo.github.io/pgbadger/>
* pgBackRest - <http://www.pgbackrest.org/>
* Grafana - <https://grafana.com/>
* Prometheus - <https://prometheus.io/>
* Cockpit - <http://cockpit-project.org/>
* Shell In A Box - <https://github.com/shellinabox/shellinabox>
* tmate - <https://tmate.io/>
All PostgreSQL versions are supported via <https://apt.postgresql.org>.
Supported distributions:
* Debian Trixie (13)
* Debian Bookworm (12)
* Ubuntu Noble (24.04)
* Ubuntu Jammy (22.04)
# Download
Packages, Vagrant boxes, images: <https://elephant-shed.io/#download>
# Documentation
The documentation is located at <https://elephant-shed.io/doc/>
# Screenshots
## Portal
The main portal webpage has links to all bundled applications. It also shows
the PostgreSQL status, and allows starting/stopping the clusters, backup, and
log reports.

## Cockpit
For managing clusters and services, Cockpit is used.

## Monitoring - Prometheus
Prometheus is a metric based monitoring system for servers and services. It
collects metrics from configured targets at given intervals, evaluates rule
expressions, displays the results, and can trigger alerts if some condition is
observed to be true.

## Monitoring - Grafana
Grafana bundles metrics collected by Prometheus and presents them in a dashboard.

## DBA Tool - OmniDB
OmniDB is a management tool for PostgreSQL to help DBAs execute many different tasks.
It provides user management, DDL functionality, an interactive SQL shell, and more.

## Backup - pgBackRest
The Elephant Shed comes with a preinstalled backup solution, *pgBackRest*.

## Reporting - pgBadger
A pgBadger report is created for each PostgreSQL instance.

## Web Terminal - Shell In A Box
Shell In A Box is a convenient web based terminal.
## Remote Control - tmate
tmate is a fork of the popular terminal multiplexer tmux, tweaked for instant
terminal sharing. It is preconfigured to connect to a relay server and enables
the user to share the current terminal with a third party using a secret token.

# License
The Elephant Shed itself is licensed under the GPLv3 (<https://www.gnu.org/licenses/gpl-3.0.html>).
All bundled components are Free/Open-Source software with a known and approved open source license.
# Support
* Documentation: <https://elephant-shed.io/doc/>
* Web-Chat: [#elephant-shed](https://webchat.oftc.net/?nick=web-user-.&channels=elephant-shed&uio=MT11bmRlZmluZWQmMj10cnVlJjk9dHJ1ZSYxMT0yMzY31)
* IRC [#elephant-shed](https://webchat.oftc.net/?channels=elephant-shed&uio=MT11bmRlZmluZWQmMj10cnVlJjk9dHJ1ZSYxMT0yMzY31
) on [irc.oftc.net](https://www.oftc.net/)
Elephant Shed is an open source project, developed and maintained by credativ.
For the Elephant Shed PostgreSQL appliance, credativ offers comprehensive
technical support with service level agreements, which are also available
on 365 days a year and 24 hours a day as an option.
Installation and integration support, as well as an introduction
in Elephant Shed PostgreSQL appliance is of course also part of
credativ's services. If you are interested, please feel free to contact us.

* **Web** [credativ.de](https://credativ.de)
* **E-Mail:** [info@credativ.de](mailto:info@credativ.de)
* **Phone:** [+49 2161 9174200](tel:+4921619174200)
================================================
FILE: ci/.gitignore
================================================
fact_cache/
*.retry
================================================
FILE: ci/ansible.cfg
================================================
[defaults]
hostfile = inventory
nocows = True
gathering = smart
fact_caching = jsonfile
fact_caching_connection = fact_cache
[ssh_connection]
pipelining = True
================================================
FILE: ci/build-grafana.sh
================================================
#!/bin/bash
# This script should be initiated inside the go src path of grafana!
# For more information on building grafana "the grafana-way" see
# https://github.com/grafana/grafana-packer.
sudo apt install golang npm gem ruby ruby-dev
sudo npm install -g yarn
# This fails on ppc64el, since fpm isn't available on that platform.
sudo gem install fpm -v 1.4
go run build.go build
yarn install
# Because we don't have fpm on ppc64el the following step fails
# horible on this architecture.
go run build.go pkg-deb latest
================================================
FILE: ci/credativDeutschlandServerCA-chain.pem
================================================
Subject: CN=credativ Root CA,O=credativ,C=DE
Issuer: CN=credativ Root CA,O=credativ,C=DE
-----BEGIN CERTIFICATE-----
MIIDWzCCAkOgAwIBAgIISCM+EhxtDiMwDQYJKoZIhvcNAQELBQAwOzEZMBcGA1UE
AwwQY3JlZGF0aXYgUm9vdCBDQTERMA8GA1UECgwIY3JlZGF0aXYxCzAJBgNVBAYT
AkRFMB4XDTE0MDgxODEwMDkyNVoXDTI0MDgxNTEwMDkyNVowOzEZMBcGA1UEAwwQ
Y3JlZGF0aXYgUm9vdCBDQTERMA8GA1UECgwIY3JlZGF0aXYxCzAJBgNVBAYTAkRF
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjdd8jPo/DZYagM0gCbjD
Qq6EBkHbeGbQPDQLoSt/M6xTP6CnHG3tBqG3gFRpjFAogn9eTGXFLvT+tGAvWHeY
GQqT7Jwn/Utezuskl9M87O+QVPwwQfDus2+L98b4cBzs24t+jPqMe8Ucs7AsFDFj
fHWRGh1a7lRvXwlcJzGT063MyC4awu8Ak7zxRI6h0/Six+h5v73OwOnW8jkkGNvS
RNxgy3nkGdsUyculMhdNHx8CZm5SGmjOlNX9jolvfyRfCUGSOs4/MwKlB/kTFZsy
YbEXhepa/58jf5XoU5vZoDUW7S3AcyW9luyH99vXokqDuUyjyHcBdCEawP+XNpBo
XwIDAQABo2MwYTAdBgNVHQ4EFgQUukB/2X0jBvlK6IqQNEc1dSOZsA4wDwYDVR0T
AQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6QH/ZfSMG+UroipA0RzV1I5mwDjAOBgNV
HQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggEBAAEdlbkVPMRyGDSJqGphq3aM
G9ksmuYUr64uoNydrnD64TT5mCmfNFYGXLYBIe0V5ZzgAUigoSipU0WUQFz0EKWX
o5WYa1RcnzGKsphieafekGBA4GnSrMIuxN29ZckOvT2gZMTpM9X381aY9Slm6TOP
a7XCobZDEZwBR4bmZZeJ8GOseWUHWK+Ddr+m38iUh0QqSMgfv5Iyzo0YrrFXl9FF
ORYDcdKSpMQcvKM+XVLNgLqGG+1DZEwDH2Lo87OHaQzmZfkfS2wFcTzVCLJW2z0T
cwgzRQQdEocD72c9QHm3+VYU56Kh5OtZWVVTVofssCBgwJlE0K9EdpKaJe3BEwE=
-----END CERTIFICATE-----
Subject: CN=credativ Deutschland Server CA,O=credativ,C=DE
Issuer: CN=credativ Root CA,O=credativ,C=DE
-----BEGIN CERTIFICATE-----
MIIDbDCCAlSgAwIBAgIIFgGTWLPv+rkwDQYJKoZIhvcNAQELBQAwOzEZMBcGA1UE
AwwQY3JlZGF0aXYgUm9vdCBDQTERMA8GA1UECgwIY3JlZGF0aXYxCzAJBgNVBAYT
AkRFMB4XDTE0MTEyNDE0NTEwM1oXDTI0MDgxNTEwMDkyNVowSTEnMCUGA1UEAwwe
Y3JlZGF0aXYgRGV1dHNjaGxhbmQgU2VydmVyIENBMREwDwYDVQQKDAhjcmVkYXRp
djELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCR
J/A2KvEBeoBR0cbb2sZadbzfg9+f/h7OozuW4/X6g1ciBKzC1eaU+eJnHjS3uZ2j
oVd2Q94icuRV+LesA1vlVNU6e/ZsOQg2HJIxEDBNK1lbsIVKm0hdMZsE/jD6Jmcj
v712331zu/33+PUXtbEgLBZS8rwQROgGwMV2Jmf/qamxiyhjqU805ONdafgypHKt
zYkdJ1yUnvBnWpYYZ4DKmQSwSFTgxtH3xctvD3v8uTmR/KUmYlQsRvt4wXSUY3dE
U+WiwBl1kepzvmh/fCGoVmrpCSJjp5+FD82Q6XbNzHHOJZ9P5+z34BUmvirDBmHP
5wZOkOYZKS2PCVjG9rv7AgMBAAGjZjBkMB0GA1UdDgQWBBSB3bLMhsu4ZBqT2r0w
p3oMcyuaGzASBgNVHRMBAf8ECDAGAQH/AgEAMB8GA1UdIwQYMBaAFLpAf9l9Iwb5
SuiKkDRHNXUjmbAOMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAQEA
c+AW1b36jXmCZu3npwxTACfY8M04Mg1NjI5pEK3nI9Tj74rkCOYY0HJ8I1X4f3SR
d0mrc6RXlU6jpFriBiGduU9GTMdeNkDNCHqbiuv56Saa8wosQmVTuXQk7XP7w2i3
p0nt7u1yJBIzny6tSQdSRgq/ryWlye1byX9SAiMEZGrasz/CnumZbuCP8rWN+PGw
zWZxd6ZVgZJoR0ZPGqhuT4aRLkSbyEUMbP9xL8wJ/gDhZTvamgGdNkLSAYpNzio+
DKntJkpqXncMMSBi0pwnhK8JbXFXTvU0Qf/WEAEE1bAWqlxPku4XezFrYbAFhm0D
f9YYoPUb3I1/K5+erEBADw==
-----END CERTIFICATE-----
================================================
FILE: ci/inventory
================================================
elephant-shed.dev.credativ.lan ansible_host=172.26.251.138 ansible_user=debian
================================================
FILE: ci/openstack_remove_instance_if_exists.sh
================================================
#!/usr/bin/env bash
# This script assumes that all OS_* variables are set and valid.
set -u
if [ $# -lt 1 ]; then
cat <<EOF 1>&2
Usage: $0 <instance>
Where <instance> could be either a machine name or UUID.
EOF
exit 1
fi
INSTANCE=$1
# Better save than sorry.
test -n $INSTANCE
if [ $? -ne 0 ]; then
echo "Instance variable is empty, not going any further." 1>&2
exit 2
fi
which openstack > /dev/null
if [ $? -ne 0 ]; then
echo "Could not find openstack client utilities." 1>&2
exit 3
fi
openstack server list | grep -q " $INSTANCE "
if [ $? -ne 0 ]; then
echo "Instance \"$INSTANCE\" does not exist, exiting."
exit 0
fi
# If we get here a instance with name / UUID $INSTANCE does exist.
openstack server delete "$INSTANCE"
if [ $? -ne 0 ]; then
echo "Something went wrong removing the instance \"$INSTANCE\"." 1>&2
exit 4
fi
echo "Instance \"$INSTANCE\" removed successfully."
================================================
FILE: ci/openstackrc.sh
================================================
#!/usr/bin/env bash
# NOTE: We get the passwort from gitlab-ci.
export OS_AUTH_URL=https://nova.credativ.com:5000/v2.0
export OS_TENANT_ID=27498e6ffaca49f7b57a14ef505e3098
export OS_TENANT_NAME="database"
unset OS_PROJECT_ID
unset OS_PROJECT_NAME
unset OS_USER_DOMAIN_NAME
export OS_USERNAME="app_dbteam"
export OS_REGION_NAME="regionOne"
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
# Use our own certificate
export OS_CACERT="$(dirname $0)/credativDeutschlandServerCA-chain.pem"
================================================
FILE: ci/rebuild.sh
================================================
#!/bin/bash
# This script prepares a rebuild of our debian package for testing purposes.
set -eu
DISTTAG="$1"
IS_RELEASE_BUILD="${2:-}" # leave empty for CI build
export DEBFULLNAME="credativ GmbH"
export DEBEMAIL="dbteam@credativ.com"
orig_version=$(dpkg-parsechangelog -S version)
if [ "$IS_RELEASE_BUILD" ]; then
new_version="${orig_version}~$DISTTAG+1"
else
date="$(date -u +%Y%m%d.%H%M%S)"
new_version="${orig_version}~$DISTTAG~${date}"
fi
dch --force-bad-version -v ${new_version} "Automatic CI rebuild"
dch -r "Build for $DISTTAG"
================================================
FILE: ci/setup-gitlab-runner
================================================
#!/usr/bin/ansible-playbook
---
- name: setup-gitlab-runner
hosts: all
become: true
tasks:
- name: Install apt-transport-https
apt:
name: apt-transport-https
install_recommends: false
- name: gitlab-runner repository key
apt_key:
url: https://packages.gitlab.com/runner/gitlab-ci-multi-runner/gpgkey
id: 14219A96E15E78F4
- name: gitlab-runner repository
apt_repository:
repo: "deb https://packages.gitlab.com/runner/gitlab-ci-multi-runner/debian/ stretch main"
filename: 'gitlab-runner'
- name: Install gitlab-ci-multi-runner
apt:
name: gitlab-ci-multi-runner
install_recommends: false
- name: Add gitlab-runner to sudo group
user:
name: gitlab-runner
groups: sudo
- name: allow sudo without password
lineinfile:
dest: /etc/sudoers
line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
regexp: '^%sudo'
================================================
FILE: cockpit/cockpit.conf
================================================
[WebService]
# Origin is hardcoded to localhost in apache config
Origins = https://localhost https://localhost:10090
================================================
FILE: cockpit/port.conf
================================================
[Socket]
ListenStream=
ListenStream=10090
================================================
FILE: debian/.gitignore
================================================
*.debhelper
debhelper-build-stamp
elephant-shed*.debhelper.log
elephant-shed*.substvars
elephant-shed*/
files
================================================
FILE: debian/changelog
================================================
elephant-shed (1.3.12) unstable; urgency=medium
* sql-exporter: add io/wal and primary/replica metrics.
* Grafana: add io/wal and role (primary/replica) panels.
* ansible: bump default Postgres version to 17.
-- Michael Banck <michael.banck@credativ.de> Wed, 21 Jan 2026 16:27:00 +0100
elephant-shed (1.3.11) unstable; urgency=medium
* node-exporter: listen on all interfaces.
* prometheus: make configuration extendable.
* {node,sql}-exporter: add host-specific scrape-targets.
* Dashboard: enable multi-host monitoring, overhaul system panels and ship
separate node overview dashboard.
-- Michael Banck <michael.banck@credativ.de> Wed, 29 Oct 2025 14:16:25 +0100
elephant-shed (1.3.10) unstable; urgency=medium
* Grafana: small improvements to dashboard.
* ansible: bump default Postgres version to 16.
-- Michael Banck <michael.banck@credativ.de> Wed, 25 Jun 2025 08:49:24 +0200
elephant-shed (1.3.9) unstable; urgency=medium
[ Michael Banck ]
* Overhaul Grafana dashboard.
* Add work-around to sql-exporter instant queries no longer being supported
upstream.
[ Nicolas Dandrimont ]
* Make sql-exporter only generate instant job if there are instant queries.
-- Michael Banck <michael.banck@credativ.de> Mon, 18 Nov 2024 17:06:10 +0100
elephant-shed (1.3.8) unstable; urgency=medium
* Fix sql-exporter queries on Debian 12 / Ubuntu 22.04.
* Fix elephant-shed-cockpit postinst.
* Add enable-backup and enable-powa-addons features to es_ctlcluster.
* Replaced shellinabox with Cockpit's terminal.
* Remove vendorized javascript libraries from portal.
-- Michael Banck <michael.banck@credativ.de> Wed, 28 Feb 2024 09:41:48 +0100
elephant-shed (1.3.7) unstable; urgency=medium
* Finish PoWA integration.
* Add es_ctlcluster script to enable PoWA in PG clusters.
-- Christoph Berg <myon@debian.org> Thu, 30 Jun 2022 16:58:35 +0200
elephant-shed (1.3.6) unstable; urgency=medium
[ Christoph Berg ]
* Add PoWA integration.
[ Michael Banck ]
* node-exporter: Remove obsolete --collector.netdev.ignored-devices option.
* Fix pg_stat_statements sql-exporter query.
-- Christoph Berg <myon@debian.org> Tue, 31 May 2022 12:29:23 +0200
elephant-shed (1.3.5) unstable; urgency=medium
* Generate dependency on tmate >= << 2.4 automatically.
* debian/clean: Remove build artifacts.
* Revert path activation for sql-exporter, doesn't work reliably.
* Restart sql-exporter when postgresql.service is started.
* Start omnidb-server once to initialize /var/lib/omnidb/.omnidb/.
-- Christoph Berg <myon@debian.org> Thu, 29 Jul 2021 15:10:20 +0200
elephant-shed (1.3.4) unstable; urgency=medium
* Move from pgadmin4 to OmniDB; pgadmin4 is no longer provided on
apt.postgresql.org.
* Grafana: Fix syntax in datasource provisioning yaml.
* Grafana: Display only the currently selected database(s) in the Freeze Age
panel.
* ansible: restart prometheus-sql-exporter after postgres cluster creation.
* ansible: skip sysctl, io scheduler an grub tasks in LXC containers.
* sql-exporter: Add final newline to queries.yml.
* Require tmate >= 2.4 since the hostkey syntax changed.
[ Nicolas Dandrimont ]
* Update pg_stat_statements SQL exporter query for Postgres 13
-- Christoph Berg <myon@debian.org> Mon, 01 Mar 2021 11:44:22 +0100
elephant-shed (1.3.3) unstable; urgency=medium
* Added limits to monitoring-queries.
* Fixed "Column 'usename' must be type text (string)".
-- Christoph Berg <myon@debian.org> Thu, 09 Jan 2020 14:23:31 +0100
elephant-shed (1.3.2) unstable; urgency=medium
* Grafana: Fix "WAL Senders"-panel.
* Build infrastructure updates.
-- Christoph Berg <myon@debian.org> Tue, 06 Aug 2019 15:38:38 +0200
elephant-shed (1.3.1) unstable; urgency=medium
* update-prometheus-sql-exporter-config: Support setting interval.
Patch by Nicolas Dandrimont, thanks!
* e-s-postgresql.postinst: Don't fail if logrotate file was removed.
* When building for packages.credativ.com, add dependency on
credativ-postgresql-keyring package.
-- Christoph Berg <myon@debian.org> Thu, 02 May 2019 16:00:09 +0200
elephant-shed (1.3) unstable; urgency=medium
* Start prometheus-sql-exporter-restart.timer on package installation.
* Node exporter 0.16 renames many variables, update dashboard.
* elephant-shed-postgresql: Stop installing custom logrotate file.
* postgresql: Don't set waldir and data checksums by default.
* portal: Use AuthExternal pwauth instead of the buggy authnz-pam module.
* portal: Use HTTP_HOST instead of SSL_TLS_SNI in cockpit's CSP header.
-- Christoph Berg <christoph.berg@credativ.de> Fri, 07 Dec 2018 16:39:19 +0100
elephant-shed (1.2) unstable; urgency=medium
* This release bundles a series of breaking changes:
+ Upgrade to grafana 5 and prometheus 2. (Existing monitoring data is not
migrated.)
+ Upgrade to prometheus-node-exporter 0.15.
+ Rewrite update-prometheus-sql-exporter-config using PgCommon.pm, and
refactor its config file handling.
* prometheus: Use 'localhost' as job_name to bundle this machine's node and
sql exporter results. 'sql_job' contains the postgresql-common cluster
name now.
* The grafana dashboard has been updated to use rate() instead of increase()
in most panels to show values per second or minute.
-- Christoph Berg <christoph.berg@credativ.de> Fri, 18 May 2018 17:06:21 +0200
elephant-shed (1.1.1) unstable; urgency=medium
[ Adrian Vondendriesch ]
* Split prometheus exporters into own packages.
[ Alexander Sosna ]
* Change docs build process to sphinx
* grafana: Fix "Dead Tuples"
* grafana: Fix "Locks"
* grafana: Change limits for "Next Freeze"
* grafana: Add tool tips
-- Adrian Vondendriesch <adrian.vondendriesch@credativ.de> Thu, 25 Jan 2018 17:00:25 +0100
elephant-shed (1.0) unstable; urgency=medium
[ Christoph Berg ]
* cockpit: Add cockpit-packagekit to Recommends.
[ Adrian Vondendriesch ]
* prometheus: Add sudo to dependencies.
* portal: replace the way we show backups.
* portal: rework UI, introduce bootstrap.
[ Alexander Sosna ]
* grafana: Fix for queries for Prometheus 2.0
* portal: Use new Icons
[ Caique de Castro ]
* portal: Fix link to Grafana
-- Adrian Vondendriesch <adrian.vondendriesch@credativ.de> Mon, 16 Oct 2017 18:54:10 +0200
elephant-shed (0.9) unstable; urgency=medium
* Team upload.
* Initial release.
-- Adrian Vondendriesch <adrian.vondendriesch@credativ.de> Mon, 16 Oct 2017 17:38:41 +0200
================================================
FILE: debian/clean
================================================
ci/fact_cache/
ci/*.retry
doc/_build/
rpm/BUILD/
rpm/BUILDROOT/
rpm/RPMS/
rpm/SOURCES/
rpm/SPECS/
rpm/SRPMS/
vagrant/fact_cache/
vagrant/*.retry
vagrant/openstack/fact_cache/
vagrant/.vagrant/
================================================
FILE: debian/compat
================================================
10
================================================
FILE: debian/control
================================================
Source: elephant-shed
Section: database
Priority: optional
Maintainer: credativ GmbH <info@credativ.de>
Uploaders:
Michael Banck <michael.banck@credativ.de>,
Adrian Vondendriesch <adrian.vondendriesch@credativ.de>,
Standards-Version: 4.1.1
Build-Depends:
debhelper (>= 10~),
python3-recommonmark,
python3-sphinx-rtd-theme,
python3-sphinx,
sphinx-common,
tmate,
Package: elephant-shed
Architecture: all
Depends:
elephant-shed-cockpit,
elephant-shed-grafana,
elephant-shed-omnidb <!stretch>,
elephant-shed-pgbackrest,
elephant-shed-pgbadger,
elephant-shed-portal,
elephant-shed-postgresql,
elephant-shed-powa,
elephant-shed-prometheus,
elephant-shed-prometheus-node-exporter,
elephant-shed-prometheus-sql-exporter,
elephant-shed-tmate,
${keyring:Depends},
${misc:Depends},
Description: PostgreSQL dashboard
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This meta package depends on all Elephant Shed components.
Package: elephant-shed-portal
Architecture: all
Depends:
adduser,
apache2,
libapache2-mod-authnz-external,
libapache2-mod-authz-unixgroup,
libapache2-mod-wsgi-py3 <!stretch>,
libjs-jquery,
libjs-bootstrap,
libjs-popper.js,
libtemplate-perl,
libcgi-pm-perl,
pwauth,
${misc:Depends},
Description: PostgreSQL dashboard -- web interface
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the web interface.
Package: elephant-shed-postgresql
Architecture: all
Depends:
adduser,
postgresql-common (>> 183~),
${misc:Depends},
Description: PostgreSQL dashboard -- PostgreSQL integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with PostgreSQL.
Package: elephant-shed-omnidb
Architecture: all
Build-Profiles: <!stretch>
Depends:
omnidb-server,
${misc:Depends},
Description: PostgreSQL dashboard -- OmniDB integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This meta package provides the integration with OmniDB.
Package: elephant-shed-pgbadger
Architecture: all
Depends:
pgbadger (>> 9),
postgresql-common,
${misc:Depends},
Description: PostgreSQL dashboard -- pgBadger integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with pgBadger.
Package: elephant-shed-pgbackrest
Architecture: all
Depends:
pgbackrest,
postgresql-common,
${misc:Depends},
Description: PostgreSQL dashboard -- pgBackRest integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with pgBackRest.
Package: elephant-shed-grafana
Architecture: all
Depends:
curl,
grafana (>> 5),
${misc:Depends},
Description: PostgreSQL dashboard -- Grafana integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with Grafana.
Package: elephant-shed-powa
Architecture: all
Depends:
powa-web,
postgresql-common,
${misc:Depends},
Description: PostgreSQL dashboard -- PoWA integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with PoWA.
Package: elephant-shed-prometheus
Architecture: all
Depends:
prometheus (>= 2.0),
${misc:Depends},
Description: PostgreSQL dashboard -- Prometheus integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with Prometheus.
Package: elephant-shed-prometheus-node-exporter
Architecture: all
Depends:
prometheus-node-exporter (>= 0.16.0),
${misc:Depends},
Breaks: elephant-shed-prometheus (<< 1.1)
Replaces: elephant-shed-prometheus (<< 1.1)
Description: PostgreSQL dashboard -- Node exporter integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with the Prometheus node
exporter.
Package: elephant-shed-prometheus-sql-exporter
Architecture: all
Depends:
libyaml-perl,
postgresql-common,
prometheus-sql-exporter,
${misc:Depends},
Breaks: elephant-shed-prometheus (<< 1.1)
Replaces: elephant-shed-prometheus (<< 1.1)
Description: PostgreSQL dashboard -- SQL exporter integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with the Prometheus SQL
exporter.
Package: elephant-shed-cockpit
Architecture: all
Depends:
cockpit,
${misc:Depends},
Recommends:
cockpit-packagekit,
Description: PostgreSQL dashboard -- cockpit integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with cockpit.
Package: elephant-shed-shellinabox
Architecture: all
Depends:
shellinabox,
${misc:Depends},
Description: PostgreSQL dashboard -- shellinabox integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This meta package provides the integration with shellinabox.
Package: elephant-shed-tmate
Architecture: all
Depends:
tmate ${tmate:Depends},
${misc:Depends},
Description: PostgreSQL dashboard -- tmate integration
The Elephant Shed is a web-based PostgreSQL management front-end.
.
This package provides the integration with tmate.
================================================
FILE: debian/copyright
================================================
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
Copyright: (c) 2017-2019 credativ GmbH <info@credativ.de>
License: GPL-3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
On Debian systems, the complete text of the GNU General Public License
can be found in `/usr/share/common-licenses/GPL-3'.
================================================
FILE: debian/elephant-shed-cockpit.install
================================================
cockpit/cockpit.conf etc/cockpit
cockpit/port.conf etc/systemd/system/cockpit.socket.d
================================================
FILE: debian/elephant-shed-cockpit.postinst
================================================
#!/bin/sh
set -e
case $1 in
configure)
systemctl daemon-reload
# not restarting cockpit here, it is socket-activated
if [ -z "$2" ]; then
/usr/lib/cockpit/cockpit-certificate-ensure
fi
systemctl restart cockpit.socket
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-grafana.install
================================================
grafana/datasource_prometheus.yml etc/grafana/provisioning/datasources
grafana/elephant-shed-grafana etc/default
grafana/elephant-shed-grafana.conf etc/systemd/system/grafana-server.service.d
grafana/elephant-shed-grafana.ini etc/grafana
grafana/postgresql_server_overview.json usr/share/elephant-shed/grafana
grafana/postgresql_server_overview.yml etc/grafana/provisioning/dashboards
grafana/node_overview.json usr/share/elephant-shed/grafana
grafana/node_overview.yml etc/grafana/provisioning/dashboards
================================================
FILE: debian/elephant-shed-grafana.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
# we depend on grafana and it has to be enabled
# lintian wants us to use "deb-systemd-helper enable" instead, but that
# doesn't work with grafana-server.service being located in /usr/systemd/system
systemctl enable grafana-server
invoke-rc.d grafana-server restart
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-omnidb.install
================================================
omnidb/wsgi.py /usr/share/elephant-shed/omnidb
================================================
FILE: debian/elephant-shed-omnidb.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
echo Starting omnidb-server once to initialize /var/lib/omnidb/.omnidb/omnidb-server/ ...
systemctl start omnidb-server
sleep 5
systemctl stop omnidb-server
systemctl disable omnidb-server
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-pgbackrest.install
================================================
pgbackrest/pgbackrest-run usr/share/elephant-shed
pgbackrest/pgbackrest-toggle-archiving usr/share/elephant-shed
pgbackrest/pgbackrest-archivecommand usr/share/elephant-shed
pgbackrest/pgbackrest@.service lib/systemd/system
pgbackrest/pgbackrest-incr@.service lib/systemd/system
pgbackrest/pgbackrest-toggle-archiving@.service lib/systemd/system
pgbackrest/pgbackrest@.timer lib/systemd/system
pgbackrest/pgbackrest-incr@.timer lib/systemd/system
================================================
FILE: debian/elephant-shed-pgbackrest.postinst
================================================
#!/bin/sh
set -eu
BACKUPDIR="/var/lib/pgbackrest"
case $1 in
configure)
if ! test -e /etc/pgbackrest.conf; then
cat > /etc/pgbackrest.conf <<-EOF
[global]
repo-path=$BACKUPDIR
retention-full=3
EOF
fi
if ! test -d /var/www/html/pgbackrest; then
mkdir -p /var/www/html/pgbackrest
chown postgres:postgres /var/www/html/pgbackrest
fi
if ! test -d $BACKUPDIR; then
mkdir -p $BACKUPDIR
chown postgres:postgres $BACKUPDIR
fi
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-pgbadger.dirs
================================================
var/lib/pgbadger
================================================
FILE: debian/elephant-shed-pgbadger.install
================================================
pgbadger/pgbadger-generator lib/systemd/system-generators
pgbadger/pgbadger-run usr/share/elephant-shed
pgbadger/pgbadger.service lib/systemd/system
pgbadger/pgbadger.timer lib/systemd/system
pgbadger/pgbadger@.service lib/systemd/system
================================================
FILE: debian/elephant-shed-pgbadger.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
if test -d /var/lib/pgbadger; then
chown postgres:postgres /var/lib/pgbadger
fi
;;
purge)
rm -rf /var/lib/pgbadger
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-portal.install
================================================
doc/_build/html usr/share/elephant-shed/doc
portal/cgi-bin usr/lib
portal/elephant-shed.conf etc/apache2/sites-available
portal/image usr/share/elephant-shed
portal/template usr/share/elephant-shed
portal/static usr/share/elephant-shed
================================================
FILE: debian/elephant-shed-portal.lintian-overrides
================================================
elephant-shed-portal: extra-license-file usr/share/doc/elephant-shed-portal/html/_sources/chapter/license.md.txt
================================================
FILE: debian/elephant-shed-portal.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
# create elephant-shed group
addgroup --system elephant-shed
# enable apache modules
for module in xml2enc proxy proxy_http proxy_html proxy_connect proxy_wstunnel rewrite deflate headers ssl cgid substitute; do
a2enmod --maintmode $module
done
# enable site
a2dissite 000-default
a2ensite elephant-shed
# restart apache
invoke-rc.d apache2 restart
;;
remove)
# disable site
a2dissite elephant-shed
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-postgresql.install
================================================
postgresql/elephant-shed.conf etc/postgresql-common/createcluster.d
postgresql/es_ctlcluster usr/bin
postgresql/rsyslog-postgresql-discard.conf etc/rsyslog.d/postgresql-discard.conf
================================================
FILE: debian/elephant-shed-postgresql.postinst
================================================
#!/bin/sh
set -e
case $1 in
configure)
# make sure postgres is in the shadow group
if ! id -Gn postgres | grep -qw shadow; then
adduser $quiet postgres shadow
invoke-rc.d postgresql restart
fi
# We deploy a rsyslog rule.
invoke-rc.d rsyslog restart
# Remove old config file diversion
if dpkg --compare-versions "$2" lt-nl "1.2.1"; then
SHA1SUM="$(sha1sum /etc/logrotate.d/postgresql-common 2> /dev/null || :)"
if [ "${SHA1SUM%% *}" = "6c4c0af32cf873a7050650d0ac85403410714ae7" ]; then
rm -fv /etc/logrotate.d/postgresql-common
fi
dpkg-divert --package elephant-shed-postgresql --rename \
--divert /etc/logrotate.d/postgresql-common.real.disabled \
--remove /etc/logrotate.d/postgresql-common
fi
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-powa.install
================================================
powa/update-powa-web-config usr/bin
================================================
FILE: debian/elephant-shed-powa.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
update-powa-web-config
systemctl restart powa-web
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-prometheus-node-exporter.install
================================================
node-exporter/elephant-shed-prometheus-node-exporter etc/default
node-exporter/elephant-shed-prometheus-node-exporter.conf etc/systemd/system/prometheus-node-exporter.service.d
================================================
FILE: debian/elephant-shed-prometheus-node-exporter.mainscript
================================================
mv_conffile /etc/default/elephant-shed-prometheus-node-exporter /etc/default/elephant-shed-prometheus-node-exporter 1.1~ elephant-shed-prometheus
mv_conffile /etc/systemd/system/prometheus-node-exporter.service.d/elephant-shed-prometheus-node-exporter.conf /etc/systemd/system/prometheus-node-exporter.service.d/elephant-shed-prometheus-node-exporter.conf 1.1~ elephant-shed-prometheus
================================================
FILE: debian/elephant-shed-prometheus-node-exporter.postinst
================================================
#!/bin/sh
set -e
HOSTNAME=`hostname -f`
case $1 in
configure)
systemctl daemon-reload
deb-systemd-helper enable prometheus-node-exporter.service
deb-systemd-invoke restart prometheus-node-exporter
if [ ! -e /etc/prometheus/node_exporter/$HOSTNAME.yml ]; then
mkdir -p /etc/prometheus/node_exporter
echo "- targets:" > /etc/prometheus/node_exporter/$HOSTNAME.yml
echo " - $HOSTNAME:9100" >> /etc/prometheus/node_exporter/$HOSTNAME.yml
fi
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-prometheus-sql-exporter.install
================================================
sql-exporter/elephant-shed.conf lib/systemd/system/prometheus-sql-exporter.service.d
sql-exporter/prometheus-sql-exporter-restart.service lib/systemd/system
sql-exporter/prometheus-sql-exporter-restart.timer lib/systemd/system
sql-exporter/update-prometheus-sql-exporter-config usr/bin
sql-exporter/*.yml etc/prometheus-sql-exporter
================================================
FILE: debian/elephant-shed-prometheus-sql-exporter.lintian-overrides
================================================
# use systemctl directly because deb-systemd-invoke doesn't like static units
elephant-shed-prometheus-sql-exporter: maintainer-script-calls-systemctl
================================================
FILE: debian/elephant-shed-prometheus-sql-exporter.maintscript
================================================
mv_conffile /etc/prometheus-sql-exporter.yml.in /etc/prometheus-sql-exporter.yml.in 1.1~ elephant-shed-prometheus
================================================
FILE: debian/elephant-shed-prometheus-sql-exporter.postinst
================================================
#!/bin/sh
set -e
HOSTNAME=$(hostname -f)
case $1 in
configure)
systemctl daemon-reload
systemctl enable prometheus-sql-exporter.service
systemctl restart prometheus-sql-exporter.service
systemctl enable prometheus-sql-exporter-restart.timer
systemctl start prometheus-sql-exporter-restart.timer
if [ ! -e /etc/prometheus/sql_exporter/$HOSTNAME.yml ]; then
mkdir -p /etc/prometheus/sql_exporter
echo "- targets:" > /etc/prometheus/sql_exporter/$HOSTNAME.yml
echo " - $HOSTNAME:9237" >> /etc/prometheus/sql_exporter/$HOSTNAME.yml
fi
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-prometheus-sql-exporter.postrm
================================================
#!/bin/sh
set -e
case $1 in
purge)
rm -f /var/run/postgresql/prometheus-sql-exporter.yml
# old file location
rm -f /etc/prometheus-sql-exporter.yml
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-prometheus.install
================================================
prometheus/elephant-shed-prometheus etc/default
prometheus/elephant-shed-prometheus.conf etc/systemd/system/prometheus.service.d
prometheus/elephant-shed-prometheus.yml etc/prometheus
================================================
FILE: debian/elephant-shed-prometheus.postinst
================================================
#!/bin/sh
set -e
case $1 in
configure)
systemctl daemon-reload
deb-systemd-helper enable prometheus.service
deb-systemd-invoke restart prometheus
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-shellinabox.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
if ! grep -q '^SHELLINABOX_ARGS.*--localhost-only' /etc/default/shellinabox; then
sed -i -e 's/^SHELLINABOX_ARGS.*/SHELLINABOX_ARGS="--no-beep --localhost-only"/' /etc/default/shellinabox
invoke-rc.d shellinabox restart
fi
;;
esac
#DEBHELPER#
================================================
FILE: debian/elephant-shed-tmate.install
================================================
tmate/tmate.conf etc
================================================
FILE: debian/elephant-shed-tmate.lintian-overrides
================================================
# symlinks in /etc/skel are copied over to home directories, so must be absolute
elephant-shed-tmate: symlink-should-be-relative etc/skel/.tmate.conf /etc/tmate.conf
================================================
FILE: debian/elephant-shed-tmate.postinst
================================================
#!/bin/sh
set -eu
case $1 in
configure)
if ! test -e /root/.tmate.conf; then
ln -s /etc/tmate.conf /root/.tmate.conf
fi
;;
esac
#DEBHELPER#
================================================
FILE: debian/rules
================================================
#!/usr/bin/make -f
TMATE_VERSION = $(shell dpkg-query --showformat '$${Version}' --show tmate)
TMATE_24 = $(shell dpkg --compare-versions $(TMATE_VERSION) ge 2.4 && echo yes)
ifeq ($(TMATE_24),yes)
TMATE_DEPENDS = (>= 2.4)
else
TMATE_DEPENDS = (<< 2.4)
endif
# when building for packages.credativ.com (from ci/rebuild.sh), add dependency on credativ-postgresql-keyring
ifneq ($(findstring deb, $(shell dpkg-parsechangelog -SVersion))$(findstring ubuntu, $(shell dpkg-parsechangelog -SVersion)),)
CREDATIV_KEYRING=-Vkeyring:Depends=credativ-postgresql-keyring
endif
%:
dh $@ --with=systemd
override_dh_install:
dh_install
ifneq ($(TMATE_24),yes)
sed -i -e 's/^\(set.*fingerprint.*\)/##\1/' debian/elephant-shed-tmate/etc/tmate.conf
sed -i -e 's/^#\(set.*fingerprint.*\)/\1/' debian/elephant-shed-tmate/etc/tmate.conf
endif
ifneq ($(filter stretch,$(DEB_BUILD_PROFILES)),)
sed -i -e '/WSGI/d' debian/elephant-shed-portal/etc/apache2/sites-available/elephant-shed.conf
endif
override_dh_link:
mkdir -p debian/elephant-shed-tmate/etc/skel
ln -s /etc/tmate.conf debian/elephant-shed-tmate/etc/skel/.tmate.conf
dh_link -X'tmate.conf' # don't fix /etc/skel link
override_dh_gencontrol:
dh_gencontrol -- -Vtmate:Depends='$(TMATE_DEPENDS)' $(CREDATIV_KEYRING)
================================================
FILE: debian/source/format
================================================
3.0 (native)
================================================
FILE: doc/.gitignore
================================================
_build
================================================
FILE: doc/Makefile
================================================
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " epub3 to make an epub3"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/elephant-shed.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/elephant-shed.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/elephant-shed"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/elephant-shed"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
epub3:
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: dummy
dummy:
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."
================================================
FILE: doc/chapter/components.md
================================================
# Components
## PostgreSQL
The Elephant Shed is based on `postgresql-common`, the default PostgreSQL
management system for Debian based installations. Tasks like creating, dropping
or renaming a PostgreSQL instance ("cluster" in PostgreSQL terms) should be
done through `postgresql-common`'s command line utilities `pg_createcluster`,
`pg_dropcluster` and `pg_renamecluster`.
### Default Configuration
Beside the postgresql-common default configuration the
`elephant-shed-postgresql` package adds additional parameters for the cluster
creation process. Some of these parameters are required by the
Elephant Shed components. E.g. pgBadger requires some special
`log_line_prefix`. You can find this configuration under
`/etc/postgresql-common/createcluster.d/elephant-shed.conf`. Be
careful when changing any of these values.
### Cluster Administration
To create a new cluster issue the command `pg_createcluster <version> <name>`.
Installed clusters and their status can be listed via
`pg_lsclusters`.
```
postgres@stretch:~$ pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
9.6 main 5432 online postgres /9.6/main /log/9.6-main.log
9.6 standby1 5433 online,recovery postgres /9.6/standby1 /log/9.6-standby1.log
9.6 standby2 5434 online,recovery postgres /9.6/standby2 /log/9.6-standby2.log
9.6 test 5435 online postgres /9.6/test /log/9.6-test.log
```
To delete a cluster use `pg_dropcluster <version>
<name>` (be careful, this removes all data in the cluster as well!).
To start, stop, restart or reload use `pg_ctlcluster <action> <version>
<name>` with the following commands as action:
- `start`
- `stop`
- `restart`
- `reload`
Alternatively, you can use systemctl (`systemctl <action>
postgresql@<version>-<name>`) or the Cockpit web interface.

*Note:* Future versions of The Elephant Shed will include cluster management in the [portal](#portal).
## Portal
The portal serves as an entry point to all other web-based
interfaces. It uses HTTPS and basic authentication. Each user
within the Unix group `elephant-shed` has access to it (see [Users](#users)).
The portal also shows the status of all
PostgreSQL cluster including links to the Cockpit service (in order to start or
stop the cluster), the log files, pgBadger reports and the backup software pgBackRest.
A navigation bar at the top allows switching between the different web
services.
By default only a self signed certificate for HTTPS is deployed. A
corresponding security warning is shown in most browsers. You can change the
certificate with a signed one (e.g. from your company CA, or from [Let’s Encrypt](https://letsencrypt.org/)).
The web services are served by Apache2. It also acts as a reverse proxy to serve all other web interfaces and to enforce authentication.
### PostgreSQL Cluster

This section presents an overview of the existing PostgreSQL clusters and their status.
For each cluster, a set of switches shows the current status.
By clicking on a cluster an additional menu with buttons opens.
Currently all buttons link to the corresponding components where a confirmation is required so no actions are triggered directly, but this may change in the future.
### systemd - Service
This links to the configuration of this PostgreSQL cluster in Cockpit.
Here it is possible to configure the corresponding service to be enabled or disabled on system start and also trigger actions like start, stop and reload.
### systemd - Log
Links to the corresponding log entries in Cockpit if syslog is enabled for this cluster (which is the default for clusters created by Elephant Shed).
### Report - Run
By default pgBadger reports for all clusters are generated once every night.
With this service it is possible to generate a report for a specific cluster on demand.
### Report - Show
Links to the corresponding pgBadger report overview.
See [pgBadger](#reporting-pgbadger) for more information.
### Backup
This sections provides several functions for backups using pgBackRest.
For more information about the backup tool pgBackRest visit [pgBackRest](#backup-pgbackrest).
#### Full
Link to Cockpit for starting an ad-hoc full backup.
#### Incremental
Link to Cockpit for staring an ad-hoc incremental backup.
#### Info
Shows the status of the backups. This button is only shown after the first backup run.
Here the available backups and the content of the WAL archive is shown.
Additional information can be found here: <http://www.pgbackrest.org/user-guide.html#quickstart/backup-info>
### Switches
#### Archiving
This switch shows if an archive command is set that uses pgBackRest.
It is possible to set one or to deactivate the feature by using '/bin/true'.
Archiving is needed for point in time recovery but more importantly for pgBackRest backups.
Archiving will be activated automatic if a backup is triggered via the portal or timers.
To change it manually the service `pgbackrest-toggle-archiving@<version>-<name>.service` can be started.
This toggles the state.
#### Full Backup
Switch to enable or disable a periodical backup.
An enabled backup job (systemd timer) is shown by green color.
To start/stop the timer `pgbackrest@<version>-<name>.timer` needs to be started or stopped.
Enable/disable is used to enable/disable the timer after the next reboot.
#### Incr Backup
Switch to enable or disable a periodical backup.
An enabled backup job (systemd timer) is shown by green color.
To start/stop the timer `pgbackrest-incr@<version>-<name>.timer` needs to be started or stopped.
Enable/disable is used to enable/disable the timer after the next reboot.
## Service Web Interface - Cockpit
Cockpit allows remote management of all systemd related services via
HTTPS. It makes starting, stopping or restarting of services as simple as
clicking a button. It also shows system logs in real-time.

## Monitoring - Prometheus
Prometheus is a metric based monitoring system for servers and services.
It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.


### Services
In this setup the Prometheus stack consists of different components controlled by systemd.
The following units are deployed.
#### prometheus.service
Monitoring system and time series database - This is the monitoring service itself. It actively pulls the metrics from the different sources.
It also provides internal metrics and a web interface which is accessible via the portal.
Configuration files:
* `/etc/prometheus/elephant-shed-prometheus.yml`
* `/etc/default/elephant-shed-prometheus`
#### prometheus-node-exporter.service
Prometheus exporter for machine metrics - This service exports the system metrics and listens on port 9100.
These metrics are collected every 30 seconds by default.
Configuration files:
* `/etc/default/elephant-shed-prometheus-node-exporter`
#### prometheus-sql-exporter.service
Prometheus exporter for SQL metrics - This service collects the PostgreSQL specific metrics and listens on port 9237.
The metrics are retrieved by querying the database.
In order to not to generate additional load the metrics are collected only every 60 seconds.
**WARNING: It is not advisable to set the monitoring interval for the `prometheus-sql-exporter` lower than 60 Seconds.
This could interference with normal applications and has a high impact on the PostgreSQL cluster.**
The `prometheus-sql-exporter.service` starts one connection to each database on startup and keeps this connection open.
At the beginning of each connection the `prometheus-sql-exporter.service` checks if the extension `pg_stat_statements` is present.
If not, the service issues the statement `CREATE EXTENSION pg_stat_statements`.
Configuration files:
* `/etc/prometheus-sql-exporter.yml`
#### update-prometheus-sql-exporter-config.timer
This timer triggers the `update-prometheus-sql-exporter-config.service` periodically which generates a new configuration for the `prometheus-sql-exporter` every 10 minutes.
This makes sure that every new database cluster and every new database is included in the monitoring automatically.
It's possible to call the update-prometheus-sql-exporter-config.service manually to generate a new configuration directly.
Configuration template file:
* `prometheus-sql-exporter.yml.in`
Configuration file (runtime):
* `prometheus-sql-exporter.yml`
### Additional Resources
* <https://prometheus.io/docs/introduction/overview/>
* <https://github.com/prometheus/prometheus>
## Dashboard - Grafana
Grafana is a tool to create graphs and dashboards from a variety of different data sources.
A PostgreSQL Server Overview dashboards is included in the default installation
to get an overview over the most needed and many helpful metrics to manage and
debug PostgreSQL servers.
These pre-deployed dashboards are shipped via the `elephant-shed-graphana` Debian package and can change in the future.
They are read only and need to be saved under a new name if you do any changes.
### PostgreSQL Server Overview

This dashboard starts with a summary section with simple gauges to provide a overview of the whole system.
These gauges may indicate current problems or give a hint on problems that might occur in the future.
After the gauges in-depth metrics are shown as graphs.
### Server metrics
Server metrics include e.g.: CPU usage (by type / by core), disk usage, disk utilization, network throughput, and much more.
The following template filter are configured:
- `Disk`: filter one or more disks
- `Interface`: filter on or more interface
- `Filesystem`: filter on or more filesystem / mountpoint
### Cluster metrics
The next section contains PostgreSQL Cluster wide metrics like connections (by type / by database), number of transactions, database growth and more.
Only one cluster is shown by a time. To switch the current shown cluster use the template filter `PostgreSQL Cluster`.
### Database metrics
Database level metrics are shown at the end of *PostgreSQL Overview* dashboard.
By default metrics for all databases of the current selected PostgreSQL cluster are shown.
To filter one or more databases the template filter `Database` could be used.
### Additional Resources
* <http://docs.grafana.org/>
* <https://github.com/grafana/grafana>
## DBA Tool - OmniDB

OmniDB is a management tool for PostgreSQL to help DBAs execute many different tasks.
It provides user management, DDL functionality, an interactive SQL shell, and more.
### Additional Resources
* <https://omnidb.org/>
## PoWA - PostgreSQL Workload Analyzer
The Elephant Shed includes integration with PoWA, a service that collects
database metrics, most notably about running queries. There is some overlap
with Prometheus and Grafana, but the PoWA statistics are much more detailed on
the database level.
### Setup
The PoWA web interface maintains a list of known clusters in the system in
`/etc/powa-web.conf`. To update that list, use:
```
update-powa-web-config
```
To enable PoWA monitoring for a cluster, run `es_ctlcluster`:
```
es_ctlcluster <postgresql_version> main enable-powa
```
In case of problems, the web interface will throw "Auth failed" errors for a
wide range of possible errors. Consulting the PostgreSQL server log in
`/var/log/postgresql/postgresql-NN-main.log` is often a good place to start
debugging.
## Backup - pgBackRest
The Elephant Shed comes with a preinstalled backup solution, *pgBackRest*.
Each PostgreSQL instance can be backed up individually by issuing the command `systemctl start pgbackrest@<version>-<name>` or initiating a backup via Cockpit in the web interface.
A shortcut is listed for each instance.
Configuration entries for each cluster are created with the first
backup run. By default only `db-path` and `db-port` are set.
A list of all backups can be obtained by clicking on the pgBackRest
icon on the portal site.

pgBackRest knows 3 types of backups full, incremental and differential.
We are using full and differential by default.
A service file for differential backups is not installed by default.
### Full Backup
Full backups represent an complete backup of the database at a given point in time.
A backup consists of two parts, the backup itself, stored in `backup` and the WAL files which were written during the backup, stored in `archive`.
To ensure these WAL files are in the archive we automatically enable WAL archiving before the first backup is created.
**Warning**: If archiving is enabled all WAL files newer than the oldest stored backups are kept as well.
This can consume a lot space in the backup location if backups are kept for a long time and archiving is not disabled.
By deleting a backup the no longer needed WAL files are removed as well.
### Incremental Backups
Incremental backups represent the changed data between a previous full backup and the current data at a given point.
Incremental backups can be significant smaller than full backups but depend on a specific previous full backup.
Without this full backup they can not be restored.
### Retention
To clean up space old backups needs to be deleted.
pgBackRest needs to know how many full backups to keep.
If the number is reached all additional backups will be deleted starting with the oldest.
If a full backup is deleted all incremental backups depending on it will be deleted as well.
This is necessary because an incremental backup can not be restored without the matching full backup.
### Configuration
The configuration file can be found in `/etc/pgbackrest.conf`.
```
[global]
repo-path=/var/lib/pgbackrest
[9.6-main]
db-path=/var/lib/postgresql/9.6/main
db-port=5432
[9.6-test]
db-port=5433
db-path=/var/lib/postgresql/9.6/test
```
The global part sets the default configuration for every existing and future database cluster.
For each single cluster theses defaults can be changed.
Some basic options will be explained here.
Please see the documentation for a full overview.
If the server is setup using ansible, additionally the following `[global]` parameters are set:
```
[global]
retention-full=4
compress-level=6
spool-path=/mnt/backup/pgbackrest_spool
archive-async=y
archive-queue-max=1099511627776
repo-path=/mnt/backup/pgbackrest
...
```
#### retention-full
This option defines how many full backups should be kept.
**Danger: If more full backups are stored than `retention-full` pgBackRest will delete the oldest backups to keep exactly `retention-full` full backups!**
#### compress-level
The gzip compression level to use (6 is the default value).
#### archive-async
Enables asynchronous archiving of WAL files which allows a higher archiving throughput.
#### spool-path
Where to keep additional information for asynchronous archiving (status directory).
#### archive-queue-max
How many WAL segments to keep before throwing segments away.
*Note: We configure a value of 1TB to ensure pgbackrest never throws WAL segments away by default*
#### repo-path
This sets the main directory where backups and WAL files are stored in.
It can be set to any desired mount point so backups to remote servers are easily possible.
### Backup
For each cluster there is a systemd service which does a full or incremental backup.
* pgbackrest@\<version\>-\<name\>
* pgbackrest-incr@\<version\>-\<name\>
To create an ad-hoc backup the corresponding service can be started.
`systemctl start pgbackrest@9.6-main` would create a full backup of the cluster `9.6-main`.
If no previous full backup is available `pgbackrest-incr@` will also create a full backup.
### Automation
To automate the creation of backups and the retention policy enforcing there are two systemd timers per cluster.
* pgbackrest@<version>-<name>.timer
* pgbackrest-incr@<version>-<name>.timer
`pgbackrest@<version>-<name>.timer` triggers full backups and `pgbackrest-incr@<version>-<name>.timer` triggers incremental backups.
These timers are created for every cluster and are initialized with a default timing.
The timers can be enabled independently for every database cluster either via systemd or the web portal.
To fully enable a timed backup the `timer` must be *started* **and** *enabled*.
If the `timer` is *started* but not *enabled* systemd will not start it after the next reboot.
Keep in mind that enabling only the incremental backup is only reasonable for shorter periods of time, special scenarios like not changing databases, or if the full backups are triggered in another way.
To keep storage and restore time at an reasonable level periodic full backups are needed.
#### pgbackrest@.timer
```
# /lib/systemd/system/pgbackrest@.timer
[Unit]
Description=Automated pgBackRest full backup of PostgreSQL cluster %i
[Timer]
OnCalendar=Sun *-*-* 01:00:00
RandomizedDelaySec=2h
[Install]
WantedBy=multi-user.target
```
This timer triggers a full backup every Sunday in the early morning 01:00 or randomly up to 2 hours later.
The random delay set by `RandomizedDelaySec=2h` is set so systemd can schedule many timers over a given time range.
Here it is done so that not all backups for all clusters start at the same time blocking the I/O.
#### pgbackrest-incr@.timer
```
# /lib/systemd/system/pgbackrest-incr@.timer
[Unit]
Description=Automated pgBackRest incremental backup of PostgreSQL cluster %i
[Timer]
OnCalendar=Tue,Thu *-*-* 01:00:00
RandomizedDelaySec=2h
[Install]
WantedBy=multi-user.target
```
This timer triggers an incremental backup every Tuesday and Thursday in the early morning 01:00 or randomly up to 2 hours later.
#### WAL Archiving
WAL archiving is disabled by default for new PostgreSQL clusters.
It can be activated using the portal (see [portal](#portal)) or by starting `pgbackrest-toggle-archving.service`.
The service toggles archiving mode to on or off, depending on the former state.
*Note:* If archiving is disabled and a full or incremental backup is started (manual or via timer), archiving is automatically enabled.
This step is required to ensure all WAL files need for a restore are archived beside the basebackup.
**Archiving is _not_ disabled after the backup run.**
### Restore
**Restore is an invasive action that can destroy data if not executed properly!**
To restore a backup there are two main methods full and delta.
#### Full Restore
A full restore restores a given backup (by default the latest) to the given (default) destination.
The restore command expects the target directory to be empty.
This can be used to setup a cluster on a new machine, small clusters or if most of the remaining data is incorrect.
Steps to full restore.
1. Stop the cluster (if still running)
2. Delete or move all remaining data
3. Restore full content from backup
*All steps should be run as user `postgres`*.
```
# 1. Stop the cluster
pg_ctlcluster <major version> <name> stop
# 2. Delete or move all remaining data
mv /var/lib/postgresql/<major version>/<name> /var/somewhere-save
mkdir /var/lib/postgresql/<major version>/<name>
# 3. Restore full content from backup
pgbackrest --stanza=<major version>-<name> restore
```
After this the cluster can be started again.
If there is enough storage available it should be preferred to move the data to a save place instead of deletion.
#### Delta Restore
A delta restore does not need a clean target and it only copies files that differ from backup.
This approach can be much faster especially if most of the underling files did not change since the last backup.
**This has the potential to destroy data!**
Because this works on the cluster data it is possible to cause damage.
Data that is not in the backup / WAL archive but in the current cluster will be lost!
Steps to perform a delta restore.
1. Stop the cluster (if still running)
2. Restore delta content from backup
```
# 1. Stop the cluster
pg_ctlcluster <major version> <name> stop
# 2. Restore full content from backup
pgbackrest --stanza=<major version>-<name> --delta restore
```
After this the cluster can be started again.
#### Point in Time Recovery
The shown backups methods do a full restore.
This means a all basebackup files and copied back from the archive and all WAL files are applied.
If another recovery target should be restored `--type` and `--target` must be specified.
Most of the time one would like to restore a database to a given point in time (e.g. '2017-08-24 12:00:00').
This would require the switch `--type=time` and `--target='2017-08-24 12:00:00'`.
```
pgbackrest --stanza=<major version>-<name> --type=time --target="<ISO timestamp>" restore
```
### Additional Resources
* <http://www.pgbackrest.org/user-guide.html>
* <http://www.pgbackrest.org/command.html>
* <http://www.pgbackrest.org/configuration.html>
## Reporting - pgBadger
A pgBadger service is created for each PostgreSQL
instance. Those services are autogenerated and updated each time a new
cluster is created or dropped (systemd-generators).
A pgBadger systemd timer ensures reports are updated on a regular basis.
By default this is every day at 23:00.
Each pgBadger service parses the PostgreSQL log file of the
corresponding PostgreSQL instance. Generated reports are saved within
`/var/lib/pgbadger/<version>-<name>` (e.g. `/var/lib/pgbadger/9.6-main/`).
All reports are accessible in the web interface.
An calendar provides access to daily and weekly reports.
A manual update of those reports can be triggered either using the corresponding service (e.g. `pgbadger@9.6-main.service`) or using the [portal](#portal).
A update of *all* reports could be triggered using the parent service `pgbadger.service`.
*Note:* Changing postgresql.conf settings like `log_line_prefix` or
`lc_messages` can lead to pgBadger reports not getting updated anymore.

## Web Terminal - Shell In A Box
Shell In A Box is a convenient web based terminal. It can be used like a normal console connection.
Explicit login and authentication is required.
To change settings (e.g. the color theme) just right click anywhere on the terminal window.
### Additional Resources
* <https://github.com/shellinabox/shellinabox>
## Remote Control - tmate
tmate is a fork of the popular terminal multiplexer tmux.
It is used to provide remote support if needed.
It is preconfigured to connect to a relay server (`tmate.credativ.com`) and enables the user to share the current terminal with a third party by sending an SSH command including a secret token.
There are two modes of operation, read-write and read-only.
This enables the user to give a third party temporary access to the current terminal.
The user can always watch the terminal and audit the actions taken by the third party.
* tmate is not running by default, it needs to be started explicitly
* When the initiating shell is closed, the connection is closed as well
* The backend to use is fully configurable (in `/etc/tmate.conf`) and preset to `tmate.credativ.com`
* tmate is included as a technical preview to evaluate the potential
### Usage
Start tmate (opens a new terminal)
```
tmate
```
Show the credentials which need to be given to a third party (securely)
```
tmate show-messages
```

For further usage see the following additional resources regarding tmux.
### Additional Resources
* <https://tmate.io/>
* <https://man.openbsd.org/OpenBSD-current/man1/tmux.1>
## Configuration Revision - etckeeper
etckeeper is a set of tools and hooks to keep all configuration in `/etc` in a git repository.
Commits can be done manually or will happen automatically via time or by package manager hooks.
Configuration changes can be seen and compared to previous versions.
If necessary previous settings can be restored.
#### Additional Resources
* <https://etckeeper.branchable.com/>
* <https://www.thomas-krenn.com/de/wiki/Etc-Verzeichnis_mit_etckeeper_versionieren>
================================================
FILE: doc/chapter/first-steps.md
================================================
# First Steps
Log into your web browser and go to the server's IP address (e.g.
<https://your-server/>). The default setup will redirect HTTP requests to
HTTPS.
The Elephant Shed portal provides information about
running PostgreSQL instances and their status. Moreover you get
access to all other installed components.
The server will ask you for your user credentials. Depending on the
deployment process the required user will differ. On a test
installation (e.g. using Vagrant) the initial user is **admin** with
password **admin**. See also: [Users](users.md). All bundled components except
for OmniDB have been configured to use PAM authentication.
OmniDB doesn't support PAM authentication yet. It has its own user
management system which is decoupled from all system users.
The default initial user is **admin** with **admin** as password.

On a new installation you will find one cluster running the current PostgreSQL major version with the name `main`.
The configuration for clusters can be found in `/etc/postgresql/<major version>/<name>/`.
To use PostgreSQL from external application servers only a few steps are needed.
1. Open a shell connection to the server using SSH or shellinabox <https://your-server/shellinabox>.
2. Switch to user `postgres` and launch psql:
* `sudo -u postgres psql`
3. Create a database and corresponding application user, options:
* `psql: CREATE ROLE appuser1 WITH LOGIN PASSWORD 'testpass';`
* `psql: CREATE DATABASE appdb1 OWNER appuser1;`
4. Allow external access for your application servers, your network or everyone. Configuration file: `/etc/postgresql/<major version>/<name>/pg_hba.conf`
5. (optional) Make desired configuration changes and tuning. `/etc/postgresql/<major version>/<name>/postgresql.conf`
6. Reload the configuration, options:
* Portal: Click on the button `Service` next to the cluster and choose "Reload" from the dropdown menu
* `psql`: `SELECT pg_reload_conf();`
7. (optional) Configure a superuser to be able to use OmniDB <https://your-server/omnidb> or other management tools
* Create password for user postgres: `\password`
* Create personalized superusers: `CREATE USER "sosna" SUPERUSER;`, `\password "sosna"`
================================================
FILE: doc/chapter/installation.md
================================================
# Installation
Elephant Shed consists of the following Debian packages and their dependencies:
* `elephant-shed`:
Metapackage that includes the following packages.
* `elephant-shed-prometheus`:
Configuration files and helper scripts for Prometheus and its exporters.
* `elephant-shed-cockpit`:
Configuration files for cockpit and cockpit-ws.
* `elephant-shed-grafana`:
Preconfigured Prometheus datasource and dashboard that includes various system
and PostgreSQL metrics.
* `elephant-shed-omnidb`:
Configuration files for OmniDB.
* `elephant-shed-pgbackrest`:
Systemd service files and generators, helper scripts and preset configuration.
* `elephant-shed-pgbadger`:
Systemd service files, generators and helper scripts.
* `elephant-shed-portal`:
Elephant Shed web portal including Apache configuration.
* `elephant-shed-postgresql`:
Additional preset configuration files for PostgreSQL.
* `elephant-shed-shellinabox`:
Shell In A Box configuration files.
* `elephant-shed-tmate`:
Preconfigured tmate installation for easier support.
## Package Installation
Prebuilt packages are available from <https://packages.credativ.com/public/postgresql/>.
The repository also contains packages that the `elephant-shed` packages depend
on. This includes packages for Grafana, Cockpit and various python libraries.
### Installation on Debian and Ubuntu
```
# Install tools
sudo apt-get install curl ca-certificates apt-transport-https
# Use official PostgreSQL repo, apt.postgresql.org
echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# Use credativ repo, packages.credativ.com
echo "deb https://packages.credativ.com/public/postgresql/ buster-stable main" | sudo tee -a /etc/apt/sources.list.d/elephant-shed.list
curl https://packages.credativ.com/public/postgresql/aptly.key | sudo apt-key add -
# Install elephant-shed
sudo apt-get update
sudo apt-get install elephant-shed
# In case of dependency issues regarding omnidb on buster, add backports
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/backports.list
sudo apt-get update
sudo apt-get install -t buster-backports python3-django
sudo apt-get install elephant-shed
# Choose desired PostgreSQL versions to install
sudo apt-get install postgresql-10
# Every user in the group "elephant-shed" is allowed to login at the portal
# Add all needed users to this group
sudo adduser <USERNAME> elephant-shed
```
### Installation on RedHat and CentOS
Elephant Shed works with the PostgreSQL packages from the PostgreSQL RPM building project.
Go to <a href="https://yum.postgresql.org/"><b>yum.postgresql.org</b></a> and
install the repository RPMs for the PostgreSQL versions you want to use.
Then proceed to install Elephant Shed as below.
```bash
# Use credativ repository (will also pull in EPEL)
sudo yum install https://packages.credativ.com/public/postgresql/yum/credativ-repo.rpm
# On RedHat, activate additional repositories (not on CentOS)
subscription-manager repos --enable=rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-optional-rpms
# Choose desired PostgreSQL versions to install
sudo yum install postgresql13-server postgresql13-contrib postgresql-common
sudo pg_createcluster 13 main --start
# Install elephant-shed
sudo yum install elephant-shed
# Every user in the group "elephant-shed" is allowed to login at the portal
# Add all needed users to this group
sudo vigr
# Unfortunately, shellinabox does not work with SELinux enabled
# Disable SELinux if you want to use this component
sudo setenforce 0
sudo sed -i -e 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
```
## Installation from source
The source code is available on GitHub: <https://github.com/credativ/elephant-shed>
### Build Debian Packages
All Elephant Shed Debian packages can be built using the command `make deb`.
Requirements:
- `dpkg-dev`
- `devscripts`
### Build Documentation
To build the documentation in HTML format type `make docs`.
Requirements:
- `sphinx`
### Create Testsystem with Vagrant
The `make vagrant` command builds all components, creates a new virtual machine using Vagrant and deploys the software using Ansible.
This can also be used to redeploy a already running machine.
The Vagrant configuration is located in `vagrant/Vagrantfile`.
Requirements:
- `vagrant`
- `virtualbox` or `libvirt`
- `ansible`
### Deploy on remote machine
To deploy the software on any machine, enter the connection information in the inventory `vagrant/inventory`.
The deployment can than be started with the following command `make ansible`.
Requirements:
- `ansible`
================================================
FILE: doc/chapter/intro.md
================================================
# Intro
Elephant Shed is a web-based PostgreSQL management front-end that bundles
several utilities and applications for use with PostgreSQL. It currently
manages single-node Debian/Ubuntu PostgreSQL servers and appliances.
The main components are:
* PostgreSQL - <https://www.postgresql.org/>
* OmniDB - <https://omnidb.org/>
* postgresql-common - <https://anonscm.debian.org/cgit/pkg-postgresql/postgresql-common.git>
* pgBadger - <http://dalibo.github.io/pgbadger/>
* pgBackRest - <http://www.pgbackrest.org/>
* Grafana - <https://grafana.com/>
* Prometheus - <https://prometheus.io/>
* Cockpit - <http://cockpit-project.org/>
* Shell In A Box - <https://github.com/shellinabox/shellinabox>
In addition several other tools are included for configuration management and setup.
The number of components bundled and tasks handled add some overhead compared
to running just the database server. It is therefore only recommended for
adequately sized systems.
This document describes the current version.
Updated versions of this document will be shipped with the elephant-shed packages and can be found in `/usr/share/doc/elephant-shed-portal` (`/usr/share/doc/elephant-shed*`) and in the web portal under <https://your-server/doc/>.
================================================
FILE: doc/chapter/issues.md
================================================
# Known Bugs and Issues
## PostgreSQL
* The `prometheus-sql-exporter` monitoring agent is permanently keeping
connections open to all databases, which prevents `DROP DATABASE` from
working. To drop databases, stop `prometheus-sql-exporter` first.
This is possible via the web interface Cockpit: [services#/prometheus-sql-exporter.service](/system/services#/prometheus-sql-exporter.service).
## OmniDB
* OmniDB does not use PAM authentication.
## Portal
* A direct relogin after a logout does not work. Reloading the page is necessary.
## RedHat / CentOS
* shellinabox does not work when SELinux is enabled.
================================================
FILE: doc/chapter/license.md
================================================
# License
The Elephant Shed itself is licensed under the GPLv3 (<https://www.gnu.org/licenses/gpl-3.0.de.html>).
All bundled components are Free/Open-Source software with a known and approved open source license.
================================================
FILE: doc/chapter/support.md
================================================
# Support and more
## Do you have any question or want to know more?
* **Project page** [elephant-shed.io](https://elephant-shed.io)
* **Git** [github.com/credativ/elephant-shed](https://github.com/credativ/elephant-shed/)
* **Web-Chat** [#elephant-shed](https://webchat.oftc.net/?nick=web-user-.&channels=elephant-shed&uio=MT11bmRlZmluZWQmMj10cnVlJjk9dHJ1ZSYxMT0yMzY31)
* **IRC** [#elephant-shed](https://webchat.oftc.net/?channels=elephant-shed&uio=MT11bmRlZmluZWQmMj10cnVlJjk9dHJ1ZSYxMT0yMzY31
) on [irc.oftc.net](https://www.oftc.net/)
## Do you need professional support or additional services?
Elephant Shed is an open source project, developed and maintained by credativ.
For the Elephant Shed PostgreSQL appliance, credativ offers comprehensive
technical support with service level agreements, which are also available
on 365 days a year and 24 hours a day as an option.
Installation and integration support, as well as an introduction
in Elephant Shed PostgreSQL appliance is of course also part of
credativ's services. If you are interested, please feel free to contact us.

* **Web** [credativ.de](https://credativ.de)
* **E-Mail:** [info@credativ.de](mailto:info@credativ.de)
* **Phone:** [+49 2161 9174200](tel:+4921619174200)
================================================
FILE: doc/chapter/users.md
================================================
# Users
The web interface is password protected (HTTP basic authentication) and uses the system
users via PAM. When deployed via Ansible, the initial user is **admin** with
password **admin**. This user works for web access as well as for SSH and
PostgreSQL.
To create new users, use `adduser`, and add the user to the **elephant-shed** group.
```
adduser myon
adduser myon elephant-shed
```
On RedHat/CentOS, use `vigr` to add users to the **elephant-shed** group.
================================================
FILE: doc/conf.py
================================================
# -*- coding: utf-8 -*-
#
# elephant-shed documentation build configuration file, created by
# sphinx-quickstart on Fri Dec 15 14:52:01 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
import recommonmark
from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'recommonmark',
'sphinx.ext.todo',
'sphinx.ext.githubpages',
]
source_parsers = {
'.md': CommonMarkParser
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ['.rst', '.md']
# The encoding of source files.
#
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'elephant-shed'
copyright = u'2017-2022, credativ'
author = u'credativ'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.3.10'
# The full version, including alpha/beta/rc tags.
release = u'1.3.10'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
# today = ''
#
# Else, today_fmt is used as the format for a strftime call.
#
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'elephant-shed v1.0'
# A shorter title for the navigation bar. Default is the same as html_title.
#
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
# html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
# html_last_updated_fmt = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}
# If false, no module index is generated.
#
# html_domain_indices = True
# If false, no index is generated.
#
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'elephant-sheddoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'elephant-shed.tex', u'elephant-shed Documentation',
u'credativ', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#
# latex_use_parts = False
# If true, show page references after internal links.
#
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
#
# latex_appendices = []
# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
# latex_keep_old_macro_names = True
# If false, no module index is generated.
#
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'elephant-shed', u'elephant-shed Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'elephant-shed', u'elephant-shed Documentation',
author, 'elephant-shed', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#
# texinfo_appendices = []
# If false, no module index is generated.
#
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# The basename for the epub file. It defaults to the project name.
# epub_basename = project
# The HTML theme for the epub output. Since the default themes are not
# optimized for small screen space, using the same theme for HTML and epub
# output is usually not wise. This defaults to 'epub', a theme designed to save
# visual space.
#
# epub_theme = 'epub'
# The language of the text. It defaults to the language option
# or 'en' if the language is not set.
#
# epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
# epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A tuple containing the cover image and cover page html template filenames.
#
# epub_cover = ()
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
#
# epub_guide = ()
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#
# epub_pre_files = []
# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#
# epub_post_files = []
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# The depth of the table of contents in toc.ncx.
#
# epub_tocdepth = 3
# Allow duplicate toc entries.
#
# epub_tocdup = True
# Choose between 'default' and 'includehidden'.
#
# epub_tocscope = 'default'
# Fix unsupported image types using the Pillow.
#
# epub_fix_images = False
# Scale large images.
#
# epub_max_image_width = 0
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# epub_show_urls = 'inline'
# If false, no index is generated.
#
# epub_use_index = True
================================================
FILE: doc/index.rst
================================================
.. elephant-shed documentation master file, created by
sphinx-quickstart on Fri Dec 15 14:52:01 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Elephant Shed - Documentation
=============================
.. toctree::
:maxdepth: 2
:numbered:
chapter/intro
chapter/installation
chapter/first-steps
chapter/components
chapter/users
chapter/issues
chapter/license
chapter/support
================================================
FILE: grafana/README
================================================
Prometheus queries
------------------
Ordering: `job=~'$job', host=~'$host', sql_job=~'$cluster'`, then other fields
Cluster selection: `sql_job=~'$cluster'` on "global" queries, `sql_job=~'$cluster.*'` on "database" queries
================================================
FILE: grafana/dashboard-sed
================================================
#!/bin/sh
# To use, select Share > Export > Save to file in Grafana, and do:
# grafana/dashboard-sed ~/Desktop/PostgreSQL\ Server\ Overview-* > grafana/postgresql_server_overview.json ; rm -f ~/Desktop/PostgreSQL\ Server\ Overview*
# replace DS_PROMETHEUS by prometheus
# replace "Overview Copy" by "Overview"
sed -e 's/${DS_PROMETHEUS}/prometheus/' \
-e 's/"title": "PostgreSQL Server Overview.*/"title": "PostgreSQL Server Overview",/' \
"$@"
================================================
FILE: grafana/datasource_prometheus.yml
================================================
---
# config file version
apiVersion: 1
# list of datasources to insert/update depending
# whats available in the database
datasources:
# <string, required> name of the datasource. Required
- name: prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. direct or proxy. Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://127.0.0.1:9090/prometheus
# <string> database password, if used
password:
# <string> database user, if used
user:
# <string> database name, if used
database:
# <bool> enable/disable basic auth
basicAuth: false
# <string> basic auth username
basicAuthUser:
# <string> basic auth password
basicAuthPassword:
# <bool> enable/disable with credentials headers
withCredentials: false
# <bool> mark as default datasource. Max one per org
isDefault: true
# <map> fields that will be converted to json and stored in json_data
#jsonData:
# graphiteVersion: "1.1"
# tlsAuth: true
# tlsAuthWithCACert: true
# <string> json object of data that will be encrypted.
#secureJsonData:
# tlsCACert: "..."
# tlsClientCert: "..."
# tlsClientKey: "..."
version: 1
# <bool> allow users to edit datasources from the UI.
editable: false
================================================
FILE: grafana/elephant-shed-grafana
================================================
# Set go garbage collector to clean up more frequently
GOGC=40
GOMAXPROCS=4
CONF_FILE=/etc/grafana/elephant-shed-grafana.ini
================================================
FILE: grafana/elephant-shed-grafana.conf
================================================
[Service]
EnvironmentFile=/etc/default/elephant-shed-grafana
================================================
FILE: grafana/elephant-shed-grafana.ini
================================================
##################### Grafana Configuration Example #####################
#
# Everything has defaults so you only need to uncomment things you want to
# change
# possible values : production, development
; app_mode = production
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
; instance_name = ${HOSTNAME}
#################################### Paths ####################################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
#
;data = /var/lib/grafana
#
# Directory where grafana can store logs
#
;logs = /var/log/grafana
#
# Directory where grafana will automatically scan and look for plugins
#
;plugins = /var/lib/grafana/plugins
#
#################################### Server ####################################
[server]
# Protocol (http, https, socket)
protocol = http
domain = localhost
root_url = %(protocol)s://%(domain)s:/grafana
# The ip address to bind to, empty will bind to all interfaces
http_addr = 127.0.0.1
# The http port to use
http_port = 3000
# The public facing domain name used to access grafana from a browser
;domain = localhost
# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
;enforce_domain = false
# The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path)
;root_url = http://localhost:3000
# Log web requests
;router_logging = false
# the path relative working path
;static_root_path = public
# enable gzip
;enable_gzip = false
# https certs & key file
;cert_file =
;cert_key =
# Unix socket path
;socket =
#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url propertie.
# Either "mysql", "postgres" or "sqlite3", it's your choice
;type = sqlite3
;host = 127.0.0.1:3306
;name = grafana
;user = root
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
;password =
# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret@host:port/database
;url =
# For "postgres" only, either "disable", "require" or "verify-full"
;ssl_mode = disable
# For "sqlite3" only, path relative to data_path setting
;path = grafana.db
# Max conn setting default is 0 (mean not set)
;max_idle_conn =
;max_open_conn =
#################################### Session ####################################
[session]
# Either "memory", "file", "redis", "mysql", "postgres", default is "file"
;provider = file
# Provider config options
# memory: not have any config yet
# file: session dir path, is relative to grafana data_path
# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
# mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
;provider_config = sessions
# Session cookie name
;cookie_name = grafana_sess
# If you use session in https only, default is false
;cookie_secure = false
# Session life time, default is 86400
;session_life_time = 86400
#################################### Data proxy ###########################
[dataproxy]
# This enables data proxy logging, default is false
;logging = false
#################################### Analytics ####################################
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
# No ip addresses are being tracked, only simple counters to track
# running instances, dashboard and error counts. It is very helpful to us.
# Change this option to false to disable reporting.
;reporting_enabled = true
# Set to false to disable all checks to https://grafana.net
# for new vesions (grafana itself and plugins), check is used
# in some UI views to notify that grafana or plugin update exists
# This option does not cause any auto updates, nor send any information
# only a GET request to http://grafana.com to get latest versions
;check_for_updates = true
# Google Analytics universal tracking code, only enabled if you specify an id here
;google_analytics_ua_id =
#################################### Security ####################################
[security]
# default admin user, created on startup
admin_user = admin
# default admin password, can be changed before first start of grafana, or in profile settings
admin_password = admin
# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
# Auto-login remember days
;login_remember_days = 7
;cookie_username = grafana_user
;cookie_remember_name = grafana_remember
# disable gravatar profile images
;disable_gravatar = false
# data source proxy whitelist (ip_or_domain:port separated by spaces)
;data_source_proxy_whitelist =
[snapshots]
# snapshot sharing options
;external_enabled = true
;external_snapshot_url = https://snapshots-origin.raintank.io
;external_snapshot_name = Publish to snapshot.raintank.io
# remove expired snapshot
;snapshot_remove_expired = true
# remove snapshots after 90 days
;snapshot_TTL_days = 90
#################################### Users ####################################
[users]
# disable user signup / registration
allow_sign_up = true
# Allow non admin users to create organizations
;allow_org_create = true
# Set to true to automatically assign new users to the default organization (id 1)
auto_assign_org = true
# Default role new users will be automatically assigned (if disabled above is set to true)
auto_assign_org_role = Editor
# Background text for the user field on the login page
;login_hint = email or username
# Default UI theme ("dark" or "light")
;default_theme = dark
[auth]
# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
;disable_login_form = false
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
;disable_signout_menu = false
#################################### Anonymous Auth ##########################
[auth.anonymous]
# enable anonymous access
;enabled = false
# specify organization name that should be used for unauthenticated users
;org_name = Main Org.
# specify role for unauthenticated users
;org_role = Viewer
#################################### Github Auth ##########################
[auth.github]
;enabled = false
;allow_sign_up = true
;client_id = some_id
;client_secret = some_secret
;scopes = user:email,read:org
;auth_url = https://github.com/login/oauth/authorize
;token_url = https://github.com/login/oauth/access_token
;api_url = https://api.github.com/user
;team_ids =
;allowed_organizations =
#################################### Google Auth ##########################
[auth.google]
;enabled = false
;allow_sign_up = true
;client_id = some_client_id
;client_secret = some_client_secret
;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
;auth_url = https://accounts.google.com/o/oauth2/auth
;token_url = https://accounts.google.com/o/oauth2/token
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
;allowed_domains =
#################################### Generic OAuth ##########################
[auth.generic_oauth]
;enabled = false
;name = OAuth
;allow_sign_up = true
;client_id = some_id
;client_secret = some_secret
;scopes = user:email,read:org
;auth_url = https://foo.bar/login/oauth/authorize
;token_url = https://foo.bar/login/oauth/access_token
;api_url = https://foo.bar/user
;team_ids =
;allowed_organizations =
#################################### Grafana.com Auth ####################
[auth.grafana_com]
;enabled = false
;allow_sign_up = true
;client_id = some_id
;client_secret = some_secret
;scopes = user:email
;allowed_organizations =
#################################### Auth Proxy ##########################
[auth.proxy]
enabled = true
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true
;ldap_sync_ttl = 60
;whitelist = 192.168.1.1, 192.168.2.1
#################################### Basic Auth ##########################
[auth.basic]
enabled = true
#################################### Auth LDAP ##########################
[auth.ldap]
;enabled = false
;config_file = /etc/grafana/ldap.toml
;allow_sign_up = true
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
;host = localhost:25
;user =
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
;password =
;cert_file =
;key_file =
;skip_verify = false
;from_address = admin@grafana.localhost
;from_name = Grafana
[emails]
;welcome_email_on_sign_up = false
#################################### Logging ##########################
[log]
# Either "console", "file", "syslog". Default is console and file
# Use space to separate multiple modes, e.g. "console file"
;mode = console file
# Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
;level = info
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
;filters =
# For "console" mode only
[log.console]
;level =
# log line format, valid options are text, console and json
;format = console
# For "file" mode only
[log.file]
;level =
# log line format, valid options are text, console and json
;format = text
# This enables automated log rotate(switch of following options), default is true
;log_rotate = true
# Max line number of single file, default is 1000000
;max_lines = 1000000
# Max size shift of single file, default is 28 means 1 << 28, 256MB
;max_size_shift = 28
# Segment log daily, default is true
;daily_rotate = true
# Expired days of log file(delete after max days), default is 7
;max_days = 7
[log.syslog]
;level =
# log line format, valid options are text, console and json
;format = text
# Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
;network =
;address =
# Syslog facility. user, daemon and local0 through local7 are valid.
;facility =
# Syslog tag. By default, the process' argv[0] is used.
;tag =
#################################### AMQP Event Publisher ##########################
[event_publisher]
;enabled = false
;rabbitmq_url = amqp://localhost/
;exchange = grafana_events
;#################################### Dashboard JSON files ##########################
[dashboards.json]
enabled = true
path = /usr/share/elephant-shed/grafana/dashboards
#################################### Alerting ############################
[alerting]
# Disable alerting engine & UI features
;enabled = true
# Makes it possible to turn off alert rule execution but alerting UI is visible
;execute_alerts = true
#################################### Internal Grafana Metrics ##########################
# Metrics available at HTTP API Url /api/metrics
[metrics]
# Disable / Enable internal metrics
;enabled = true
# Publish interval
;interval_seconds = 10
# Send internal metrics to Graphite
[metrics.graphite]
# Enable by setting the address setting (ex localhost:2003)
;address =
;prefix = prod.grafana.%(instance_name)s.
#################################### Grafana.com integration ##########################
# Url used to import dashboards directly from Grafana.com
[grafana_com]
;url = https://grafana.com
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
# you can choose between (s3, webdav)
;provider =
[external_image_storage.s3]
;bucket_url =
;access_key =
;secret_key =
[external_image_storage.webdav]
;url =
;public_url =
;username =
;password =
================================================
FILE: grafana/node_overview.json
================================================
{
"__requires": [
{
"type": "panel",
"id": "bargauge",
"name": "Bar gauge",
"version": ""
},
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.6.1"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 261,
"panels": [],
"title": "Quick CPU / Mem / Disk",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Resource pressure via PSI",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"links": [],
"mappings": [],
"max": 1,
"min": 0,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green"
},
{
"color": "dark-yellow",
"value": 70
},
{
"color": "dark-red",
"value": 90
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 0,
"y": 1
},
"id": 323,
"options": {
"displayMode": "basic",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"maxVizHeight": 300,
"minVizHeight": 10,
"minVizWidth": 0,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"text": {},
"valueMode": "color"
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "irate(node_pressure_cpu_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])",
"format": "time_series",
"instant": true,
"legendFormat": "CPU",
"range": false,
"refId": "A",
"step": 240
},
{
"editorMode": "code",
"exemplar": false,
"expr": "irate(node_pressure_memory_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])",
"format": "time_series",
"instant": true,
"legendFormat": "Mem",
"range": false,
"refId": "B",
"step": 240
},
{
"editorMode": "code",
"exemplar": false,
"expr": "irate(node_pressure_io_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])",
"format": "time_series",
"instant": true,
"legendFormat": "I/O",
"range": false,
"refId": "C",
"step": 240
},
{
"editorMode": "code",
"exemplar": false,
"expr": "irate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])",
"format": "time_series",
"instant": true,
"legendFormat": "Irq",
"range": false,
"refId": "D",
"step": 240
}
],
"title": "Pressure",
"type": "bargauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Overall CPU busy percentage (averaged across all cores)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 85
},
{
"color": "rgba(245, 54, 54, 0.9)",
"value": 95
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 3,
"y": 1
},
"id": 20,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "100 * (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", instance=\"$node\"}[$__rate_interval])))",
"instant": true,
"legendFormat": "",
"range": false,
"refId": "A",
"step": 240
}
],
"title": "CPU Busy",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "System load over all CPU cores together",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 85
},
{
"color": "rgba(245, 54, 54, 0.9)",
"value": 95
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 6,
"y": 1
},
"id": 155,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "scalar(node_load1{instance=\"$node\",job=\"$job\"}) * 100 / count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))",
"format": "time_series",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "Sys Load",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Real RAM usage excluding cache and reclaimable memory",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 80
},
{
"color": "rgba(245, 54, 54, 0.9)",
"value": 90
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 9,
"y": 1
},
"id": 16,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "clamp_min((1 - (node_memory_MemAvailable_bytes{instance=\"$node\", job=\"$job\"} / node_memory_MemTotal_bytes{instance=\"$node\", job=\"$job\"})) * 100, 0)",
"format": "time_series",
"instant": true,
"range": false,
"refId": "B",
"step": 240
}
],
"title": "RAM Used",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Percentage of swap space currently used by the system",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 10
},
{
"color": "rgba(245, 54, 54, 0.9)",
"value": 25
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 12,
"y": 1
},
"id": 21,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "((node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"}) / (node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"})) * 100",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "SWAP Used",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Used Root FS",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 80
},
{
"color": "rgba(245, 54, 54, 0.9)",
"value": 90
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 15,
"y": 1
},
"id": 154,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "(\n (node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"}\n - node_filesystem_avail_bytes{instance=\"$node\", job=\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"})\n / node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"}\n) * 100\n",
"format": "time_series",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "Root FS Used",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 2,
"x": 18,
"y": 1
},
"id": 14,
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))",
"instant": true,
"legendFormat": "__auto",
"range": false,
"refId": "A"
}
],
"title": "CPU Cores",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 2,
"x": 20,
"y": 1
},
"id": 75,
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"}",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "RAM Total",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 2,
"x": 22,
"y": 1
},
"id": 18,
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"}",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "SWAP Total",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 70
},
{
"color": "rgba(245, 54, 54, 0.9)",
"value": 90
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 2,
"x": 18,
"y": 3
},
"id": 23,
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",mountpoint=\"/\",fstype!=\"rootfs\"}",
"format": "time_series",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "RootFS Total",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 4,
"x": 20,
"y": 3
},
"id": 15,
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "node_time_seconds{instance=\"$node\",job=\"$job\"} - node_boot_time_seconds{instance=\"$node\",job=\"$job\"}",
"instant": true,
"range": false,
"refId": "A",
"step": 240
}
],
"title": "Uptime",
"type": "stat"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"id": 263,
"panels": [],
"title": "Basic CPU / Mem / Net / Disk",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "CPU time spent busy vs idle, split by activity type",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 40,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "percent"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
},
"unit": "percentunit"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Busy Iowait"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#890F02",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Idle"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#052B51",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Busy System"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#EAB839",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Busy User"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#0A437C",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Busy Other"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#6D1F62",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 6
},
"id": 77,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
"width": 250
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "sum(irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"system\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))",
"format": "time_series",
"instant": false,
"legendFormat": "Busy System",
"range": true,
"refId": "A",
"step": 240
},
{
"editorMode": "code",
"expr": "sum(irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"user\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))",
"format": "time_series",
"legendFormat": "Busy User",
"range": true,
"refId": "B",
"step": 240
},
{
"editorMode": "code",
"expr": "sum(irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"iowait\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))",
"format": "time_series",
"legendFormat": "Busy Iowait",
"range": true,
"refId": "C",
"step": 240
},
{
"editorMode": "code",
"expr": "sum(irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=~\".*irq\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))",
"format": "time_series",
"legendFormat": "Busy IRQs",
"range": true,
"refId": "D",
"step": 240
},
{
"editorMode": "code",
"expr": "sum(irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq'}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))",
"format": "time_series",
"legendFormat": "Busy Other",
"range": true,
"refId": "E",
"step": 240
},
{
"editorMode": "code",
"expr": "sum(irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"idle\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))",
"format": "time_series",
"legendFormat": "Idle",
"range": true,
"refId": "F",
"step": 240
}
],
"title": "CPU Basic",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "RAM and swap usage overview, including caches",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 40,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
},
"unit": "bytes"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Swap used"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#BF1B00",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Total"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#E0F9D7",
"mode": "fixed"
}
},
{
"id": "custom.fillOpacity",
"value": 0
},
{
"id": "custom.stacking",
"value": {
"group": false,
"mode": "normal"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Cache + Buffer"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#052B51",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Free"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#7EB26D",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 6
},
"id": 78,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
"width": 350
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Total",
"range": true,
"refId": "A",
"step": 240
},
{
"editorMode": "code",
"expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"} - (node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} + node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"} + node_memory_SReclaimable_bytes{instance=\"$node\",job=\"$job\"})",
"format": "time_series",
"legendFormat": "Used",
"range": true,
"refId": "B",
"step": 240
},
{
"editorMode": "code",
"expr": "node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} + node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"} + node_memory_SReclaimable_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Cache + Buffer",
"range": true,
"refId": "C",
"step": 240
},
{
"editorMode": "code",
"expr": "node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Free",
"range": true,
"refId": "D",
"step": 240
},
{
"editorMode": "code",
"expr": "(node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"})",
"format": "time_series",
"legendFormat": "Swap used",
"range": true,
"refId": "E",
"step": 240
}
],
"title": "Memory Basic",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Per-interface network traffic (receive and transmit) in bits per second",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 40,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
},
"unit": "bps"
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": "/.*Tx.*/"
},
"properties": [
{
"id": "custom.transform",
"value": "negative-Y"
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 13
},
"id": 74,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"expr": "rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])*8",
"format": "time_series",
"legendFormat": "Rx {{device}}",
"range": true,
"refId": "A",
"step": 240
},
{
"editorMode": "code",
"expr": "rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])*8",
"format": "time_series",
"legendFormat": "Tx {{device}} ",
"range": true,
"refId": "B",
"step": 240
}
],
"title": "Network Traffic Basic",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "Percentage of filesystem space used for each mounted device",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 40,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 13
},
"id": 152,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.1",
"targets": [
{
"editorMode": "code",
"expr": "((node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", device!~\"rootfs\"} - node_filesystem_avail_bytes{instance=\"$node\", job=\"$job\", device!~\"rootfs\"}) / node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", device!~\"rootfs\"}) * 100",
"format": "time_series",
"legendFormat": "{{mountpoint}}",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Disk Space Used Basic",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 20
},
"id": 265,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"description": "CPU time usage split by state, normalized across all CPU cores",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 70,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "percent"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mapping
gitextract_fgr39gxo/
├── .gitignore
├── .gitlab-ci.yml
├── .vimrc
├── LICENSE
├── Makefile
├── README.md
├── ci/
│ ├── .gitignore
│ ├── ansible.cfg
│ ├── build-grafana.sh
│ ├── credativDeutschlandServerCA-chain.pem
│ ├── inventory
│ ├── openstack_remove_instance_if_exists.sh
│ ├── openstackrc.sh
│ ├── rebuild.sh
│ └── setup-gitlab-runner
├── cockpit/
│ ├── cockpit.conf
│ └── port.conf
├── debian/
│ ├── .gitignore
│ ├── changelog
│ ├── clean
│ ├── compat
│ ├── control
│ ├── copyright
│ ├── elephant-shed-cockpit.install
│ ├── elephant-shed-cockpit.postinst
│ ├── elephant-shed-grafana.install
│ ├── elephant-shed-grafana.postinst
│ ├── elephant-shed-omnidb.install
│ ├── elephant-shed-omnidb.postinst
│ ├── elephant-shed-pgbackrest.install
│ ├── elephant-shed-pgbackrest.postinst
│ ├── elephant-shed-pgbadger.dirs
│ ├── elephant-shed-pgbadger.install
│ ├── elephant-shed-pgbadger.postinst
│ ├── elephant-shed-portal.install
│ ├── elephant-shed-portal.lintian-overrides
│ ├── elephant-shed-portal.postinst
│ ├── elephant-shed-postgresql.install
│ ├── elephant-shed-postgresql.postinst
│ ├── elephant-shed-powa.install
│ ├── elephant-shed-powa.postinst
│ ├── elephant-shed-prometheus-node-exporter.install
│ ├── elephant-shed-prometheus-node-exporter.mainscript
│ ├── elephant-shed-prometheus-node-exporter.postinst
│ ├── elephant-shed-prometheus-sql-exporter.install
│ ├── elephant-shed-prometheus-sql-exporter.lintian-overrides
│ ├── elephant-shed-prometheus-sql-exporter.maintscript
│ ├── elephant-shed-prometheus-sql-exporter.postinst
│ ├── elephant-shed-prometheus-sql-exporter.postrm
│ ├── elephant-shed-prometheus.install
│ ├── elephant-shed-prometheus.postinst
│ ├── elephant-shed-shellinabox.postinst
│ ├── elephant-shed-tmate.install
│ ├── elephant-shed-tmate.lintian-overrides
│ ├── elephant-shed-tmate.postinst
│ ├── rules
│ └── source/
│ └── format
├── doc/
│ ├── .gitignore
│ ├── Makefile
│ ├── chapter/
│ │ ├── components.md
│ │ ├── first-steps.md
│ │ ├── installation.md
│ │ ├── intro.md
│ │ ├── issues.md
│ │ ├── license.md
│ │ ├── support.md
│ │ └── users.md
│ ├── conf.py
│ └── index.rst
├── grafana/
│ ├── README
│ ├── dashboard-sed
│ ├── datasource_prometheus.yml
│ ├── elephant-shed-grafana
│ ├── elephant-shed-grafana.conf
│ ├── elephant-shed-grafana.ini
│ ├── node_overview.json
│ ├── node_overview.yml
│ ├── postgresql_server_overview.json
│ └── postgresql_server_overview.yml
├── image-sources/
│ └── Unbenannt-1.psd
├── node-exporter/
│ ├── elephant-shed-prometheus-node-exporter
│ └── elephant-shed-prometheus-node-exporter.conf
├── omnidb/
│ └── wsgi.py
├── pgbackrest/
│ ├── pgbackrest-archivecommand
│ ├── pgbackrest-incr@.service
│ ├── pgbackrest-incr@.timer
│ ├── pgbackrest-run
│ ├── pgbackrest-toggle-archiving
│ ├── pgbackrest-toggle-archiving@.service
│ ├── pgbackrest@.service
│ └── pgbackrest@.timer
├── pgbadger/
│ ├── pgbadger-generator
│ ├── pgbadger-run
│ ├── pgbadger.service
│ ├── pgbadger.timer
│ └── pgbadger@.service
├── portal/
│ ├── cgi-bin/
│ │ ├── backrest.pl
│ │ ├── error.pl
│ │ ├── index_footer.pl
│ │ ├── index_header.pl
│ │ ├── notloggedin.pl
│ │ ├── portalmain.pl
│ │ └── support.pl
│ ├── elephant-shed.conf
│ ├── static/
│ │ └── css/
│ │ ├── elephant-shed.css
│ │ └── esmenu.css
│ └── template/
│ ├── backrest.html
│ ├── error.html
│ ├── footer.html
│ ├── header.html
│ ├── notloggedin.html
│ ├── portalmain.html
│ └── support.html
├── postgresql/
│ ├── elephant-shed.conf
│ ├── es_ctlcluster
│ └── rsyslog-postgresql-discard.conf
├── powa/
│ └── update-powa-web-config
├── prometheus/
│ ├── elephant-shed-prometheus
│ ├── elephant-shed-prometheus.conf
│ └── elephant-shed-prometheus.yml
├── rpm/
│ ├── 56-authnz_external.conf
│ ├── README
│ ├── elephant-shed.spec
│ └── tmate.spec
├── sql-exporter/
│ ├── SAMPLE.yml
│ ├── activity.yml
│ ├── elephant-shed.conf
│ ├── io.yml
│ ├── prometheus-sql-exporter-restart.service
│ ├── prometheus-sql-exporter-restart.timer
│ ├── queries.yml
│ ├── replication.yml
│ ├── update-prometheus-sql-exporter-config
│ └── wal.yml
├── tmate/
│ └── tmate.conf
└── vagrant/
├── .gitignore
├── Vagrantfile
├── Vagrantfile.template
├── ansible.cfg
├── elephant-shed.yml
├── files/
│ ├── git/
│ │ └── gitconfig
│ ├── grafana-key.10458545.asc
│ └── postgresql/
│ ├── ACCC4CF8.asc
│ └── pg_hba.conf
├── group_vars/
│ ├── all
│ ├── dev
│ ├── openpower
│ ├── test
│ ├── test-with-disks
│ └── x86-big
├── handlers.yml
├── inventory
├── openstack/
│ └── Vagrantfile
├── tasks/
│ ├── apache2.yml
│ ├── config-backup.yml
│ ├── config-system.yml
│ ├── ferm.yml
│ ├── grafana.yml
│ ├── packages.yml
│ ├── partitioning.yml
│ ├── postgresql.yml
│ └── repository-local.yml
├── templates/
│ ├── apache2/
│ │ └── mpm_event.conf.j2
│ ├── ferm/
│ │ ├── elephant-shed.conf.j2
│ │ └── ferm.conf.j2
│ ├── postgres/
│ │ └── postgres-limits.conf.j2
│ └── postgresql-common/
│ └── performance-tuning.conf.j2
└── vagrantpackage.sh
Condensed preview — 168 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,014K chars).
[
{
"path": ".gitignore",
"chars": 131,
"preview": "CONCEPT.html\nCONCEPT.pdf\nREADME.html\nREADME.pdf\nlintian.log\n*.swp\nrpm/SOURCES\nrpm/SPECS\nrpm/RPMS\nrpm/SRPMS\nrpm/BUILD\nrpm"
},
{
"path": ".gitlab-ci.yml",
"chars": 5471,
"preview": "image: \"debian:stretch\"\n\nstages:\n - docbuild\n - build\n - publish\n # - test\n - deploy\n\n### build ###\n\ndocbuild:docs:"
},
{
"path": ".vimrc",
"chars": 9,
"preview": "set sw=2\n"
},
{
"path": "LICENSE",
"chars": 35147,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "Makefile",
"chars": 1733,
"preview": "# Default git branch to build in RPM\nifndef GITBRANCH\nGITBRANCH=HEAD\nendif\n\nall: docs\n\ndoc docs:\n\t$(MAKE) -C doc html\n\nd"
},
{
"path": "README.md",
"chars": 4236,
"preview": "<img src=\"portal/image/button_home.png\" width=\"200\">\n\n# Intro\n\nElephant Shed is a web-based PostgreSQL management front-"
},
{
"path": "ci/.gitignore",
"chars": 20,
"preview": "fact_cache/\n*.retry\n"
},
{
"path": "ci/ansible.cfg",
"chars": 162,
"preview": "[defaults]\nhostfile = inventory\nnocows = True\n\ngathering = smart\nfact_caching = jsonfile\nfact_caching_connection = fact_"
},
{
"path": "ci/build-grafana.sh",
"chars": 526,
"preview": "#!/bin/bash\n\n# This script should be initiated inside the go src path of grafana!\n# For more information on building gra"
},
{
"path": "ci/credativDeutschlandServerCA-chain.pem",
"chars": 2665,
"preview": "Subject: CN=credativ Root CA,O=credativ,C=DE\nIssuer: CN=credativ Root CA,O=credativ,C=DE\n-----BEGIN CERTIFICATE-----\nMII"
},
{
"path": "ci/inventory",
"chars": 79,
"preview": "elephant-shed.dev.credativ.lan ansible_host=172.26.251.138 ansible_user=debian\n"
},
{
"path": "ci/openstack_remove_instance_if_exists.sh",
"chars": 927,
"preview": "#!/usr/bin/env bash\n\n# This script assumes that all OS_* variables are set and valid.\n\nset -u\n\nif [ $# -lt 1 ]; then\n "
},
{
"path": "ci/openstackrc.sh",
"chars": 498,
"preview": "#!/usr/bin/env bash\n\n# NOTE: We get the passwort from gitlab-ci.\n\nexport OS_AUTH_URL=https://nova.credativ.com:5000/v2.0"
},
{
"path": "ci/rebuild.sh",
"chars": 550,
"preview": "#!/bin/bash\n\n# This script prepares a rebuild of our debian package for testing purposes.\n\nset -eu\n\nDISTTAG=\"$1\"\nIS_RELE"
},
{
"path": "ci/setup-gitlab-runner",
"chars": 918,
"preview": "#!/usr/bin/ansible-playbook\n---\n- name: setup-gitlab-runner\n hosts: all\n become: true\n\n tasks:\n\n - name: Install apt"
},
{
"path": "cockpit/cockpit.conf",
"chars": 117,
"preview": "[WebService]\n# Origin is hardcoded to localhost in apache config\nOrigins = https://localhost https://localhost:10090\n"
},
{
"path": "cockpit/port.conf",
"chars": 42,
"preview": "[Socket]\nListenStream=\nListenStream=10090\n"
},
{
"path": "debian/.gitignore",
"chars": 110,
"preview": "*.debhelper\ndebhelper-build-stamp\nelephant-shed*.debhelper.log\nelephant-shed*.substvars\nelephant-shed*/\nfiles\n"
},
{
"path": "debian/changelog",
"chars": 6575,
"preview": "elephant-shed (1.3.12) unstable; urgency=medium\n\n * sql-exporter: add io/wal and primary/replica metrics.\n * Grafana: "
},
{
"path": "debian/clean",
"chars": 193,
"preview": "ci/fact_cache/\nci/*.retry\ndoc/_build/\nrpm/BUILD/\nrpm/BUILDROOT/\nrpm/RPMS/\nrpm/SOURCES/\nrpm/SPECS/\nrpm/SRPMS/\nvagrant/fac"
},
{
"path": "debian/compat",
"chars": 3,
"preview": "10\n"
},
{
"path": "debian/control",
"chars": 5206,
"preview": "Source: elephant-shed\nSection: database\nPriority: optional\nMaintainer: credativ GmbH <info@credativ.de>\nUploaders:\n Mich"
},
{
"path": "debian/copyright",
"chars": 770,
"preview": "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\n\nFiles: *\nCopyright: (c) 2017-2019 credativ Gm"
},
{
"path": "debian/elephant-shed-cockpit.install",
"chars": 87,
"preview": "cockpit/cockpit.conf etc/cockpit\ncockpit/port.conf etc/systemd/system/cockpit.socket.d\n"
},
{
"path": "debian/elephant-shed-cockpit.postinst",
"chars": 275,
"preview": "#!/bin/sh\n\nset -e\n\ncase $1 in\n configure)\n systemctl daemon-reload\n # not restarting cockpit here, it is socket-a"
},
{
"path": "debian/elephant-shed-grafana.install",
"chars": 506,
"preview": "grafana/datasource_prometheus.yml etc/grafana/provisioning/datasources\ngrafana/elephant-shed-grafana etc/default\ngrafana"
},
{
"path": "debian/elephant-shed-grafana.postinst",
"chars": 356,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n # we depend on grafana and it has to be enabled\n # lintian wants us t"
},
{
"path": "debian/elephant-shed-omnidb.install",
"chars": 47,
"preview": "omnidb/wsgi.py /usr/share/elephant-shed/omnidb\n"
},
{
"path": "debian/elephant-shed-omnidb.postinst",
"chars": 278,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n echo Starting omnidb-server once to initialize /var/lib/omnidb/.omnidb/o"
},
{
"path": "debian/elephant-shed-pgbackrest.install",
"chars": 464,
"preview": "pgbackrest/pgbackrest-run\t\t\t\tusr/share/elephant-shed\npgbackrest/pgbackrest-toggle-archiving\t\t\tusr/share/elephant-shed\npg"
},
{
"path": "debian/elephant-shed-pgbackrest.postinst",
"chars": 510,
"preview": "#!/bin/sh\n\nset -eu\n\nBACKUPDIR=\"/var/lib/pgbackrest\"\n\ncase $1 in\n configure)\n if ! test -e /etc/pgbackrest.conf; then"
},
{
"path": "debian/elephant-shed-pgbadger.dirs",
"chars": 17,
"preview": "var/lib/pgbadger\n"
},
{
"path": "debian/elephant-shed-pgbadger.install",
"chars": 251,
"preview": "pgbadger/pgbadger-generator lib/systemd/system-generators\npgbadger/pgbadger-run usr/share/elephant-shed\npgbadger/p"
},
{
"path": "debian/elephant-shed-pgbadger.postinst",
"chars": 209,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n if test -d /var/lib/pgbadger; then\n chown postgres:postgres /var/li"
},
{
"path": "debian/elephant-shed-portal.install",
"chars": 236,
"preview": "doc/_build/html usr/share/elephant-shed/doc\nportal/cgi-bin usr/lib\nportal/elephant-shed.conf etc/apache2/sites-available"
},
{
"path": "debian/elephant-shed-portal.lintian-overrides",
"chars": 113,
"preview": "elephant-shed-portal: extra-license-file usr/share/doc/elephant-shed-portal/html/_sources/chapter/license.md.txt\n"
},
{
"path": "debian/elephant-shed-portal.postinst",
"chars": 533,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n # create elephant-shed group\n addgroup --system elephant-shed\n\n # "
},
{
"path": "debian/elephant-shed-postgresql.install",
"chars": 182,
"preview": "postgresql/elephant-shed.conf etc/postgresql-common/createcluster.d\npostgresql/es_ctlcluster usr/bin\npostgresql/rsyslog-"
},
{
"path": "debian/elephant-shed-postgresql.postinst",
"chars": 819,
"preview": "#!/bin/sh\n\nset -e\n\ncase $1 in\n configure)\n # make sure postgres is in the shadow group\n if ! id -Gn postgres | gr"
},
{
"path": "debian/elephant-shed-powa.install",
"chars": 36,
"preview": "powa/update-powa-web-config usr/bin\n"
},
{
"path": "debian/elephant-shed-powa.postinst",
"chars": 127,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n update-powa-web-config\n systemctl restart powa-web\n ;;\nesac\n\n#DEBH"
},
{
"path": "debian/elephant-shed-prometheus-node-exporter.install",
"chars": 177,
"preview": "node-exporter/elephant-shed-prometheus-node-exporter etc/default\nnode-exporter/elephant-shed-prometheus-node-exporter.co"
},
{
"path": "debian/elephant-shed-prometheus-node-exporter.mainscript",
"chars": 385,
"preview": "mv_conffile /etc/default/elephant-shed-prometheus-node-exporter /etc/default/elephant-shed-prometheus-node-exporter 1.1~"
},
{
"path": "debian/elephant-shed-prometheus-node-exporter.postinst",
"chars": 510,
"preview": "#!/bin/sh\n\nset -e\n\nHOSTNAME=`hostname -f`\n\ncase $1 in\n configure)\n systemctl daemon-reload\n\n deb-systemd-helper e"
},
{
"path": "debian/elephant-shed-prometheus-sql-exporter.install",
"chars": 333,
"preview": "sql-exporter/elephant-shed.conf lib/systemd/system/prometheus-sql-exporter.service.d\nsql-exporter/prometheus-sql-exporte"
},
{
"path": "debian/elephant-shed-prometheus-sql-exporter.lintian-overrides",
"chars": 151,
"preview": "# use systemctl directly because deb-systemd-invoke doesn't like static units\nelephant-shed-prometheus-sql-exporter: mai"
},
{
"path": "debian/elephant-shed-prometheus-sql-exporter.maintscript",
"chars": 114,
"preview": "mv_conffile /etc/prometheus-sql-exporter.yml.in /etc/prometheus-sql-exporter.yml.in 1.1~ elephant-shed-prometheus\n"
},
{
"path": "debian/elephant-shed-prometheus-sql-exporter.postinst",
"chars": 612,
"preview": "#!/bin/sh\n\nset -e\n\nHOSTNAME=$(hostname -f)\n\ncase $1 in\n configure)\n systemctl daemon-reload\n\n systemctl enable pr"
},
{
"path": "debian/elephant-shed-prometheus-sql-exporter.postrm",
"chars": 189,
"preview": "#!/bin/sh\n\nset -e\n\ncase $1 in\n purge)\n rm -f /var/run/postgresql/prometheus-sql-exporter.yml\n # old file location"
},
{
"path": "debian/elephant-shed-prometheus.install",
"chars": 184,
"preview": "prometheus/elephant-shed-prometheus etc/default\nprometheus/elephant-shed-prometheus.conf etc/systemd/system/prometheus.s"
},
{
"path": "debian/elephant-shed-prometheus.postinst",
"chars": 188,
"preview": "#!/bin/sh\n\nset -e\n\ncase $1 in\n configure)\n systemctl daemon-reload\n\n deb-systemd-helper enable prometheus.service"
},
{
"path": "debian/elephant-shed-shellinabox.postinst",
"chars": 312,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n if ! grep -q '^SHELLINABOX_ARGS.*--localhost-only' /etc/default/shellina"
},
{
"path": "debian/elephant-shed-tmate.install",
"chars": 21,
"preview": "tmate/tmate.conf etc\n"
},
{
"path": "debian/elephant-shed-tmate.lintian-overrides",
"chars": 166,
"preview": "# symlinks in /etc/skel are copied over to home directories, so must be absolute\nelephant-shed-tmate: symlink-should-be-"
},
{
"path": "debian/elephant-shed-tmate.postinst",
"chars": 163,
"preview": "#!/bin/sh\n\nset -eu\n\ncase $1 in\n configure)\n if ! test -e /root/.tmate.conf; then\n ln -s /etc/tmate.conf /root/."
},
{
"path": "debian/rules",
"chars": 1269,
"preview": "#!/usr/bin/make -f\n\nTMATE_VERSION = $(shell dpkg-query --showformat '$${Version}' --show tmate)\nTMATE_24 = $(shell dpkg "
},
{
"path": "debian/source/format",
"chars": 13,
"preview": "3.0 (native)\n"
},
{
"path": "doc/.gitignore",
"chars": 7,
"preview": "_build\n"
},
{
"path": "doc/Makefile",
"chars": 7634,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "doc/chapter/components.md",
"chars": 24550,
"preview": "# Components\n\n## PostgreSQL\n\nThe Elephant Shed is based on `postgresql-common`, the default PostgreSQL\nmanagement system"
},
{
"path": "doc/chapter/first-steps.md",
"chars": 2285,
"preview": "# First Steps\n\nLog into your web browser and go to the server's IP address (e.g.\n<https://your-server/>). The default se"
},
{
"path": "doc/chapter/installation.md",
"chars": 4851,
"preview": "\n# Installation\n\nElephant Shed consists of the following Debian packages and their dependencies:\n\n * `elephant-shed`:\n "
},
{
"path": "doc/chapter/intro.md",
"chars": 1237,
"preview": "# Intro\nElephant Shed is a web-based PostgreSQL management front-end that bundles\nseveral utilities and applications for"
},
{
"path": "doc/chapter/issues.md",
"chars": 635,
"preview": "# Known Bugs and Issues\n\n## PostgreSQL\n\n * The `prometheus-sql-exporter` monitoring agent is permanently keeping\n co"
},
{
"path": "doc/chapter/license.md",
"chars": 215,
"preview": "# License\n\nThe Elephant Shed itself is licensed under the GPLv3 (<https://www.gnu.org/licenses/gpl-3.0.de.html>).\n\nAll b"
},
{
"path": "doc/chapter/support.md",
"chars": 1279,
"preview": "# Support and more\n## Do you have any question or want to know more?\n\n* **Project page** [elephant-shed.io](https://elep"
},
{
"path": "doc/chapter/users.md",
"chars": 470,
"preview": "# Users\n\nThe web interface is password protected (HTTP basic authentication) and uses the system\nusers via PAM. When dep"
},
{
"path": "doc/conf.py",
"chars": 12154,
"preview": "# -*- coding: utf-8 -*-\n#\n# elephant-shed documentation build configuration file, created by\n# sphinx-quickstart on Fri "
},
{
"path": "doc/index.rst",
"chars": 498,
"preview": ".. elephant-shed documentation master file, created by\n sphinx-quickstart on Fri Dec 15 14:52:01 2017.\n You can adap"
},
{
"path": "grafana/README",
"chars": 227,
"preview": "Prometheus queries\n------------------\n\nOrdering: `job=~'$job', host=~'$host', sql_job=~'$cluster'`, then other fields\n\nC"
},
{
"path": "grafana/dashboard-sed",
"chars": 456,
"preview": "#!/bin/sh\n\n# To use, select Share > Export > Save to file in Grafana, and do:\n# grafana/dashboard-sed ~/Desktop/PostgreS"
},
{
"path": "grafana/datasource_prometheus.yml",
"chars": 1338,
"preview": "---\n# config file version\napiVersion: 1\n\n# list of datasources to insert/update depending\n# whats available in the datab"
},
{
"path": "grafana/elephant-shed-grafana",
"chars": 125,
"preview": "# Set go garbage collector to clean up more frequently\nGOGC=40\nGOMAXPROCS=4\nCONF_FILE=/etc/grafana/elephant-shed-grafana"
},
{
"path": "grafana/elephant-shed-grafana.conf",
"chars": 61,
"preview": "[Service]\nEnvironmentFile=/etc/default/elephant-shed-grafana\n"
},
{
"path": "grafana/elephant-shed-grafana.ini",
"chars": 11985,
"preview": "##################### Grafana Configuration Example #####################\n#\n# Everything has defaults so you only need t"
},
{
"path": "grafana/node_overview.json",
"chars": 473439,
"preview": "{\n \"__requires\": [\n {\n \"type\": \"panel\",\n \"id\": \"bargauge\",\n \"name\": \"Bar gauge\",\n \"version\": \"\"\n"
},
{
"path": "grafana/node_overview.yml",
"chars": 213,
"preview": "---\n# config file version\napiVersion: 1\n\nproviders:\n- name: 'node_overview'\n orgId: 1\n folder: ''\n type: file\n optio"
},
{
"path": "grafana/postgresql_server_overview.json",
"chars": 153579,
"preview": "{\n \"__inputs\": [\n {\n \"name\": \"DS_PROMETHEUS\",\n \"label\": \"DS_PROMETHEUS\",\n \"description\": \"\",\n \"t"
},
{
"path": "grafana/postgresql_server_overview.yml",
"chars": 239,
"preview": "---\n# config file version\napiVersion: 1\n\nproviders:\n- name: 'postgresql_server_overview'\n orgId: 1\n folder: ''\n type:"
},
{
"path": "node-exporter/elephant-shed-prometheus-node-exporter",
"chars": 11065,
"preview": "# Set go garbage collector to clean up more frequently\nGOGC=40\n# Use only one thread\nGOMAXPROCS=1\n\n# Set the command-lin"
},
{
"path": "node-exporter/elephant-shed-prometheus-node-exporter.conf",
"chars": 78,
"preview": "[Service]\nEnvironmentFile=/etc/default/elephant-shed-prometheus-node-exporter\n"
},
{
"path": "omnidb/wsgi.py",
"chars": 361,
"preview": "import os\n\nfrom OmniDB import custom_settings\ncustom_settings.DEV_MODE = False\ncustom_settings.HOME_DIR = os.path.join(o"
},
{
"path": "pgbackrest/pgbackrest-archivecommand",
"chars": 973,
"preview": "#!/bin/bash\n\n# This wrapper around pgbackrest makes sure that the stanza exists for\n# a configured archived command.\n\n# "
},
{
"path": "pgbackrest/pgbackrest-incr@.service",
"chars": 352,
"preview": "# /lib/systemd/system/pgbackrest-incr@.service\n[Unit]\nDescription=Backup PostgreSQL cluster %i using pgBackRest, increme"
},
{
"path": "pgbackrest/pgbackrest-incr@.timer",
"chars": 232,
"preview": "# /lib/systemd/system/pgbackrest-incr@.timer\n[Unit]\nDescription=Automated pgBackRest incremental backup of PostgreSQL cl"
},
{
"path": "pgbackrest/pgbackrest-run",
"chars": 884,
"preview": "#!/bin/bash\n\nset -eu\n\nPGCLUSTER=\"$1\" # in 9.6-main format\nBACKUPTYPE=\"$2\" # type of backup (full|incr|diff)\nSTATUSDIR=\"/"
},
{
"path": "pgbackrest/pgbackrest-toggle-archiving",
"chars": 1929,
"preview": "#!/bin/bash\n\n# This script controls whether to enable or disable archiving using pgbackrest.\n# Any archive_command that "
},
{
"path": "pgbackrest/pgbackrest-toggle-archiving@.service",
"chars": 333,
"preview": "# /lib/systemd/system/pgbackrest-toggle-archiving@.service\n[Unit]\nDescription=pgBackrest - Toggle PostgreSQL archiving f"
},
{
"path": "pgbackrest/pgbackrest@.service",
"chars": 325,
"preview": "# /lib/systemd/system/pgbackrest@.service\n[Unit]\nDescription=Backup PostgreSQL cluster %i using pgBackRest, always creat"
},
{
"path": "pgbackrest/pgbackrest@.timer",
"chars": 216,
"preview": "# /lib/systemd/system/pgbackrest@.timer\n[Unit]\nDescription=Automated pgBackRest full backup of PostgreSQL cluster %i\n\n[T"
},
{
"path": "pgbadger/pgbadger-generator",
"chars": 398,
"preview": "#!/bin/sh\n\nset -eu\n\ngendir=\"$1\"\nwantdir=\"$1/pgbadger.service.wants\"\npgbadgerservice=\"/lib/systemd/system/pgbadger@.servi"
},
{
"path": "pgbadger/pgbadger-run",
"chars": 765,
"preview": "#!/bin/bash\n\nset -eu\n\nPGCLUSTER=\"$1\" # in 9.6-main format (%i)\nREPORTDIR=\"/var/lib/pgbadger/$PGCLUSTER\"\n\nINFO=\"$(pg_lscl"
},
{
"path": "pgbadger/pgbadger.service",
"chars": 182,
"preview": "# /lib/systemd/system/pgbadger.service\n[Unit]\nDescription=pgBadger reports for all PostgreSQL clusters\n\n[Service]\nType=o"
},
{
"path": "pgbadger/pgbadger.timer",
"chars": 198,
"preview": "# /lib/systemd/system/pgbadger.timer\n[Unit]\nDescription=Run pgbadger.service every night\n\n[Timer]\nOnBootSec=120\nOnCalend"
},
{
"path": "pgbadger/pgbadger@.service",
"chars": 277,
"preview": "# /lib/systemd/system/pgbadger@.service\n[Unit]\nDescription=pgBadger report for PostgreSQL cluster %I\nPartOf=pgbadger.ser"
},
{
"path": "portal/cgi-bin/backrest.pl",
"chars": 1232,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse Template;\nuse CGI;\nuse CGI::Carp 'fatalsToBrowser';\nuse Data::Dumper;\n\nmy"
},
{
"path": "portal/cgi-bin/error.pl",
"chars": 547,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse PgCommon;\nuse Template;\n\nmy $template = Template->new({\n INCLUDE_PATH =>"
},
{
"path": "portal/cgi-bin/index_footer.pl",
"chars": 272,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse Template;\n\nmy $template = Template->new({\n INCLUDE_PATH => '/usr/share/e"
},
{
"path": "portal/cgi-bin/index_header.pl",
"chars": 422,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse Template;\n\nmy $template = Template->new({\n INCLUDE_PATH => '/usr/share/e"
},
{
"path": "portal/cgi-bin/notloggedin.pl",
"chars": 400,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse PgCommon;\nuse Template;\n\nmy $template = Template->new({\n INCLUDE_PATH =>"
},
{
"path": "portal/cgi-bin/portalmain.pl",
"chars": 1731,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse PgCommon;\nuse Template;\n\nmy $pgbadgerdir = \"/var/lib/pgbadger\";\nmy $backu"
},
{
"path": "portal/cgi-bin/support.pl",
"chars": 586,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse Template;\n\nmy $template_path = '/usr/share/elephant-shed/template';\nmy $s"
},
{
"path": "portal/elephant-shed.conf",
"chars": 7001,
"preview": "<VirtualHost *:80>\n RewriteEngine On\n RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]\n</VirtualHost>\n\n<VirtualHost"
},
{
"path": "portal/static/css/elephant-shed.css",
"chars": 2525,
"preview": "/* General */\nbody {\n font-family: Arial, Sans-serif;\n}\n\n/* Links */\na {\n text-decoration: none;\n}\na:link {\n co"
},
{
"path": "portal/static/css/esmenu.css",
"chars": 1417,
"preview": ".esmenu hr {\n background: red;\n height: 0px;\n border-top: 0;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.esmenu:hover hr"
},
{
"path": "portal/template/backrest.html",
"chars": 282,
"preview": "[% INCLUDE header.html %]\n\n<div class=\"container col-6 col-offset-3 text-justify\">\n [% FOREACH file IN BACKUPS %]\n <h2"
},
{
"path": "portal/template/error.html",
"chars": 374,
"preview": "[% INCLUDE header.html %]\n\n<div class=\"container col-6 col-offset-3 text-justify\">\n Sorry, a [% REDIRECT_STATUS %] erro"
},
{
"path": "portal/template/footer.html",
"chars": 406,
"preview": "<div class=\"container-fluid el-footer\" align=\"center\">\n<a target=\"_blank\" href=\"https://elephant-shed.io\">Elephant Shed<"
},
{
"path": "portal/template/header.html",
"chars": 1107,
"preview": "<html>\n <head>\n <title>[% TITLE %]</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n "
},
{
"path": "portal/template/notloggedin.html",
"chars": 727,
"preview": "[% INCLUDE header.html %]\n\n<div class=\"container col-2 col-offset-5\">\n <img src=\"/image/button_home.png\" width=\"200\">\n<"
},
{
"path": "portal/template/portalmain.html",
"chars": 6777,
"preview": "[% INCLUDE header.html %]\n\n<script>\n function toggleHidden(cluster) {\n var menu = document.getElementById('cluster"
},
{
"path": "portal/template/support.html",
"chars": 2195,
"preview": "[% INCLUDE header.html %]\n\n<div class=\"container col-6 col-offset-3 text-justify\">\n <h2 class=\"text-center\">The Elephan"
},
{
"path": "postgresql/elephant-shed.conf",
"chars": 1465,
"preview": "# Default data directory.\n#data_directory = '/var/lib/postgresql/%v/%c'\n\n# Default directory for transaction logs\n#waldi"
},
{
"path": "postgresql/es_ctlcluster",
"chars": 4342,
"preview": "#!/bin/sh\n\n# This script configures PostgreSQL clusters for usage with Elephant Shed.\n\n# Usage: es_ctlcluster <cluster> "
},
{
"path": "postgresql/rsyslog-postgresql-discard.conf",
"chars": 47,
"preview": "if $programname startswith 'postgres' then stop"
},
{
"path": "powa/update-powa-web-config",
"chars": 1618,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse PgCommon;\nuse JSON;\nuse File::Temp qw(tempfile);\n\nmy $powaconf = \"/etc/po"
},
{
"path": "prometheus/elephant-shed-prometheus",
"chars": 3753,
"preview": "# Set go garbage collector to clean up more frequently\nGOGC=40\nGOMAXPROCS=2\n\n# Set the command-line arguments to pass to"
},
{
"path": "prometheus/elephant-shed-prometheus.conf",
"chars": 64,
"preview": "[Service]\nEnvironmentFile=/etc/default/elephant-shed-prometheus\n"
},
{
"path": "prometheus/elephant-shed-prometheus.yml",
"chars": 1426,
"preview": "# The Elephant Shed's Prometheus config\n\nglobal:\n scrape_interval: 30s\n\n # Attach these labels to any time series or a"
},
{
"path": "rpm/56-authnz_external.conf",
"chars": 174,
"preview": "# Load authnz_external for elephant-shed-portal authentication\n# (This file is part of elephant-shed-portal)\nLoadModule "
},
{
"path": "rpm/README",
"chars": 997,
"preview": "== CentOS/RHEL 7 package installation instructions ==\n\nelephant-shed depends on EPEL and PGDG software repositories. You"
},
{
"path": "rpm/elephant-shed.spec",
"chars": 9826,
"preview": "Name: elephant-shed\nVersion: %{package_version}\nRelease: %{package_release}%{?dist}\nBuildArch: "
},
{
"path": "rpm/tmate.spec",
"chars": 750,
"preview": "Name: tmate\nVersion: 2.2.1\nRelease: 1\nLicense: BSD\nSummary: Instant Terminal Sharing\nBuildArch: x86_64\nSource: https://g"
},
{
"path": "sql-exporter/SAMPLE.yml",
"chars": 845,
"preview": "# Files here named *.yml will be used by update-prometheus-sql-exporter-config\n# to update the prometheus-sql-exporter c"
},
{
"path": "sql-exporter/activity.yml",
"chars": 1848,
"preview": "# queries run once per cluster (via the 'postgres' database)\n\n- name: \"running_queries\"\n help: \"number of running queri"
},
{
"path": "sql-exporter/elephant-shed.conf",
"chars": 579,
"preview": "[Unit]\n# forget default config file location\nConditionPathExists=\n# wait for PostgreSQL to start up\nAfter=postgresql.ser"
},
{
"path": "sql-exporter/io.yml",
"chars": 1386,
"preview": "# queries run once per cluster (via the 'postgres' database)\n\n- name: \"pg_stat_io\"\n help: \"I/O statistics\"\n scope: clu"
},
{
"path": "sql-exporter/prometheus-sql-exporter-restart.service",
"chars": 298,
"preview": "[Unit]\nDescription=Restart prometheus-sql-exporter to update config based on clusters and databases present on the syste"
},
{
"path": "sql-exporter/prometheus-sql-exporter-restart.timer",
"chars": 204,
"preview": "[Unit]\nDescription=Restart prometheus-sql-exporter every 10 minutes to update config based on clusters and databases pre"
},
{
"path": "sql-exporter/queries.yml",
"chars": 16190,
"preview": "# queries run once per cluster (via the 'postgres' database)\n\n- name: \"server\"\n help: \"Server version, role and start t"
},
{
"path": "sql-exporter/replication.yml",
"chars": 1455,
"preview": "# queries run once per cluster (via the 'postgres' database)\n\n- name: \"archive_ready\"\n help: \"number of WAL files waiti"
},
{
"path": "sql-exporter/update-prometheus-sql-exporter-config",
"chars": 4643,
"preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse PgCommon;\nuse Storable qw(dclone);\nuse YAML;\n\n# from list of queries, rem"
},
{
"path": "sql-exporter/wal.yml",
"chars": 2809,
"preview": "# queries run once per cluster (via the 'postgres' database)\n\n- name: \"checkpoints\"\n help: \"requested/timed checkpoints"
},
{
"path": "tmate/tmate.conf",
"chars": 1136,
"preview": "# credativ tmate.conf\n# This settings configure tmate to use tmate.credativ.com\nset -g tmate-server-host \"tmate.credativ"
},
{
"path": "vagrant/.gitignore",
"chars": 35,
"preview": ".vagrant\n*.retry\nfact_cache/\n*.box\n"
},
{
"path": "vagrant/Vagrantfile",
"chars": 3875,
"preview": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\n# All Vagrant configuration is done below. The \"2\" in Vagrant.configure\n# conf"
},
{
"path": "vagrant/Vagrantfile.template",
"chars": 1662,
"preview": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n # The most common configuration options a"
},
{
"path": "vagrant/ansible.cfg",
"chars": 336,
"preview": "[defaults]\ninventory = inventory\nnocows = True\ninterpreter_python=/usr/bin/python3\nansible_python_interpreter=/usr/bin/p"
},
{
"path": "vagrant/elephant-shed.yml",
"chars": 2199,
"preview": "#!/usr/bin/ansible-playbook\n# Copyright © 2017-2019 credativ GmbH <info@credativ.de>\n#\n# This program is free software: "
},
{
"path": "vagrant/files/git/gitconfig",
"chars": 138,
"preview": "# This is Git's per-user configuration file.\n[user]\n# Please adapt and uncomment the following lines:\n#\tname = root\n#\tem"
},
{
"path": "vagrant/files/grafana-key.10458545.asc",
"chars": 2460,
"preview": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQGNBGTnhmkBDADUE+SzjRRyitIm1siGxiHlIlnn6KO4C4GfEuV+PNzqxvwYO+1r\nmcKlGDU0ugo8ohXru"
},
{
"path": "vagrant/files/postgresql/ACCC4CF8.asc",
"chars": 4812,
"preview": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBE6XR8IBEACVdDKT2HEH1IyHzXkb4nIWAY7echjRxo7MTcj4vbXAyBKOfjja\nUrBEJWHN6fjKJXOYW"
},
{
"path": "vagrant/files/postgresql/pg_hba.conf",
"chars": 4776,
"preview": "# PostgreSQL Client Authentication Configuration File\n# ===================================================\n#\n# Refer to"
},
{
"path": "vagrant/group_vars/all",
"chars": 1891,
"preview": "---\n# Partitioning\npartitioning: False\ncreat_test_loops: False\nvg_data_devices: /dev/sda1, /dev/sdb1\nvg_data: vg_data\nlv"
},
{
"path": "vagrant/group_vars/dev",
"chars": 214,
"preview": "---\nuse_local_repo: True\n\n# PostgreSQL Tuning\nmax_connections: 100\nshared_buffers: 1GB\nwork_mem: 32MB\nmaintenance_work_m"
},
{
"path": "vagrant/group_vars/openpower",
"chars": 527,
"preview": "---\nuse_local_repo: False\n\n# Partitioning\npartitioning: True\nvg_data_devices: /dev/sda\nlv_wal_size: 50g\n\nvg_backup_devic"
},
{
"path": "vagrant/group_vars/test",
"chars": 327,
"preview": "---\n# The goal of this ansible configuration is to test all components.\n# However, no partitioning tests are done.\n\nuse_"
},
{
"path": "vagrant/group_vars/test-with-disks",
"chars": 444,
"preview": "---\n# The goal of this ansible configuration is to test all components,\n# including partitioning.\n\nuse_local_repo: True\n"
},
{
"path": "vagrant/group_vars/x86-big",
"chars": 527,
"preview": "---\nuse_local_repo: False\n\n# Partitioning\npartitioning: True\nvg_data_devices: /dev/sdc\nlv_wal_size: 50g\n\nvg_backup_devic"
},
{
"path": "vagrant/handlers.yml",
"chars": 1580,
"preview": "- name: apt-get update\n apt:\n update_cache: true\n\n- name: update grub2\n command: update-grub # on Debian\n\n- name: a"
},
{
"path": "vagrant/inventory",
"chars": 85,
"preview": "[vm]\n#elephant-shed.dev.credativ.lan ansible_host=172.26.251.138 ansible_user=debian\n"
},
{
"path": "vagrant/openstack/Vagrantfile",
"chars": 1000,
"preview": "require 'vagrant-openstack-plugin'\n\nVagrant.configure('2') do |config|\n\n config.vm.box = \"sharpie/dummy\"\n\n config.ssh."
},
{
"path": "vagrant/tasks/apache2.yml",
"chars": 229,
"preview": "- name: Configure apache2 to use less resources\n template:\n src: templates/apache2/mpm_event.conf.j2\n dest: /etc/"
},
{
"path": "vagrant/tasks/config-backup.yml",
"chars": 1813,
"preview": "---\n- name: Set pgBackrest global repo-path\n ini_file:\n dest: /etc/pgbackrest.conf\n state: present\n section: '"
},
{
"path": "vagrant/tasks/config-system.yml",
"chars": 2187,
"preview": "# BASIC TUNING\n- name: Generate ssh keys for user root\n user:\n name: root\n generate_ssh_key: yes\n\n- name: Create "
},
{
"path": "vagrant/tasks/ferm.yml",
"chars": 520,
"preview": "- name: Create ferm.d\n file:\n path: /etc/ferm/ferm.d\n state: directory\n owner: root\n group: adm\n mode: 0"
},
{
"path": "vagrant/tasks/grafana.yml",
"chars": 437,
"preview": "---\n- name: Get Grafana key\n apt_key:\n data: \"{{ lookup('file', 'grafana-key.10458545.asc') }}\"\n id: 10458545\n "
},
{
"path": "vagrant/tasks/packages.yml",
"chars": 2940,
"preview": "# pgapt\n- name: Install pgdg Apt key\n apt_key:\n data: \"{{ lookup('file', 'postgresql/ACCC4CF8.asc') }}\"\n id: ACCC"
},
{
"path": "vagrant/tasks/partitioning.yml",
"chars": 1941,
"preview": "---\n- name: Create loop devices for testing\n shell: |\n dd if=/dev/zero of=/tmp/loop0 bs=1024 count=1000000\n dd if"
},
{
"path": "vagrant/tasks/postgresql.yml",
"chars": 3246,
"preview": "# PostgreSQL\n\n- name: Install postgresql-common\n package:\n name: \"{{ item }}\"\n state: present\n with_items:\n - p"
},
{
"path": "vagrant/tasks/repository-local.yml",
"chars": 880,
"preview": "- name: Install apt-utils\n package:\n name: apt-utils\n state: present\n\n- name: Create directory /srv/repository\n "
},
{
"path": "vagrant/templates/apache2/mpm_event.conf.j2",
"chars": 705,
"preview": "# event MPM\n# StartServers: initial number of server processes to start\n# MinSpareThreads: minimum number of worker thre"
},
{
"path": "vagrant/templates/ferm/elephant-shed.conf.j2",
"chars": 211,
"preview": "chain INPUT {\n # allow access to the web interface\n proto tcp dport (http https) ACCEPT;\n\n # allow "
},
{
"path": "vagrant/templates/ferm/ferm.conf.j2",
"chars": 1088,
"preview": "# -*- shell-script -*-\n#\n# Configuration file for ferm(1).\n#\ndomain (ip ip6) {\n table filter {\n chain INPUT {"
},
{
"path": "vagrant/templates/postgres/postgres-limits.conf.j2",
"chars": 98,
"preview": "postgres hard nofile {{ nofiles_hard }}\npostgres soft nofile {{ nofiles_soft }}\n"
},
{
"path": "vagrant/templates/postgresql-common/performance-tuning.conf.j2",
"chars": 2107,
"preview": "#------------------------------------------------------------------------------\n# CONNECTIONS AND AUTHENTICATION\n#------"
},
{
"path": "vagrant/vagrantpackage.sh",
"chars": 115,
"preview": "#!/bin/sh\n\nrm -vf elephant-shed.box\n\nvagrant package --vagrantfile Vagrantfile.template --output elephant-shed.box\n"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the credativ/elephant-shed GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 168 files (899.6 KB), approximately 225.8k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.