check_ssh using libssh to verify host fingerprint and openssh version

    if libssh is not found, the fingerprint / openssh-version-detection functions are not compiled in.
    for backward compatibility the parameters of original check_ssh stay untouched
    for checking the fingerprint && || the openssh version use -f and or -o

    to check against known_hosts file use -f known_host

    sample calls:
        #checks if SSH fingerprint is stored in local known hosts
        ./check_ssh -f known_hosts  localhost

        #checks if SSH fingerprint is stored in local known hosts, and version is >= 5.5
        ./check_ssh -f known_hosts  -o 5.5 localhost

        #checks if SSH fingerprint is equal the print supplied with -f
        ./check_ssh -f  a2:47:e8:83:d9:8b:f5:c4:19:23:47:0d:e0:bf:a8:26  localhost

        #checks if SSH fingerprint is equal the print supplied with -f and version is >= 5.5
        ./check_ssh -f  a2:47:e8:83:d9:8b:f5:c4:19:23:47:0d:e0:bf:a8:26  -o 5.5 localhost

        #check for SSH version
        ./check_ssh -o 5.5 localhost
Handle negative values properly with check_snmp

check_snmp becomes capable of evaluating negative values properly,
but it might be returning CRITICALs where it used to return OK and was ignored,
if a negative value turns out to actually be a valid value.
If negative values are valid, this can be worked around,
by adding "~:" to the warning/critical threshold : 100 -> ~:100
Fix check_mysql.c client options from file

If you don't specify a group or a file to read data from the plugin tries to read from several files that don't exist and no groups.
check_ldap: add certificate support

Here's a patch adding the certificate expiration check feature to the ldap
plugin, based on the http plugin. For some unknown reason, probably due to
the way secure connection is established, it doesn't work with the --ssl
options, only for the --starttls one.
--
Just turning attached patch of github issue #1067 into a push request.
(Closes #1067)
check_swap: returns OK, if no swap activated

My swap was not activated on boot for unknown reason and nagios does not
report this as a problem. Here is an example:

[root@kecom ~]# rpm -q nagios-plugins
nagios-plugins-1.4.13-11.fc10.i386
[root@kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2
SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

If there is no swap and users is trying to test percentage of free swap,
consider 0 MB free swap space as problem, or of free/total raises division
by zero, then set percentage to 0%, not to 100%.
--
Just turning attached patch of github issue #896 into a push request.
(Closes #896)
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).
Update web site URLs

The Nagios Plugin Development Guidelines and the Extra-Opts
documentation were moved to our new project server.
check_oracle: --db +ASM bad string matching
check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*.
--
Just turning attached patch of github issue #1207 into a push request.
(Closes #1207)
Just using the posix conform extended regular expression grep
Update URLs and mailing list addresses

Now that we moved our infrastructure away from SourceForge, update the
URLs and mailing list addresses accordingly.
README: Clarify license notice

Note that we permit redistribution and modification under the terms of
future GPL versions, and state the exclusion of warranty.  This is in
accordance with the license notices at the top of our source files.
README: Change GitHub URL

Link to our main project home page on GitHub instead of referencing only
the "nagios-plugins.git" repository.  (And put the URL on its own line.)
check_http: Don't let "-N" expect an argument

Fix the problem that check_http's "-N" option expects an argument
although it shouldn't.  The corresponding long option ("--no-body")
wasn't affected.

This error was introduced in ee3c4014d511e105489b081390636cacd4c53e3f.
Thanks to Kerry Hughes for reporting it on the devel@ list.
Fix #1217 spec file fails to build due to duplicate files and unused files