check_mailq: adding nullmailer support

Just turning attached patch of github issue #740 into a push request.
(Closes #740)

Submitted by corteccio on 2006-06-22 16:50:50

I'm using nullmailer as a relay-only MTA on many
servers, including nagios boxes where it is used fo
email notifications. Unfortunately nullmailer sometimes
stalls and stops delivering mail while its queue grows
indefinitely. Adding nullmailer support to check_mailq
allows me to monitor this.
check_disk: no longer hangs on hanging filesystems

Just turning attached patch of github issue #867 into a push request.

Submitted by lausser on 2009-05-01 12:06:18

Hi,
i created a patch for check_disk (v2025/1.4.13) which can handle hanging nfs filesystems. Imagine you mounted a share from a NAS at the mountpoint /mnt. Now if the Storage device or whatever acts as NFS server dies or encounters a network problem, you will see messages like "NFS server nas.naprax.de not responding still trying" and every process accessing files inside the /mnt directory will be blocked, maybe forever. Depending on the mount options the hanging processes may even be invulnerable to a kill -9. This also applies to check_disk. If you have a service monitoring usage of /mnt with "check_disk ... -p /mnt", it will also be blocked. Nagios will report a timeout then. But the bad thing is, every minutes another check_disk will be started which also will hang then. Sooner or later your process list fills up with unkillable check_disks.
The critical piece of code inside check_disk is the stat system call, which is in the moment needed to find out, if a path exists at all. If that stat call hits a directory which is mounted from a dead nfs server, it will not return with an error code, but will not return at all.
I found out that although processes cannot be killed in such a situations, threads can. So i rewrote the stat_path subroutine in a way, where the critical stat is executed in it's own thread. If this thread does not terminate within the --timeout interval, it is considered to be blocked by a dead nfs filesystem and the thread will be detached.
I tested it on Linux 2.6.18 (gcc 4.1.2) and Solaris 10/x86 (gcc 3.4.3)
check_dns: add AAAA,MX,TXT,SRV,CNAME

Just turning attached patch of github issue #894 into a push request.

Submitted by dhorn2000 on 2009-04-07 19:21:10

Added optional support for the major DNS record types (AAAA, MX, TXT, SRV, CNAME, A, ANY). Specifically, allow for a new optional --querytype parameter, and a new optional --accept-cname parameter. Help text has been updated to reflect the changes as well. Patch is against SVN trunk of check_dns.c from April 7,2009.

This change should be completely backwards compatible with existing check_dns usage and syntax. New features are off by default.
check_disk: show troubled partition in verbose mode

Just turning attached patch of github issue #984 into a push request.

I'm submitting a small patch to check_disk that will show which partitions are actually causing the error state. This helps the human operator to quickly identify the exact issue. I made it so a single -v flag is required so it doesn't harm legacy code that may be parsing the original style of output.
print subject name in certificate check

Just turning attached patch of github issue #1028 into a push request
(with small adjustments).

Submitted by osk on 2011-12-19 18:01:48

This patch prints the subject name in certificate checks.
It also changes the date format to the more common YYYY-MM-DD HH:MM (unless AMERICAN_DATE_FORMAT is defined).