| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Add lib math to check_snmp dependencies
|
|
|
|
Fake changelog in spec file since the rpm build seems to fail
|
|
|
|
fix types for most curl_easy_setopt parameters
|
|
inqrphl/fix/check-curl-append-query-string-on-redirect
check_curl: append the query string from parsed uri
|
|
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
|
|
|
|
|
|
net-snmp-config --cflags returns the flags used to build Net-SNMP,
which in 5.9.5+ includes -Werror=declaration-after-statement; code in
check_snmp.c is not ready for this. "pkg-config --cflags netsnmp"
just returns flags needed to build against the library.
|
|
according to https://curl.se/libcurl/c/curl_easy_setopt.html, parameters
are either a long, a function pointer, an object pointer or a curl_off_t,
depending on what the option expects; curl 8.16 checks and warns about
these.
|
|
Fix v3.0.0-rc1 Build on OpenBSD
|
|
check_http: Abort invalid SSL w/ error
|
|
Include the -D flag for certificate verification in the "CHECK
CERTIFICATE" examples. Otherwise, only the certificate dates are
checked, but not if the certificate matches to the hostname or is signed
by a trusted CA.
Fixes #2146.
|
|
previously, the fragment was sent in the request from client, and the
server would parse and increment its value. the incremented value would
be set in the redirected URI.
this does not work as fragments are meaningless to servers and clients
like check_curl strip them in their GET request.
rewrite the fragment handling . if client sends a URI parameter with
'fragment' as its key, the server will set its value for its redirected
URI. it will come up both as a parameter and the fragment at the end.
use this new logic to rewrite the fragment redirection test. remove -p
$http_port argument on tests for this endpoint, which was making https
tests fail. correct the common test count from 75 to 95, as there are 20
total test assertions in the 8 times it uses the new endpoint. remove
unused code on that endpoint as well
|
|
If a SSL connection cannot be established, check_http bailed out with a
die function call with a NULL fmt string. This adds a more meaningful
message.
The motivation for this patch was to get everything from the OpenBSD
ports upstream. It seems like in the old days, this would have resulted
in a segfault.
https://codeberg.org/OpenBSD/ports/commit/b8a6b3cae57bbfd67e667dca583c621d45ab0d6f
However, even if "die" now checks for NULL, a human readable error is
nice to have.
|
|
On OpenBSD's "stdio.h", stdin, stdout, and stderr are not directly
FILE*, but #defines. Thus, naming the output struct fields stdout and
stderr resulted in compiler errors, after replacing the #define.
https://codeberg.org/OpenBSD/src/src/commit/a762189c5efbb2811f3c853bc0e5578fd5fb919d/include/stdio.h#L75-L77
|
|
The refactoring in eafee9c3f91879afa82749fa1d8cd2b0b53a5d5c missed the
part within "#if defined(SIOCGIFADDR)" in get_ip_address.
|
|
The ioctl(2) call within "#if defined(SIOCGIFADDR)" requires the include.
|
|
This library is glibc-only and not necessary at this point. The
getopt_long function is provided by "getopt.h", included via "common.h".
Similar to #2159.
|
|
On OpenBSD, crypt is named crypto. This diff is a portable version of a
patch residing in the OpenBSD ports since ages.
https://codeberg.org/OpenBSD/ports/src/commit/1f15238782c26deb728250cbf591f1ffcd10422f/net/monitoring-plugins/patches/patch-configure_ac
|
|
use the parameters in the last redirected URI that that server returns
HTTP OK to. matches the incrementation count of redirection_count from 0
to 3, as they also get incremented three times alongside it. add
comments about what is happening in the test cases, no need to
understand the endpoint completely
|
|
|
|
plugins/tests/check_curl.t forks and runs a http(s) server that responds
to specific uri endpoints. Added another endpoint under
/redirect_with_increment with dynamic redirection points.
This endpoint will parse different parts of the uri that come after the
path: parameters, query and the fragment. If applicable, seperate
elements within each field are parsed into key/value pairs. value is
incremented in redirected URI.
Tests if check_url redirection logic retains different parts of the url
when parsing the uri and building the new redirected URL. Current tests
show that it ignores the fragment part.
|
|
Check the UriUriA object, and if query string exists append it to the
new_url. Only appends the query part, fragments are still not appended
Function redir parses the new location header value using the
uriParseUriA function already, which populates the query field. This
field was already being printed, but it was not being appended to the
new_url during its construction.
Redirection chain of check_curl --onredirect=follow now mimics the chain
of check_http --onredirect=follow. Tested on the url:
mail.google.com/chat
|
|
Previously there was a space missing between perfdata from differen sub subchecks which irritated my monitoring system and caused it to interpet two data points as one.
This puts the space back in there.
|
|
In the previous commit I unintentionally introduced an error
through symbol shadowing.
This should fix check_ntp_time when the target address
is a network address.
|
|
check_ntp was marked as deprecated for forever (SVN times).
In the spirit of cleaning up and removing the dead bodies, this
commit removes check_ntp and all its connections.
|
|
check_nt was used to connect NSclient++ on windows, both the method
and the target are pretty much dead.
Therefor check_nt gets removed.
|
|
|
|
* check_dig: Add feature to require or forbid dig DNS flags -E, -X.
Introduced helper functions for flag parsing.
-E, --require-flags=LIST
Comma-separated dig flags that must be present (e.g. 'aa,qr')
-X, --forbid-flags=LIST
Comma-separated dig flags that must NOT be present
|
|
* check_curl: avoid freeing memory when we don't know where it came from
* check_curl: when using -f sticky conserve IPv6 addresses properly
When running the check on an ipv6 address with a sticky onredirect
policy like in this example:
check_curl -6 -H example.com -I ::1 -f sticky
It results in a getaddrinfo error:
HTTP CRITICAL - Unable to lookup IP address for '[::1]': getaddrinfo returned -3 - Temporary failure in name resolution
This happens because in check_http() if the content of server_addr is an
ipv6 address enclosing brackets are added and on redirection a
subsequent call to check_http() will pass this now bracketed value to
getaddrinfo resulting in the error.
To work around this, strip the brackets from the address prior to the
lookup_host() call.
* add Michael Jeanson to thanks
|
|
* check_ntp_time/check_ntp_peer: unix socket handling
* No tests for check_ntp since it is deprecated
|
|
check_mrtgtraf: modern output implementation
|
|
Look for either replica or slave in replica status
|
|
check_curl: abort redir if location is not found
|
|
check_curl: try to be more helpful in check_curls help
|
|
|
|
Trying to be more specific with the check_curl help.
The idea is to clarify how the parameters are supposed to be used.
|
|
This commit changes the behaviour of check_curl slightly.
Previously when the redirection method was set to the old 'check_http'
style redirection and there was no "location" header in the original
answer 'check_curl' segfaulted.
Now, at least it dies properly with a message.
|
|
|
|
|
|
check_mrtg: implement modern output
|
|
|
|
Add output formatting option where they were forgotten
|
|
|
|
check_ldap: modern output implementation
|
|
|