Age | Commit message (Collapse) | Author |
|
address family and not sockaddr_storage (#1771)
Co-authored-by: Erik Sejr <eriks@ssimicro.com>
Co-authored-by: Lorenz <12514511+RincewindsHat@users.noreply.github.com>
|
|
* Fix different overflows
* Less includes
* Add testcases
* Remove unused variable
* Remove unused and commented includes
|
|
- add a test to check '-s'
|
|
|
|
|
|
Add missing "warn" threshold field in "pkt" perfdata output.
Perfdata should be interpreted as;
'label'=value[UOM];[warn];[crit];[min];[max]
With one field missing, the hardcoded min value '0' ended up in the
"crit" field, making applications interpreting the perfdata thining that
critical threshold is always exceeded.
Signed-off-by: Aksel Sjögren <asjogren@itrsgroup.com>
|
|
There is a small typo in plugins-root/check_icmp.c.
Should read `conspicuously` rather than `conspicuosly`.
|
|
In case we needed to do a lookup, we previously overwrote the
address_family to IPv6, even if we supplied -4 as a cmd line argument.
This commit should ensure the cmd line argument is always followed.
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
As we do not support checking both IPv4 and IPv6 hosts in one execution
we emit an error if multiple protocol versions are defined in the cmd
line args.
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
This commit moves the opts string into a variable as it is now used
twice.
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
If a hostname is supplied instead of an IP address, the automatic
address family detection would fail to correctly set the IP protocol
version (it would always be IPv6).
We now supply AF_UNSPEC to getaddrinfo, which should then return the
correct address family in the result.
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
Detection of protocol version is in the previous patch implemented in
the add_target() function, which is called when adding the -H command
line argument. That means that if a protocal version argument (-4, -6)
is added after the -H then the protocol version might be incorrectly
set.
This patch ensures that we first process the protocol version arguments,
and then we process the rest of the arguments.
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
This patch automatically detects whether the protocol version is IPv4 or
IPv6
All credits to: https://github.com/ghciv6
Signed-off-by: Jacob Hansen <jhansen@op5.com>
|
|
|
|
This commit adds IPv6 capabilities to check_icmp. It is now possible to
specify the address family using the arguments -4 (default) or -6.
To make the change possible we had to move the argument parsing previous
to creating the socket to be able to create it with the correct address
family.
This commit also fixes some gcc 4.9.2 compiler warnings. It has been
tested with several current linux distributions (debian, ubuntu, rh,
sles).
This commit fixes monitoring-plugins/monitoring-plugins#1291
|
|
|
|
|
|
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
since MSG_CONFIRM is a linux thing and only available on linux kernels >= 2.3.15, see send(2)
|
|
Convert size_t values to unsigned long for printf(3) in order to
maximize portability.
|
|
|
|
We still support pre-C99 compilers.
|
|
This commit uses the SO_TIMESTAMP feature of setsockopt to fetch
kernel reception time of ICMP packets. This avoids invalid
computations of rtt on machines with heavy load and/or heavy
network traffic.
|
|
As it is possible to use capabilities(7) on linux or solaris
privileges for example, it is not necessary in all cases to
have those binaries making use of setuid.
|
|
"Monitoring Plugins" is a name.
|
|
|
|
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
|
|
|
|
Let check_icmp provide "--help" and "--version" flags (in addition to
"-h" and "-V"), just as the other plugins do.
|
|
When specifying a host-name on the command line, each of its IPs is added to
the host table (and each one is pinged). So, the buffer has to be large enough
to hold all of the respective host objects. (argc - 1) only fits hosts with a
single IP.
Thanks to Max Kosmach <max@tcen.ru> for reporting this in Debian bug #623702.
|
|
|
|
|
|
Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files.
This patch moves gettext macros inside utils macros and update some
french translations.
|
|
|
|
|
|
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more.
The RTA calculation hopefully gets a more accurate value in these cases also.
|
|
Buffers which are used for holding arbitrary data should be referenced
using pointers to void and accessed using pointers to unsigned char.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
Self defined DBL_MAX caused compiler warnings. Now float.h
which defines DBL_MAX is included.
|
|
debian #530553)
check_icmp wrongly calculated the current thresholds in --help output.
|
|
For contrib/, full tags have been imported from subversion
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
|
|
$ git diff --ignore-space-change|diffstat
0 files changed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2073 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2029 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2027 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2026 f882894a-f735-0410-b71e-b25c423dba1c
|
|
configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1985 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1920 f882894a-f735-0410-b71e-b25c423dba1c
|
|
certain circumstances).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1897 f882894a-f735-0410-b71e-b25c423dba1c
|