GreenArrow Email Software Documentation

Server Monitoring


Even though we provide these monitoring tools in our documentation, we do not guarantee that they will work in your environment. Each of the following checks that you install should be thoroughly tested before moving it into a production environment where you rely on it to maintain uptime. GreenArrow is not responsible for the functionality or maintenance of these checks within your environment.

If you are not comfortable managing these on your own, GreenArrow provides a comprehensive Server Monitoring and Backup service that includes 24/7 monitoring. For details on what is provided with this service, please review our documentation on Server Management and Backups, or you can contact GreenArrow technical support to get pricing details.

Monitoring Overview

Each URL described on this page returns OK, WARNING, or CRITICAL as the first line of its output, based on the test results.

These are the recommended reactions to the following status results:

  • If a URL returns OK: no action is required
  • If a URL returns WARNING: a potential failure is coming. An email alert or some other lower-tier alert should be triggered.
  • If a URL returns CRITICAL (or cannot be loaded): a full alert should be triggered; this needs your attention immediately.

If there are more details available on the status, such as the uptime of a service, those details are printed starting on the second line. For example:

/service/hvmail-disk-qmail-send: up (pid 2615) 8203 seconds

Monitoring URLs

For each URL below, replace hostname with the actual hostname of your GreenArrow server. This is the same hostname that’s used for GreenArrow Engine or Studio’s administrative web interface.

GreenArrow Engine URLs

Description URL
Dummy Alert (always critical) http://hostname/monitoring/dummy-alert.php
Disk Space http://hostname/monitoring/disk-usage.php
HTTP and PHP http://hostname/monitoring/service-check.php?service=hvmail-httpd
PostgreSQL Process http://hostname/monitoring/service-check.php?service=hvmail-postgres
SMTP Service http://hostname/monitoring/service-check.php?service=hvmail-qmail-smtpd
SMTP 2 Service http://hostname/monitoring/service-check.php?service=hvmail-qmail-smtpd2
MTA bounce-queue Service http://hostname/monitoring/service-check.php?service=hvmail-bounce-qmail-send
MTA disk-queue Service http://hostname/monitoring/service-check.php?service=hvmail-disk-qmail-send
MTA ram-queue Service http://hostname/monitoring/service-check.php?service=hvmail-ram-qmail-send
POP3 Service http://hostname/monitoring/service-check.php?service=hvmail-qmail-pop3d
DNS Cache Service http://hostname/monitoring/service-check.php?service=dnscache
SSH Service http://hostname/monitoring/ssh-service.php
PostgreSQL Query http://hostname/monitoring/postgresql-query.php
Send and Receive Emails With Another Server http://hostname/monitoring/send-receive-another-server.php
Transactional Email http://hostname/monitoring/transactional-email.php

The Send and Receive Emails With Another Server, and Transactional Email tests exchange emails with external servers. Each time you load the URL for one of these tests, you actually receive the results from the previous time that the test was run. As a result, the first time that you load either of these pages, you may see a status of WARNING or CRITICAL, even if GreenArrow is working correctly. If you refresh the page a moment later, you should see a status of OK, assuming that everything is running correctly.

Warning: External Dependencies

The external servers that the Send and Receive Emails With Another Server, and Transactional Email tests exchange emails with are hosted by GreenArrow. As a result, future maintenance performed on those GreenArrow servers could result in these tests showing a WARNING or CRITICAL status, even if your GreenArrow server is operating normally. For this reason, most customers opt to exclude these two tests from what can trigger a critical alert in their monitoring system.

GreenArrow Studio URLs

Description URL
FTP Service http://hostname/monitoring/service-check.php?service=hvmail-pure-ftpd

Monitoring Setup Instructions

GreenArrow Setup Instructions

These steps should be completed on the system that’s running GreenArrow.

  1. Allow the apache user to check on the status of services and delivery attempts:

    1. Edit sudoers: visudo
    2. Add these lines:

      ## Allow the apache user to run sudo in response to web requests
      Defaults:apache !requiretty
      ## Allow the apache user to check on the status of services and delivery attempts
      apache ALL=(ALL) NOPASSWD:/usr/local/bin/svstat, /var/hvmail/bin/hvmail_report

  2. Download and extract the HTTP-based monitoring scripts:

    cd /var/hvmail/apache/htdocs
    wget --http-user=greenarrow --http-password=9toast8pub
    tar -xzf greenarrow-http-based-server-monitoring-1.2.tgz

  3. Edit monitoring/common.php to set the hostname to be monitored:

    // Variables to set for each installation
    $hostname = "hostname";

  4. Create the following Email Users on the incoming email domain that matches the $hostname variable set in the previous step.

    Each email address will have a unique localpart (the portion of the email address before the @ sign and dot-qmail rule to follow:

    • Email address/username - Use the address listed below
    • Password - Set a secure password
    • Mail delivery - Follow dot qmail delivery instructions
    • Dot-qmail delivery rules - Use the address-specific rule below
    • Locked - unchecked
    • Use wildcard matching - unchecked

    Here are the specific email addresses and dot-qmail rules to create:

    Email dot-qmail rule
    monitor_autoresponders | /bin/touch /var/hvmail/var/tmp/monitor_autoresponders
    monitor_send_receive_another_server | /bin/touch /var/hvmail/var/tmp/monitor_send_receive_another_server
    mail-monitor_send_transactional_email-default | /bin/touch /var/hvmail/var/tmp/monitor_send_transactional_email.$EXT2

Nagios Setup Instructions

The output of the monitoring scripts was created to work with Nagios monitoring. As each monitoring environment is unique, you’ll need to configure yours to call these scripts based on its configuration.

Copyright © 2012–2024 GreenArrow Email