summaryrefslogtreecommitdiffstats
path: root/collectors/charts.d.plugin/postfix
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
commita8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch)
tree77f0a30f016c0925cf7ee9292e644bba183c2774 /collectors/charts.d.plugin/postfix
parentAdding upstream version 1.19.0. (diff)
downloadnetdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz
netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/charts.d.plugin/postfix')
-rw-r--r--collectors/charts.d.plugin/postfix/Makefile.inc13
-rw-r--r--collectors/charts.d.plugin/postfix/README.md28
-rw-r--r--collectors/charts.d.plugin/postfix/postfix.chart.sh87
-rw-r--r--collectors/charts.d.plugin/postfix/postfix.conf25
4 files changed, 0 insertions, 153 deletions
diff --git a/collectors/charts.d.plugin/postfix/Makefile.inc b/collectors/charts.d.plugin/postfix/Makefile.inc
deleted file mode 100644
index 6e148352..00000000
--- a/collectors/charts.d.plugin/postfix/Makefile.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-# THIS IS NOT A COMPLETE Makefile
-# IT IS INCLUDED BY ITS PARENT'S Makefile.am
-# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
-
-# install these files
-dist_charts_DATA += postfix/postfix.chart.sh
-dist_chartsconfig_DATA += postfix/postfix.conf
-
-# do not install these files, but include them in the distribution
-dist_noinst_DATA += postfix/README.md postfix/Makefile.inc
-
diff --git a/collectors/charts.d.plugin/postfix/README.md b/collectors/charts.d.plugin/postfix/README.md
deleted file mode 100644
index d9bf77f2..00000000
--- a/collectors/charts.d.plugin/postfix/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# postfix
-
-> THIS MODULE IS OBSOLETE.
-> USE [THE PYTHON ONE](../../python.d.plugin/postfix) - IT SUPPORTS MULTIPLE JOBS AND IT IS MORE EFFICIENT
-
-The plugin will collect the postfix queue size.
-
-It will create two charts:
-
-1. **queue size in emails**
-2. **queue size in KB**
-
-## configuration
-
-This is the internal default for `/etc/netdata/postfix.conf`
-
-```sh
-# the postqueue command
-# if empty, it will use the one found in the system path
-postfix_postqueue=
-
-# how frequently to collect queue size
-postfix_update_every=15
-```
-
----
-
-[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fcharts.d.plugin%2Fpostfix%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
diff --git a/collectors/charts.d.plugin/postfix/postfix.chart.sh b/collectors/charts.d.plugin/postfix/postfix.chart.sh
deleted file mode 100644
index ff59db9f..00000000
--- a/collectors/charts.d.plugin/postfix/postfix.chart.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-# shellcheck shell=bash disable=SC1117
-# no need for shebang - this file is loaded from charts.d.plugin
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-# netdata
-# real-time performance and health monitoring, done right!
-# (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
-#
-
-# the postqueue command
-# if empty, it will use the one found in the system path
-postfix_postqueue=
-
-# how frequently to collect queue size
-postfix_update_every=15
-
-postfix_priority=60000
-
-postfix_check() {
- # this should return:
- # - 0 to enable the chart
- # - 1 to disable the chart
-
- # try to find the postqueue executable
- if [ -z "$postfix_postqueue" ] || [ ! -x "$postfix_postqueue" ]; then
- # shellcheck disable=SC2230
- postfix_postqueue="$(which postqueue 2>/dev/null || command -v postqueue 2>/dev/null)"
- fi
-
- if [ -z "$postfix_postqueue" ] || [ ! -x "$postfix_postqueue" ]; then
- # shellcheck disable=SC2154
- error "cannot find postqueue. Please set 'postfix_postqueue=/path/to/postqueue' in $confd/postfix.conf"
- return 1
- fi
-
- return 0
-}
-
-postfix_create() {
- cat <<EOF
-CHART postfix_local.qemails '' "Postfix Queue Emails" "emails" queue postfix.queued.emails line $((postfix_priority + 1)) $postfix_update_every
-DIMENSION emails '' absolute 1 1
-CHART postfix_local.qsize '' "Postfix Queue Emails Size" "emails size in KB" queue postfix.queued.size area $((postfix_priority + 2)) $postfix_update_every
-DIMENSION size '' absolute 1 1
-EOF
-
- return 0
-}
-
-postfix_update() {
- # the first argument to this function is the microseconds since last update
- # pass this parameter to the BEGIN statement (see bellow).
-
- # do all the work to collect / calculate the values
- # for each dimension
- # remember: KEEP IT SIMPLE AND SHORT
-
- # 1. execute postqueue -p
- # 2. get the line that begins with --
- # 3. match the 2 numbers on the line and output 2 lines like these:
- # local postfix_q_size=NUMBER
- # local postfix_q_emails=NUMBER
- # 4. then execute this a script with the eval
- #
- # be very carefull with eval:
- # prepare the script and always egrep at the end the lines that are usefull, so that
- # even if something goes wrong, no other code can be executed
- postfix_q_emails=0
- postfix_q_size=0
-
- eval "$(run "$postfix_postqueue" -p |
- grep "^--" |
- sed -e "s/-- \([0-9]\+\) Kbytes in \([0-9]\+\) Requests.$/local postfix_q_size=\1\nlocal postfix_q_emails=\2/g" |
- grep -E "^local postfix_q_(emails|size)=[0-9]+$")"
-
- # write the result of the work.
- cat <<VALUESEOF
-BEGIN postfix_local.qemails $1
-SET emails = $postfix_q_emails
-END
-BEGIN postfix_local.qsize $1
-SET size = $postfix_q_size
-END
-VALUESEOF
-
- return 0
-}
diff --git a/collectors/charts.d.plugin/postfix/postfix.conf b/collectors/charts.d.plugin/postfix/postfix.conf
deleted file mode 100644
index b77817bd..00000000
--- a/collectors/charts.d.plugin/postfix/postfix.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# no need for shebang - this file is loaded from charts.d.plugin
-
-# netdata
-# real-time performance and health monitoring, done right!
-# (C) 2018 Costa Tsaousis <costa@tsaousis.gr>
-# GPL v3+
-
-# THIS PLUGIN IS DEPRECATED
-# USE THE PYTHON.D ONE
-
-# the postqueue command
-# if empty, it will use the one found in the system path
-#postfix_postqueue=
-
-# the data collection frequency
-# if unset, will inherit the netdata update frequency
-#postfix_update_every=15
-
-# the charts priority on the dashboard
-#postfix_priority=60000
-
-# the number of retries to do in case of failure
-# before disabling the module
-#postfix_retries=10
-