Hi,

> I need to integrate openca into nagios.
> Has anyone done this before?
> Afaik checks nagios the mime headers, if a http service
> is running. But openca gives a 200 even if the daemon is
> not running.
> Any suggestions?

I am using the usual http plugin of Nagios to check if the web
server is running. For testing the OpenCA daemon, I am using
the following Shell function with embedded Perl code that
generates output to be fed into a Nagios cmd file. Set
the OPENCA_DAEMON_SOCKET shell variable accordingly.
I am using the same code to forward error messages to a Tivoli
console, so it should be generic enough to serve any NMS.

checkopencadaemon() {
    perl <<EOF
    use Socket;
    my \$socket_name = "$OPENCA_DAEMON_SOCKET";
    if (! socket(SOCKET, PF_UNIX, SOCK_STREAM, 0)) {
        print "ERROR: cannot create socket \$socket_name\n";
        exit 1;
    }
    if (! connect(SOCKET, sockaddr_un(\$socket_name))) {
        print "ERROR: OpenCA server daemon is not online or does not
accept requests (\$socket_name)\n";
    }
EOF
}

(In addition I have implemented some checks that retrieve CRLs from
LDAP and generate Nagios warnings/errors if LDAP expiry will happen
soon.)

cheers

Martin




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Openca-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openca-users

Reply via email to