From 44a321cb8a42d6c0ea2d96a1086a17f2134c89cc Mon Sep 17 00:00:00 2001 From: Ethan Galstad Date: Thu, 28 Feb 2002 06:42:51 +0000 Subject: Initial revision git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c --- contrib/check_timeout.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 contrib/check_timeout.c (limited to 'contrib/check_timeout.c') diff --git a/contrib/check_timeout.c b/contrib/check_timeout.c new file mode 100644 index 00000000..858bdfe9 --- /dev/null +++ b/contrib/check_timeout.c @@ -0,0 +1,55 @@ +/***************************************************************************** + * + * CHECK_TIMEOUT.C + * + * Program: Plugin timeout tester for Nagios + * License: GPL + * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) + * + * Last Modified: 01-10-2000 + * + * Command line: CHECK_TIMEOUT + * + * Description: + * This 'plugin' - if you want to call it that - doesn't do anything. It + * just stays in a loop forever and never exits, and is therefore useful for + * testing service and host check timeouts in Nagios. You must supply at + * least one argument on the command line in order to activate the loop. + * + ****************************************************************************/ + +#include +#include + + +int main(int argc, char **argv){ + + if(argc==1){ + printf("Incorrect arguments supplied\n"); + printf("\n"); + printf("Plugin timeout tester for Nagios\n"); + printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"); + printf("Last Modified: 01-10-2000\n"); + printf("License: GPL\n"); + printf("\n"); + printf("Usage: %s \n",argv[0]); + printf("\n"); + printf("Options:\n"); + printf(" = Anything at all...\n"); + printf("\n"); + printf("Notes:\n"); + printf("This 'plugin' doesn't do anything. It is designed to never exit and therefore\n"); + printf("provides an easy way of testing service and host check timeouts in Nagios.\n"); + printf("\n"); + return 0; + } + + /* let's never leave here, okay? */ + while(1) + sleep(1); + + return 0; + } + + + -- cgit v1.2.3-74-g34f1