summaryrefslogtreecommitdiffstats
path: root/plugins/check_tcp.c
AgeCommit message (Collapse)AuthorFilesLines
2007-12-19check_tcp now returns UNKNOWN with an invalid hostname on command lineTon Voon1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1879 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-03Moved check_tcp's expect string testing into utils_tcp for testing purposes.Matthias Eble1-24/+23
Added -A/--all flag to test for every expect string passed. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1729 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29Fix segfault when -e is specified multiple times. Thanks to John Rouillard ↵Matthias Eble1-2/+1
and Ralph Roessner (#1475899) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1723 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29No more warn/crit values in performance data if -w and -c are not specified.Matthias Eble1-4/+4
Thanks to Simon Bellwood (#1181554) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1722 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-14Documentation fix re: --escape flag. Fix of ./check_tcp test to webserversTon Voon1-1/+1
to make it more standards compliant git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1620 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-06Correct vim typo in comment block :PThomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1612 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-06correcting some translation problemsBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1611 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-01Fix progname being partly set to upper caseThomas Guyot-Sionnest1-2/+2
Change formating of invalid hostname output git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1604 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-31Fix Debian Bug #392610: check_jabber always return warningThomas Guyot-Sionnest1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1599 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-30Jail does not requires any argumentsThomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1598 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-30Fix reporting bug using expect, affecting (not fixing) Debian bug #392610: ↵Thomas Guyot-Sionnest1-8/+18
check_jabber always return warning git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1596 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-23Add missing `break' to the switch-case block that handles the `-m' optionHolger Weiss1-0/+1
(Nobuhiro Ban - 1642682) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1577 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19another round of localization cleaningBenoit Mortier1-51/+59
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1509 f882894a-f735-0410-b71e-b25c423dba1c
2006-09-02- fix for warning/critical timeouts in check_tcp.c, in which the pluginM. Sean Finney1-10/+4
would exit with a usage error if non-int timeouts were passed. - change --warning-time/--critical-time to just --warning/--critical, as it's what --help says. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1473 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-29New function to for escaped strings from command line for send/quit.Ton Voon1-32/+23
Adapted from Sebastian Wiesinger's patch (1292404) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1365 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-24udp checks require and send and receive option. Tests updated so ifTon Voon1-1/+5
nc is available, will check send and receive working correctly git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1353 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-22Options to change line ends for -s and -q (John Rouillard - 1346104)Ton Voon1-4/+33
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1344 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-21Return CRITICAL if hostname invalid, as per guidelinesTon Voon1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1335 f882894a-f735-0410-b71e-b25c423dba1c
2005-11-04Fixed --mismatch option for check_tcp. Added tests into check_imapTon Voon1-1/+1
(Rick Fey - 1339134) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1273 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-31code cleanups, largely resulting from turning on -Wall. mostlyM. Sean Finney1-5/+3
unused variables and explicit casting issues, but there were a couple gotchas in there too. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1267 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-30another fix from alex: check for '/' in the server_address beforeM. Sean Finney1-1/+1
trying to resolve it via is_host(). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1265 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-30fixes for some bugs found in my merging of the tcp socket patchM. Sean Finney1-3/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1264 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-25- added code to allow check_tcp (via np_net_connect) work with localM. Sean Finney1-7/+17
unix sockets. some testing would be welcome. based on idea from Alex Samorukov. - also introduced a check_clamd behavior in check_tcp. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1261 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19all plugins now using centralized ssl functions in netutils.cM. Sean Finney1-106/+6
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1257 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19- initial attempt at consolidating ssl-related code into netutils.{c,h}M. Sean Finney1-115/+30
- added some #ifdefs to common.h and netutils.h to prevent multiple inclusions (as netlibs now includes common.h) - all ssl plugins (tcp/http/smtp) compile cleanly against gnutls, though certificate checking still needs to be done. - modified configure script so you can also explicitly say "without-gnutls" too (otherwise if you disable openssl you have no way of disabling gnutls too) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1255 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-18initial "experimental" support for gnutls. by default openssl is stillM. Sean Finney1-14/+28
used if available, and gnutls is only used if openssl is not available or explicitly disabled (--without-openssl). currently the only plugin i've verified to work is check_tcp, but i had to disable cert checking. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1254 f882894a-f735-0410-b71e-b25c423dba1c
2005-06-05check_tcp code cleanup from andreas plus fix to andreas' patch from seanM. Sean Finney1-276/+242
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1189 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-25bah, my_connect is taken by mysql. now calling it np_net_connect.M. Sean Finney1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1176 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-24optimizations and cleanup from andreasM. Sean Finney1-24/+14
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1173 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-03if check_tcp was called with -e but not -s, it would hang in a call to ↵M. Sean Finney1-2/+4
my_recv. the fix committed here adds on more piece of logic to the check to see if more data needs to be read, avoiding the deadlock call. a better fix would be to not use these "voodoo" heuristics and instead use poll() or select(), but that's quite a bit more complicated. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1170 f882894a-f735-0410-b71e-b25c423dba1c
2005-04-11this should add support for check_ssmtp, based on the 1.3.x patch in 1155562,M. Sean Finney1-0/+10
but fixed to follow how things are done in 1.4 (using strdup instead of asprintf) and patching configure.in instead of configure. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1159 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-30more internationalization fixesBenoit Mortier1-1/+1
internationalization freeze for beta1 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1067 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25various fixes for localizationBenoit Mortier1-16/+14
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-11Patch from Ollie Cook to define return code when expected value not received ↵Matthew Kent1-8/+28
(#1082275). Also included another change from Ollie Cook to do stricter matching of expected values from the beginning of the line. When a user defines an expected string this is changed to the old style strstr matching. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1025 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-08patch 1028033Benoit Mortier1-1/+1
minor internationalization fixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1013 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-04internationalization fixesBenoit Mortier1-8/+8
bugfixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1001 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorryBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03check_tcp parenthesis bug, header fix for po filesBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@997 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03print_help and print_usage() cleanupBenoit Mortier1-6/+6
other misc cleanups git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@996 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-031041571: -D option processing corrected (Eric Chen). Changed ↵Stanley Hopcroft1-2/+2
process_arguments() to return TRUE. Dont know why this was necessary. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@995 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03remove UT_HLP_VRS from print_usageBenoit Mortier1-6/+4
this was not a good idea ;-) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@994 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03fixes for internationalizationBenoit Mortier1-4/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@990 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03bump copyright yearBenoit Mortier1-2/+2
initialize result to STATE_UNKNOW in place of STATE_OK git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@982 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02Tracker 1041571: appended :D to getopt_long() args (for cert expiry check). ↵Stanley Hopcroft1-1/+1
Eric Chen. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@980 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02More internationalization workBenoit Mortier1-2/+2
new usage4 function to permit localisation of think like check_ssh: xxxxx git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@979 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02return of process_arguments() is TRUE not OK !Benoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@978 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02changed Error: by CRITICAL -Benoit Mortier1-9/+9
more localization fixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@971 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-01standardize localization stringBenoit Mortier1-15/+14
standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-011041571 & 664615: check_tcp with cert check + nntps, simap, jabberStanley Hopcroft1-11/+156
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@959 f882894a-f735-0410-b71e-b25c423dba1c