mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 13:44:08 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6039d71d | ||
|
|
c5f1618231 | ||
|
|
7dd9fa890f | ||
|
|
b62554ceff |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
|||||||
|
## 2.10.1 2021-12-22 <milenkara@github>
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Allow for choosing region when backing up to S3
|
||||||
|
|
||||||
|
## 2.10.0 2021-12-22 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Revert back to Postgresql 14 from packages as its now in the repositories
|
||||||
|
- Fix for Zabbix Monitoring
|
||||||
|
|
||||||
|
|
||||||
## 2.9.7 2021-12-15 <dave at tiredofit dot ca>
|
## 2.9.7 2021-12-15 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
102
Dockerfile
102
Dockerfile
@@ -5,104 +5,8 @@ ENV MSSQL_VERSION=17.8.1.1-1 \
|
|||||||
CONTAINER_ENABLE_MESSAGING=FALSE \
|
CONTAINER_ENABLE_MESSAGING=FALSE \
|
||||||
CONTAINER_ENABLE_MONITORING=TRUE
|
CONTAINER_ENABLE_MONITORING=TRUE
|
||||||
|
|
||||||
ENV LANG=en_US.utf8 \
|
|
||||||
PG_MAJOR=14 \
|
|
||||||
PG_VERSION=14.0 \
|
|
||||||
PGDATA=/var/lib/postgresql/data
|
|
||||||
|
|
||||||
### Create User Accounts
|
|
||||||
RUN set -ex && \
|
|
||||||
addgroup -g 70 postgres && \
|
|
||||||
adduser -S -D -H -h /var/lib/postgresql -s /bin/sh -G postgres -u 70 postgres && \
|
|
||||||
mkdir -p /var/lib/postgresql && \
|
|
||||||
chown -R postgres:postgres /var/lib/postgresql && \
|
|
||||||
\
|
|
||||||
### Install Dependencies
|
|
||||||
apk update && \
|
|
||||||
apk upgrade && \
|
|
||||||
apk add \
|
|
||||||
openssl \
|
|
||||||
&& \
|
|
||||||
\
|
|
||||||
apk add --no-cache --virtual .postgres-build-deps \
|
|
||||||
bison \
|
|
||||||
build-base \
|
|
||||||
coreutils \
|
|
||||||
dpkg-dev \
|
|
||||||
dpkg \
|
|
||||||
flex \
|
|
||||||
gcc \
|
|
||||||
icu-dev \
|
|
||||||
libc-dev \
|
|
||||||
libedit-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxslt-dev \
|
|
||||||
linux-headers \
|
|
||||||
make \
|
|
||||||
openssl-dev \
|
|
||||||
perl-utils \
|
|
||||||
perl-ipc-run \
|
|
||||||
util-linux-dev \
|
|
||||||
zlib-dev \
|
|
||||||
&& \
|
|
||||||
\
|
|
||||||
### Build Postgresql
|
|
||||||
mkdir -p /usr/src/postgresql && \
|
|
||||||
curl -sSL "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2" | tar xvfj - --strip 1 -C /usr/src/postgresql && \
|
|
||||||
cd /usr/src/postgresql && \
|
|
||||||
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
|
|
||||||
# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
|
|
||||||
awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new && \
|
|
||||||
grep '/var/run/postgresql' src/include/pg_config_manual.h.new && \
|
|
||||||
mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h && \
|
|
||||||
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && \
|
|
||||||
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
|
|
||||||
wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb' && \
|
|
||||||
wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb' && \
|
|
||||||
./configure \
|
|
||||||
--build="$gnuArch" \
|
|
||||||
--enable-integer-datetimes \
|
|
||||||
--enable-thread-safety \
|
|
||||||
--enable-tap-tests \
|
|
||||||
--disable-rpath \
|
|
||||||
--with-uuid=e2fs \
|
|
||||||
--with-gnu-ld \
|
|
||||||
--with-pgport=5432 \
|
|
||||||
--with-system-tzdata=/usr/share/zoneinfo \
|
|
||||||
--prefix=/usr/local \
|
|
||||||
--with-includes=/usr/local/include \
|
|
||||||
--with-libraries=/usr/local/lib \
|
|
||||||
--with-openssl \
|
|
||||||
--with-libxml \
|
|
||||||
--with-libxslt \
|
|
||||||
--with-icu \
|
|
||||||
&& \
|
|
||||||
\
|
|
||||||
make -j "$(nproc)" world && \
|
|
||||||
make install-world && \
|
|
||||||
make -C contrib install && \
|
|
||||||
runDeps="$( \
|
|
||||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
|
||||||
| tr ',' '\n' \
|
|
||||||
| sort -u \
|
|
||||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
|
||||||
)" && \
|
|
||||||
apk add -t .postgres-additional-deps \
|
|
||||||
$runDeps \
|
|
||||||
&& \
|
|
||||||
\
|
|
||||||
### Cleanup
|
|
||||||
apk del .postgres-build-deps && \
|
|
||||||
cd / && \
|
|
||||||
rm -rf \
|
|
||||||
/usr/src/postgresql \
|
|
||||||
/usr/local/share/doc \
|
|
||||||
/usr/local/share/man && \
|
|
||||||
find /usr/local -name '*.a' -delete && \
|
|
||||||
rm -rf /var/cache/apk/* && \
|
|
||||||
\
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
set -ex && \
|
RUN set -ex && \
|
||||||
apk update && \
|
apk update && \
|
||||||
apk upgrade && \
|
apk upgrade && \
|
||||||
apk add -t .db-backup-build-deps \
|
apk add -t .db-backup-build-deps \
|
||||||
@@ -123,8 +27,8 @@ RUN set -ex && \
|
|||||||
mongodb-tools \
|
mongodb-tools \
|
||||||
libressl \
|
libressl \
|
||||||
pigz \
|
pigz \
|
||||||
#postgresql \ # To reactivate when it appears in official repos with Alpine 3.15
|
postgresql \
|
||||||
#postgresql-client \ # To reactivate when it appears in official repos with Alpine 3.15
|
postgresql-client \
|
||||||
redis \
|
redis \
|
||||||
sqlite \
|
sqlite \
|
||||||
xz \
|
xz \
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -31,29 +31,40 @@ Currently backs up CouchDB, InfluxDB, MySQL, MongoDB, Postgres, Redis servers.
|
|||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
- [About](#about)
|
- [github.com/tiredofit/docker-db-backup](#githubcomtiredofitdocker-db-backup)
|
||||||
- [Maintainer](#maintainer)
|
- [About](#about)
|
||||||
- [Table of Contents](#table-of-contents)
|
- [Maintainer](#maintainer)
|
||||||
- [Prerequisites and Assumptions](#prerequisites-and-assumptions)
|
- [Table of Contents](#table-of-contents)
|
||||||
- [Installation](#installation)
|
- [Prerequisites and Assumptions](#prerequisites-and-assumptions)
|
||||||
|
- [Installation](#installation)
|
||||||
- [Build from Source](#build-from-source)
|
- [Build from Source](#build-from-source)
|
||||||
- [Prebuilt Images](#prebuilt-images)
|
- [Prebuilt Images](#prebuilt-images)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Quick Start](#quick-start)
|
- [Quick Start](#quick-start)
|
||||||
- [Persistent Storage](#persistent-storage)
|
- [Persistent Storage](#persistent-storage)
|
||||||
- [Environment Variables](#environment-variables)
|
- [Environment Variables](#environment-variables)
|
||||||
- [Base Images used](#base-images-used)
|
- [Base Images used](#base-images-used)
|
||||||
- [Backing Up to S3 Compatible Services](#backing-up-to-s3-compatible-services)
|
- [Backing Up to S3 Compatible Services](#backing-up-to-s3-compatible-services)
|
||||||
- [Maintenance](#maintenance)
|
- [Maintenance](#maintenance)
|
||||||
- [Shell Access](#shell-access)
|
- [Shell Access](#shell-access)
|
||||||
- [Manual Backups](#manual-backups)
|
- [Manual Backups](#manual-backups)
|
||||||
- [Custom Scripts](#custom-scripts)
|
- [Custom Scripts](#custom-scripts)
|
||||||
- [Support](#support)
|
- [#### Example Post Script](#-example-post-script)
|
||||||
|
- [#### $1=EXIT_CODE (After running backup routine)](#-1exit_code-after-running-backup-routine)
|
||||||
|
- [#### $2=DB_TYPE (Type of Backup)](#-2db_type-type-of-backup)
|
||||||
|
- [#### $3=DB_HOST (Backup Host)](#-3db_host-backup-host)
|
||||||
|
- [#### #4=DB_NAME (Name of Database backed up](#-4db_name-name-of-database-backed-up)
|
||||||
|
- [#### $5=DATE (Date of Backup)](#-5date-date-of-backup)
|
||||||
|
- [#### $6=TIME (Time of Backup)](#--6time-time-of-backup)
|
||||||
|
- [#### $7=BACKUP_FILENAME (Filename of Backup)](#--7backup_filename-filename-of-backup)
|
||||||
|
- [#### $8=FILESIZE (Filesize of backup)](#--8filesize-filesize-of-backup)
|
||||||
|
- [#### $9=MD5_RESULT (MD5Sum if enabled)](#--9md5_result-md5sum-if-enabled)
|
||||||
|
- [Support](#support)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
- [Bugfixes](#bugfixes)
|
- [Bugfixes](#bugfixes)
|
||||||
- [Feature Requests](#feature-requests)
|
- [Feature Requests](#feature-requests)
|
||||||
- [Updates](#updates)
|
- [Updates](#updates)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
## Prerequisites and Assumptions
|
## Prerequisites and Assumptions
|
||||||
|
|
||||||
@@ -147,6 +158,7 @@ If `BACKUP_LOCATION` = `S3` then the following options are used.
|
|||||||
| `S3_KEY_SECRET` | S3 Key Secret |
|
| `S3_KEY_SECRET` | S3 Key Secret |
|
||||||
| `S3_PATH` | S3 Pathname to save to e.g. '`backup`' |
|
| `S3_PATH` | S3 Pathname to save to e.g. '`backup`' |
|
||||||
| `S3_PROTOCOL` | Use either `http` or `https` to access service - Default `https` |
|
| `S3_PROTOCOL` | Use either `http` or `https` to access service - Default `https` |
|
||||||
|
| `S3_REGION` | Define region in which bucket is defined. Example: `ap-northeast-2` |
|
||||||
|
|
||||||
|
|
||||||
## Maintenance
|
## Maintenance
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ if [ "$BACKUP_TYPE" = "S3" ] || [ "$BACKUP_TYPE" = "s3" ] || [ "$BACKUP_TYPE" =
|
|||||||
sanity_var S3_KEY_SECRET "S3 Key Secret"
|
sanity_var S3_KEY_SECRET "S3 Key Secret"
|
||||||
sanity_var S3_URI_STYLE "S3 URI Style (Virtualhost or Path)"
|
sanity_var S3_URI_STYLE "S3 URI Style (Virtualhost or Path)"
|
||||||
sanity_var S3_PATH "S3 Path"
|
sanity_var S3_PATH "S3 Path"
|
||||||
|
sanity_var S3_REGION "S3 Region"
|
||||||
file_env 'S3_KEY_ID'
|
file_env 'S3_KEY_ID'
|
||||||
file_env 'S3_KEY_SECRET'
|
file_env 'S3_KEY_SECRET'
|
||||||
fi
|
fi
|
||||||
@@ -419,7 +420,7 @@ move_backup() {
|
|||||||
"S3" | "s3" | "MINIO" | "minio" )
|
"S3" | "s3" | "MINIO" | "minio" )
|
||||||
export AWS_ACCESS_KEY_ID=${S3_KEY_ID}
|
export AWS_ACCESS_KEY_ID=${S3_KEY_ID}
|
||||||
export AWS_SECRET_ACCESS_KEY=${S3_KEY_SECRET}
|
export AWS_SECRET_ACCESS_KEY=${S3_KEY_SECRET}
|
||||||
export AWS_DEFAULT_REGION=ap-northeast-2
|
export AWS_DEFAULT_REGION=${S3_REGION}
|
||||||
|
|
||||||
[[ ( -n "${S3_HOST}" ) ]] && PARAM_AWS_ENDPOINT_URL=" --endpoint-url ${S3_PROTOCOL}://${S3_HOST}"
|
[[ ( -n "${S3_HOST}" ) ]] && PARAM_AWS_ENDPOINT_URL=" --endpoint-url ${S3_PROTOCOL}://${S3_HOST}"
|
||||||
|
|
||||||
@@ -504,7 +505,7 @@ print_debug "Backup routines Initialized on $(date)"
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
### Zabbix
|
### Zabbix
|
||||||
if var_true "$CONTAINER_ENABLE_MONITORING}" ; then
|
if var_true "${CONTAINER_ENABLE_MONITORING}" ; then
|
||||||
print_notice "Sending Backup Statistics to Zabbix"
|
print_notice "Sending Backup Statistics to Zabbix"
|
||||||
silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.size -o "$(stat -c%s "${DB_DUMP_TARGET}"/"${target}")"
|
silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.size -o "$(stat -c%s "${DB_DUMP_TARGET}"/"${target}")"
|
||||||
silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.datetime -o "$(date -r "${DB_DUMP_TARGET}"/"${target}" +'%s')"
|
silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.datetime -o "$(date -r "${DB_DUMP_TARGET}"/"${target}" +'%s')"
|
||||||
|
|||||||
@@ -1,515 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<zabbix_export>
|
|
||||||
<version>3.4</version>
|
|
||||||
<date>2018-02-02T19:04:27Z</date>
|
|
||||||
<groups>
|
|
||||||
<group>
|
|
||||||
<name>Discovered Containers</name>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<name>Templates</name>
|
|
||||||
</group>
|
|
||||||
</groups>
|
|
||||||
<templates>
|
|
||||||
<template>
|
|
||||||
<template>Service - ICMP</template>
|
|
||||||
<name>Service - ICMP (Ping)</name>
|
|
||||||
<description/>
|
|
||||||
<groups>
|
|
||||||
<group>
|
|
||||||
<name>Templates</name>
|
|
||||||
</group>
|
|
||||||
</groups>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>ICMP</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<items>
|
|
||||||
<item>
|
|
||||||
<name>ICMP ping</name>
|
|
||||||
<type>3</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>icmpping</key>
|
|
||||||
<delay>1m</delay>
|
|
||||||
<history>1w</history>
|
|
||||||
<trends>365d</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>3</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units/>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>0</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>ICMP</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap>
|
|
||||||
<name>Service state</name>
|
|
||||||
</valuemap>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<name>ICMP loss</name>
|
|
||||||
<type>3</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>icmppingloss</key>
|
|
||||||
<delay>1m</delay>
|
|
||||||
<history>1w</history>
|
|
||||||
<trends>365d</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>0</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units>%</units>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>0</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>ICMP</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap/>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<name>ICMP response time</name>
|
|
||||||
<type>3</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>icmppingsec</key>
|
|
||||||
<delay>1m</delay>
|
|
||||||
<history>1w</history>
|
|
||||||
<trends>365d</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>0</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units>s</units>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>0</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>ICMP</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap/>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
</items>
|
|
||||||
<discovery_rules/>
|
|
||||||
<httptests/>
|
|
||||||
<macros/>
|
|
||||||
<templates/>
|
|
||||||
<screens/>
|
|
||||||
</template>
|
|
||||||
<template>
|
|
||||||
<template>Zabbix - Container Agent</template>
|
|
||||||
<name>Zabbix - Container Agent</name>
|
|
||||||
<description/>
|
|
||||||
<groups>
|
|
||||||
<group>
|
|
||||||
<name>Discovered Containers</name>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<name>Templates</name>
|
|
||||||
</group>
|
|
||||||
</groups>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Packages</name>
|
|
||||||
</application>
|
|
||||||
<application>
|
|
||||||
<name>Zabbix agent</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<items>
|
|
||||||
<item>
|
|
||||||
<name>Hostname of Container</name>
|
|
||||||
<type>0</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>agent.hostname</key>
|
|
||||||
<delay>1h</delay>
|
|
||||||
<history>1w</history>
|
|
||||||
<trends>0</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>1</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units/>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>3</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Zabbix agent</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap/>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<name>Contaner OS</name>
|
|
||||||
<type>0</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>agent.os</key>
|
|
||||||
<delay>6h</delay>
|
|
||||||
<history>30d</history>
|
|
||||||
<trends>0</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>1</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units/>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>5</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Zabbix agent</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap/>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<name>Zabbix Agent ping</name>
|
|
||||||
<type>0</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>agent.ping</key>
|
|
||||||
<delay>1m</delay>
|
|
||||||
<history>1w</history>
|
|
||||||
<trends>365d</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>3</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units/>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description>The agent always returns 1 for this item. It could be used in combination with nodata() for availability check.</description>
|
|
||||||
<inventory_link>0</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Zabbix agent</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap>
|
|
||||||
<name>Zabbix agent ping status</name>
|
|
||||||
</valuemap>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<name>Zabbix Agent Version</name>
|
|
||||||
<type>0</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>agent.version</key>
|
|
||||||
<delay>1h</delay>
|
|
||||||
<history>1w</history>
|
|
||||||
<trends>0</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>1</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units/>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>0</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Zabbix agent</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap/>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<name>Upgradable Packages</name>
|
|
||||||
<type>0</type>
|
|
||||||
<snmp_community/>
|
|
||||||
<snmp_oid/>
|
|
||||||
<key>packages.upgradable</key>
|
|
||||||
<delay>6h</delay>
|
|
||||||
<history>90d</history>
|
|
||||||
<trends>365d</trends>
|
|
||||||
<status>0</status>
|
|
||||||
<value_type>3</value_type>
|
|
||||||
<allowed_hosts/>
|
|
||||||
<units/>
|
|
||||||
<snmpv3_contextname/>
|
|
||||||
<snmpv3_securityname/>
|
|
||||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
|
||||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
|
||||||
<snmpv3_authpassphrase/>
|
|
||||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
|
||||||
<snmpv3_privpassphrase/>
|
|
||||||
<params/>
|
|
||||||
<ipmi_sensor/>
|
|
||||||
<authtype>0</authtype>
|
|
||||||
<username/>
|
|
||||||
<password/>
|
|
||||||
<publickey/>
|
|
||||||
<privatekey/>
|
|
||||||
<port/>
|
|
||||||
<description/>
|
|
||||||
<inventory_link>0</inventory_link>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Packages</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap/>
|
|
||||||
<logtimefmt/>
|
|
||||||
<preprocessing/>
|
|
||||||
<jmx_endpoint/>
|
|
||||||
<master_item/>
|
|
||||||
</item>
|
|
||||||
</items>
|
|
||||||
<discovery_rules/>
|
|
||||||
<httptests/>
|
|
||||||
<macros/>
|
|
||||||
<templates/>
|
|
||||||
<screens/>
|
|
||||||
</template>
|
|
||||||
</templates>
|
|
||||||
<triggers>
|
|
||||||
<trigger>
|
|
||||||
<expression>{Service - ICMP:icmpping.max(3m)}=3</expression>
|
|
||||||
<recovery_mode>0</recovery_mode>
|
|
||||||
<recovery_expression/>
|
|
||||||
<name>Cannot be pinged</name>
|
|
||||||
<correlation_mode>0</correlation_mode>
|
|
||||||
<correlation_tag/>
|
|
||||||
<url/>
|
|
||||||
<status>0</status>
|
|
||||||
<priority>5</priority>
|
|
||||||
<description/>
|
|
||||||
<type>0</type>
|
|
||||||
<manual_close>0</manual_close>
|
|
||||||
<dependencies/>
|
|
||||||
<tags/>
|
|
||||||
</trigger>
|
|
||||||
<trigger>
|
|
||||||
<expression>{Service - ICMP:icmppingloss.min(10m)}>50</expression>
|
|
||||||
<recovery_mode>0</recovery_mode>
|
|
||||||
<recovery_expression/>
|
|
||||||
<name>Ping loss is too high</name>
|
|
||||||
<correlation_mode>0</correlation_mode>
|
|
||||||
<correlation_tag/>
|
|
||||||
<url/>
|
|
||||||
<status>0</status>
|
|
||||||
<priority>4</priority>
|
|
||||||
<description/>
|
|
||||||
<type>0</type>
|
|
||||||
<manual_close>0</manual_close>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<name>Cannot be pinged</name>
|
|
||||||
<expression>{Service - ICMP:icmpping.max(3m)}=3</expression>
|
|
||||||
<recovery_expression/>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<tags/>
|
|
||||||
</trigger>
|
|
||||||
<trigger>
|
|
||||||
<expression>{Service - ICMP:icmppingsec.avg(2m)}>100</expression>
|
|
||||||
<recovery_mode>0</recovery_mode>
|
|
||||||
<recovery_expression/>
|
|
||||||
<name>Ping Response time is too high</name>
|
|
||||||
<correlation_mode>0</correlation_mode>
|
|
||||||
<correlation_tag/>
|
|
||||||
<url/>
|
|
||||||
<status>0</status>
|
|
||||||
<priority>4</priority>
|
|
||||||
<description/>
|
|
||||||
<type>1</type>
|
|
||||||
<manual_close>0</manual_close>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<name>Cannot be pinged</name>
|
|
||||||
<expression>{Service - ICMP:icmpping.max(3m)}=3</expression>
|
|
||||||
<recovery_expression/>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<tags/>
|
|
||||||
</trigger>
|
|
||||||
<trigger>
|
|
||||||
<expression>{Zabbix - Container Agent:packages.upgradable.last()}>0</expression>
|
|
||||||
<recovery_mode>0</recovery_mode>
|
|
||||||
<recovery_expression/>
|
|
||||||
<name>Upgraded Packages in Container Available</name>
|
|
||||||
<correlation_mode>0</correlation_mode>
|
|
||||||
<correlation_tag/>
|
|
||||||
<url/>
|
|
||||||
<status>0</status>
|
|
||||||
<priority>1</priority>
|
|
||||||
<description/>
|
|
||||||
<type>0</type>
|
|
||||||
<manual_close>0</manual_close>
|
|
||||||
<dependencies/>
|
|
||||||
<tags/>
|
|
||||||
</trigger>
|
|
||||||
<trigger>
|
|
||||||
<expression>{Zabbix - Container Agent:agent.ping.nodata(3m)}=1</expression>
|
|
||||||
<recovery_mode>0</recovery_mode>
|
|
||||||
<recovery_expression/>
|
|
||||||
<name>Zabbix agent is unreachable</name>
|
|
||||||
<correlation_mode>0</correlation_mode>
|
|
||||||
<correlation_tag/>
|
|
||||||
<url/>
|
|
||||||
<status>0</status>
|
|
||||||
<priority>5</priority>
|
|
||||||
<description/>
|
|
||||||
<type>0</type>
|
|
||||||
<manual_close>0</manual_close>
|
|
||||||
<dependencies/>
|
|
||||||
<tags/>
|
|
||||||
</trigger>
|
|
||||||
</triggers>
|
|
||||||
<value_maps>
|
|
||||||
<value_map>
|
|
||||||
<name>Service state</name>
|
|
||||||
<mappings>
|
|
||||||
<mapping>
|
|
||||||
<value>0</value>
|
|
||||||
<newvalue>Down</newvalue>
|
|
||||||
</mapping>
|
|
||||||
<mapping>
|
|
||||||
<value>1</value>
|
|
||||||
<newvalue>Up</newvalue>
|
|
||||||
</mapping>
|
|
||||||
</mappings>
|
|
||||||
</value_map>
|
|
||||||
<value_map>
|
|
||||||
<name>Zabbix agent ping status</name>
|
|
||||||
<mappings>
|
|
||||||
<mapping>
|
|
||||||
<value>1</value>
|
|
||||||
<newvalue>Up</newvalue>
|
|
||||||
</mapping>
|
|
||||||
</mappings>
|
|
||||||
</value_map>
|
|
||||||
</value_maps>
|
|
||||||
</zabbix_export>
|
|
||||||
Reference in New Issue
Block a user