summaryrefslogtreecommitdiffstats
path: root/plugins/t
AgeCommit message (Collapse)AuthorFilesLines
2024-04-12Adjust check_swap testsNapsty1-1/+1
2024-04-12Adjust check_swap testsNapsty1-1/+1
2024-04-12Adjust check_swap testsNapsty1-0/+12
2024-03-26check_disk: Fail on missing arguments for --warning and --critical and fix a ↵Lorenz Kästle1-2/+6
test case (#1935) * check_disk: Fail on missing arguments for --warning and --critical * Add new test function for percentage expressions and use it in check_disk * Add error abort in tests if they fail to parse output * Fix typo in test which probably broke the test since forever :-(
2024-03-26check_ssh: patches from op5 (#1738)Lorenz Kästle1-20/+102
* check_ssh: properly parse a delayed version control string This resolves an issue with SSH servers which do not respond with their version control string as the first thing in the SSH protocol version exchange phase after connection establishment. This patch also makes sure that we disregard a potential comment in the version exchange string to avoid nonsense mismatches. In the future, we might want to add the capability to match against a user specified comment. In addition, the patch largely improves the communication towards the server, which adds better protocol adherence. Of course, new test cases are added to support the trigger and guard against regressions of the bugs solved by this patch. This fixes op5#7945 (https://bugs.op5.com/view.php?id=7945) Signed-off-by: Anton Lofgren <alofgren@op5.com> * check_ssh.t: Fix a few typos Signed-off-by: Anton Lofgren <alofgren@op5.com> * check_ssh: Handle non-alpha software versions This patch fixes a bug where we would reject version control strings that do not contain letters, because the assumption is made that they always do. This is not required by the RFC however, and there exist implementations that do not contain letters. I've also added a few references to the RFC to make the process of parsing the control string more apparent. This fixes op5#8716 (https://bugs.op5.com/view.php?id=8716) Signed-off-by: Anton Lofgren <alofgren@op5.com> * check_ssh: Fix a typo in "remote-protocol parameter remote-protcol -> remote-protocol Signed-off-by: Anton Lofgren <alofgren@op5.com> * Remove unused variable * Formating fixes * Update translations * Remove merge conflict artefact from previous merge * Set fixed include paths * Improve code style to be slightly more readable * Update test cases for different netcat behaviour and reduce sleep time --------- Signed-off-by: Anton Lofgren <alofgren@op5.com> Co-authored-by: Anton Lofgren <alofgren@op5.com>
2024-02-23check_disk increase alert precision (#1989)Sven Nierlein1-1/+1
* check_disk increase alert precision Free disk percentage value was rounded to a full integer meaning it alerted about ~1% percent too early. This is about 10GB on a 1TB disk. The warning and critical thresholds already support float values, so just the percentage calculation needs to be improved. old: ./check_disk -w 35% -c 20% -p / -f -vvv Thresholds(pct) for / warn: 35.000000 crit 20.000000 calling stat on / For /, used_pct=65 free_pct=35 used_units=286451 free_units=156651 total_units=443102 used_inodes_pct=11 free_inodes_pct=89 fsp.fsu_blocksize=4096 mult=1048576 Freespace_units result=0 Freespace% result=1 Usedspace_units result=0 Usedspace_percent result=0 Usedinodes_percent result=0 Freeinodes_percent result=0 DISK WARNING - free space: WARNING [ / 156651MiB (35% inode=89%)];| /=300365643776B;302006979788;371700898201;0;464626122752 new: ./check_disk -w 35% -c 20% -p / -f -vvv Thresholds(pct) for / warn: 35.000000 crit 20.000000 calling stat on / For /, used_pct=64.649722 free_pct=35.350278 used_units=286464 free_units=156637 total_units=443102 used_inodes_pct=10.016183 free_inodes_pct=89.983817 fsp.fsu_blocksize=4096 mult=1048576 Freespace_units result=0 Freespace% result=0 Usedspace_units result=0 Usedspace_percent result=0 Usedinodes_percent result=0 Freeinodes_percent result=0 DISK OK - free space: / 156637MiB (35.4% inode=90%);| /=300379275264B;302006979788;371700898201;0;464626122752 * check_disk: adjust test case to support float precision
2023-11-27check_disk: fix ignore-missing in combination with includes (fixes #1963)refs/pull/1967/headSven Nierlein1-16/+31
Using --ignore-missing together with regex matching and ignore option lead to a wrong error message. ./check_disk -n -w 10% -c 5% -W 10% -r /dummy -i /dummy2 DISK UNKNOWN: Paths need to be selected before using -i/-I. Use -A to select all paths explicitly The use case here is a cluster with fail-over mounts. So it is a valid situation that the regex match does not find anything in addtition with a ignore which also does not exist. After this patch: ./check_disk -n -w 10% -c 5% -W 10% -r /dummy -i /dummy2 DISK OK - No disks were found for provided parameters|
2023-10-31Enhance tests to check wheter the option validation worksRincewindsHat1-1/+4
2023-10-03Fix some more typosrefs/pull/1931/headRincewindsHat2-2/+2
2023-08-30check_smtp: add tests for --sslrefs/pull/1908/headFranz Schwartau1-1/+19
2023-08-30Rename test variables for upcoming new variables with the same nameFranz Schwartau1-11/+11
2023-08-28Enhance regex in test to be more tolerant to follow up textLorenz Kästle1-1/+1
2023-08-27Update test to ignore broken MIBsRincewindsHat1-33/+33
2023-04-14Fix a lot of typos reported by codespellrefs/pull/1864/headJan Wagner7-24/+24
2023-02-20check_disk: fix ugly output with -e option and adapt tests accordinglyKristian Schuster1-4/+4
2023-02-20check_disk: fix tests by setting correct test number and escaping line end regexKristian Schuster1-4/+4
2023-02-19Merge remote-tracking branch 'origin/master' into ↵Kristian Schuster2-12/+29
feature_check_disk_add_ignore_missing_option
2023-02-19check_disk: add new tests for new ignore-missing featureKristian Schuster1-5/+15
2022-11-29check_http: fix test planAksel Sjögren1-1/+1
Fix test plan when run with NP_INTERNET_ACCESS=no, where the correct number of steps must be skipped. Caused by a removed test in 65fc7064295ac70d1388fa4db4d4d2cddd531e24. Signed-off-by: Aksel Sjögren <asjogren@itrsgroup.com>
2022-11-07Check curl detect ipv6 (#1809)Lorenz1-11/+28
* If server_address is an IPv6 address surround it with brackets * If the message is too short, we should not have an underflow * Add simple conditional test case available if IPv6 is
2022-10-26check_disk: adjust test planSven Nierlein1-1/+1
2022-10-25check_disk: add tests for new option --ignore-missingKristian Schuster1-0/+15
2022-09-19Display total and scaled load values if check_load scales the values by ↵Lorenz1-4/+11
number of CPUs (#1778) * Renew copyright * Display more verbose output, if scaled load values are used * Actually use scaled value for determining status and print the fitting perfdata depending on input parameters * Add test cases for scaled mode
2022-07-20Remove check_http and check_curl test which are somehow always failing (#1777)Lorenz2-13/+2
* Remove failing checks for check_http * Remove failing checks for check_curl
2021-11-17Merge pull request #1688 from bazzisoft/masterRincewindsHat1-1/+1
check_curl.c: bugfix: verify certificates option should not force SSL to be used
2021-10-26Fix some testsRincewindsHat1-3/+4
2021-10-25Update check_load.tHarald Jenny1-2/+2
adjust tests for new plugin output
2021-09-25Remove spaces from testsRincewindsHat1-3/+3
2021-09-02Improvements suggested by tobiaswieseJonny007-MKD1-1/+1
2021-09-02check_dns: add --expect-nxdomainJonny007-MKD1-2/+10
2021-05-24check_curl.c: bugfix: verify certificates option should not force SSL to be usedrefs/pull/1688/headBarak Shohat1-1/+1
2021-05-19Refactor check_fpingJacob Hansen1-15/+14
* Set correct amount of tests based on conditionals. * When running the test as non-root, we would previously check is the setuid bit is set. This doesn't seem to be needed, so just check if the binary is executable for the user running the test. * Use cmp_ok to check if tests succeeds rather than couting. Signed-off-by: Jacob Hansen <jhansen@op5.com>
2021-05-18check_curl.t: Adjust test to use -f curlJacob Hansen1-2/+1
It appears that `-f follow` doesn't work correctly in `check_curl` at the moment. Test adjusted to use `-f curl` instead. Issue for the above created: https://github.com/monitoring-plugins/monitoring-plugins/issues/1685 Signed-off-by: Jacob Hansen <jhansen@op5.com>
2021-04-30Fix conditional tests for check_http, check_curlAksel Sjögren2-4/+4
Set correct number of tests in skip- blocks to avoid the error "Bad plan. You planned 50 tests but ran 55" when run with/without /usr/bin/faketime and NP_INTERNET_ACCESS=yes/no.
2021-04-30migrate travis ci to github actionsSven Nierlein1-54/+0
2021-04-30fix fping testSven Nierlein1-6/+3
in case of dns errors, fping returns an unknown and thats ok.
2021-04-07Merge pull request #1669 from bazzisoft/verify-certSven Nierlein1-1/+4
Add an option to check_curl to verify the peer certificate & host using the system CA's
2021-04-07Add an option to check_curl to verify the peer certificate & host using the ↵refs/pull/1669/headBarak Shohat1-1/+4
system CA's
2021-04-07Updated check_curl.c to display a specific human-readable error message ↵refs/pull/1668/headBarak Shohat1-2/+2
where possible
2020-05-18update test parameter according to check_httpSven Nierlein1-26/+9
2019-04-04Merge branch 'master' into feature_check_curlAndreas Baumann14-205/+87
2019-02-04travis-ci: Use RSA keys for SSH testsrefs/pull/1580/headJan Wagner1-1/+1
2018-12-04tests: rework test parametersrefs/pull/1565/headSven Nierlein14-216/+72
there were 2 variants of calling getTestParameter: - parameter, description, default value - parameter, env value, default value, description, scope While scope was never actually used and having 2 names for the same value led to having 2 different entries in the cache file for the same configuration. This commit removes the variants and simplifies tests parameters by only using the first 3 parameter variant.
2018-11-06test: Add proxy tests via proxyrefs/pull/1476/headMarkus Frosch2-1/+27
On Travis with a local squid
2018-10-25check_curl: rewrite connect_to / host headersSven Nierlein1-1/+13
since CURLOPT_CONNECT_TO is only available in later curl versions, we do it the other way round now and set the url from the address we want to connect to and then set the host header accordingly.
2018-10-22made check_curl tests copies of check_http tests because they will differ ↵Andreas Baumann1-1/+204
slightly
2018-10-22check_curl: make check_curl use the same tests as check_httpSven Nierlein2-233/+36
2018-10-22add check_curl testSven Nierlein1-0/+200
just a copy of check_http for now... Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12udp test: prefer nc over netcat syntaxrefs/pull/1469/headSven Nierlein1-3/+3
sles 12 systems have netcat symlinked to nc and so expect nc syntax for netcat. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12check_disk test: increase assumed thresholdsSven Nierlein1-4/+4
The check_disk fails if the build system has more than 100GB of free disk space. Lets make this 100TB and we are safe for a couple more years. Signed-off-by: Sven Nierlein <sven@nierlein.de>