Here is a minimal answer for postfix:
!/bin/bash
OS=$(uname -o)
PID=$$
TEST="postqueue"
VERSION='1.1'
VERMSG="<br> <br> <font='-2'>Version: ${VERSION}</font>"
DATE=$(date)
POSTQ='/usr/sbin/postqueue'
pq=$(${POSTQ} -p)
cnt=$(${POSTQ} -p | tail -1 | cut -d' ' -f5)
if [[ "X" == "X${cnt}" ]]
then
color="green"
else
cnt1=$(${POSTQ} -p | wc -l)
if (( 0 == cnt1 ))
then
color="green"
else
if (( 100 > cnt1 ))
then
color="yellow"
else
color="red"
fi
fi
fi
# echo ${BB} ${BBDISP} "status ${MACHINE}.${TEST} ${color} ${pq}"
${BB} ${BBDISP} "status ${MACHINE}.${TEST} ${color} ${DATE}
${pq} <dashboard-break> ${VERMSG}"
--
Isaac Traxler
Storage & Infrastructure Manager
High Performance Computing
Louisiana State University, LONI
325 Frey Computing Center, Baton Rouge, LA XXXXX
XXX-XXX-XXXX | user-4dfb0dbf036e@xymon.invalid
On Mon, 24 Apr 2017, Zoltan Forray wrote:
Date: Mon, 24 Apr 2017 10:43:34
From: Zoltan Forray <user-755163d80bce@xymon.invalid>
To: xymon at xymon.com
Subject: [Xymon] Monitoring mailq
I inherited Xymon from a now retired co-worker. Now I have a request to monitor the mailq on a new box and I seem to
have missed that in the brain-dump/transfer from the retiree.
So, how do you activate the mailq info on a Linux client/server? Where can I find the latest Xymon client for an
RHEL6 system?
--
Zoltan Forray
Spectrum Protect (p.k.a. TSM) Software & Hardware Administrator
Xymon Monitor Administrator
VMware Administrator
Virginia Commonwealth University
UCC/Office of Technology Services
www.ucc.vcu.edu
user-755163d80bce@xymon.invalid - XXX-XXX-XXXX
Don't be a phishing victim - VCU and other reputable organizations will never use email to request that you reply with
your password, social security number or confidential personal information. For more details visit
http://infosecurity.vcu.edu/phishing.html