[Xymon] Monitoring mailq

Isaac W Traxler traxler at lsu.edu
Mon Apr 24 18:03:51 CEST 2017


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 70803
225-578-1923 | traxler at lsu.edu

On Mon, 24 Apr 2017, Zoltan Forray wrote:

> Date: Mon, 24 Apr 2017 10:43:34
> From: Zoltan Forray <zforray at vcu.edu>
> 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
> zforray at vcu.edu - 804-828-4807
> 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 
> 
>


More information about the Xymon mailing list