Lorenz Kästle
16cb24807d
ignore CNAMEs in RDNS-mode #1460
...
Suppose your provider uses RFC 2317 (or RFC 4183 for that matter). The output of nslookup could look like the following:
2.120.22.172.in-addr.arpa canonical name = 2.0/26.120.22.172.in-addr.arpa.
2.0/26.120.22.172.in-addr.arpa name = rajesh.intern.prauscher.de.
Without this filter, check_dns would check the string against "2.0/26.120.22.172.in-addr.arpa., rajesh.intern.prauscher.de." which will fail for obvious reasons.
In forward DNS, this is achieved in line 165, as nslookup will print the address separate from the CNAME-resolving.
Original commit by Patrick Rauscher (prauscher@prauscher.de ), adapted
here.
2025-03-09 15:43:06 +01:00
Lorenz Kästle
8b8ce8a605
Remove redundant NULL checks and replace deprecated index function
2025-03-09 12:41:13 +01:00
Lorenz Kästle
c0d9580dac
check_dns: some comments, small improvements
2025-03-09 12:11:02 +01:00
Lorenz Kästle
65794e3137
Refactor check_dns
2025-03-09 12:04:40 +01:00
Lorenz Kästle
230054f94d
clang-format
2025-03-08 10:55:21 +01:00
RincewindsHat
078e9b96ad
check_dns: update copyright
2024-10-31 03:33:51 +01:00
RincewindsHat
4f34506c81
check_dns: Linter fixes
2024-10-31 03:33:10 +01:00
RincewindsHat
702dc596a4
check_dns: do not export local variables
2024-10-31 03:30:42 +01:00
RincewindsHat
499c0a07ae
check_dns: clang-format
2024-10-31 03:29:32 +01:00
RincewindsHat
4f4fb3d9af
check_dns: Remove unused variable
2023-11-23 00:12:49 +01:00
RincewindsHat
07f9c438f3
Fixes for -Wsign-compare
2023-10-19 12:10:55 +02:00
RincewindsHat
ee80cc2591
check_dns: Another C99 boolean
2023-10-18 16:54:33 +02:00
RincewindsHat
a964f87d14
check_dns: Use C99 booleans
2023-10-18 16:22:45 +02:00
Jan Wagner
0f3703e641
Fix a lot of typos reported by codespell
2023-04-14 18:35:00 +00:00
Jonny007-MKD
cfc43a3275
Improvements suggested by tobiaswiese
2021-09-02 09:56:39 +02:00
Jonny007-MKD
2056c58531
check_dns: Fix memory leak
2021-09-02 09:56:39 +02:00
Jonny007-MKD
70f55ca9db
check_dns: add --expect-nxdomain
2021-09-02 09:56:39 +02:00
Rolf Eike Beer
ad99755033
check_dns: split multiple IP addresses passed in one -a argument
2020-11-02 20:05:56 +01:00
ghciv6
905b09c38b
detect unreachable dns service in nslookup output (from bind-utils-9.8.2)
...
prevent core if error_scan detects an error in a line without ':'
2020-05-20 23:02:42 +02:00
Rolf Eike Beer
763eb740b3
check_dns: fix typo in parameter description
2019-02-15 17:31:29 +01:00
Rolf Eike Beer
fd9a7d2e00
check_dns: allow forcing complete match of all addresses
2018-07-25 21:14:47 +02:00
Rolf Eike Beer
a03068743f
check_dns: allow returned addresses to be in any order
2018-07-25 20:18:47 +02:00
Rolf Eike Beer
e60c6c04f0
check_dns: simplify loop
2018-07-25 19:05:16 +02:00
Sven Nierlein
9daeceaed3
check_dns: fix error detection on sles nslookup
...
on sles (ex. 11sp1) systems the nslookup output for not found was not parsed correctly
and interpreted as ok when it should be critical:
./check_dns -H nosuchhost.nodomain -t 1 -vvv
/usr/bin/nslookup -sil nosuchhost.nodomain Server: 10.0.2.3
Address: 10.0.2.3#53
Non-authoritative answer:
*** Can't find nosuchhost.nodomain: No answer
DNS OK: 0.011 seconds response time. nosuchhost.nodomain returns |time=0.010892s;;;0.000000
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12 21:02:58 +01:00
Nicolai
ea756ac4ad
check_dns: Tests and info
2016-12-23 20:44:45 +01:00
Nicolai Søborg
22e78763ea
check_dns: Accept CIDR
2016-12-21 17:24:29 +01:00
Patrick Rauscher
f524b15e57
check_dns: allow for IPv6 RDNS
2016-12-20 21:59:58 +01:00
Sven Nierlein
28d4812860
Merge pull request #1307 from waja/check_dns_dead_code
...
check_dns: remove dead code
2016-11-07 23:05:26 +01:00
Sven Geggus
d44b8d70a4
DNS is case insensitive!
...
Thus recent Versions of bind will no longer change .IN-ADDR.ARPA to lowercase
as the uppercase version is also valid.
To have check_dns.c consider this fact change strstr to strcasestr
2016-02-22 17:14:27 +01:00
Sven Nierlein
edca257e20
use unknown exit code for help/version in plugins
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Sebastian Herbszt
193ea6b5d7
check_dns: remove dead code
...
Remove code dead since commit 4efa917 .
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
2014-12-15 17:44:13 +01:00
Sven Nierlein
18a9562dae
check_dns: unified check output
...
this also allows us to make tests against "critical" in the output.
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-31 12:13:52 +02:00
Jan Wagner
b7ce241ba6
check_dns: Use strchr instead of index
2014-07-30 23:30:59 +02:00
Jan Wagner
d0da78ced1
check_dns: returns incorrect state when specifying server
...
This patch verifies if the response is returned by the dns server we
are trying to check
---
Closes #981
Closes #982
Closes #1164
2014-07-30 13:16:37 +02:00
abrist
e49973493c
check_dns.c Added a bit more logic to thresholds
...
Added two if elses to cover when only one threshold is set.
2014-06-28 22:01:16 +02:00
Jean-Claude Computing
79ba1f90db
check_dns: add warning and critical thresholds to perfdata
2014-06-28 22:01:16 +02:00
Thomas Guyot-Sionnest
11cf54ca78
Merge branch 'rename'
2014-01-21 07:59:07 -05:00
Spenser Reinhardt
212575b858
plugins/*.c: Alterations for timeout messages.
...
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim.
Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-21 11:33:45 +01:00
Holger Weiss
c3e756a855
Capitalize "Monitoring" when it's the first word
2014-01-20 03:12:50 +01:00
Monitoring Plugins Development Team
63734f52ab
Project rename initial commit.
...
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.
2014-01-19 14:18:47 -05:00
Diego Elio Petten
332c6ef2c7
plugins: rename runcmd's signal handler.
...
The previous name would collide with popen's. Even if the two are
never used together, it's still a good idea not to have the same
symbol in multiple object files.
2013-05-12 14:15:13 +02:00
Anders Kaseorg
028d50d6f9
Die when asprintf fails
...
Fixes many instances of
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29 13:39:11 +02:00
Thomas Guyot-Sionnest
eaf3cb27f4
Add newline after "Usage:" in --help
2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
884aee0667
Standardize the extra-opts notes
2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
25d1ee331d
Fix translations when extra-opts aren't enabled
...
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.
2010-04-14 08:33:06 -04:00
Ton Voon
5324544855
Typo fixes (Jan Wagner - SF 1878971)
2009-02-20 00:00:13 +00:00
Thomas Guyot-Sionnest
6fbd14fea5
Removing CVS/SVN tags and replacing with git-based versioning
...
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
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
caa8bd6423
Bulk EOL cleanup
...
$ 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
2008-11-19 06:45:18 +00:00
Thomas Guyot-Sionnest
4e366f82de
Fix long options parsing in check_disk, check_dns, check_mrtg and check_mrtgtraf (check_tcp was done in an earlier commit)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2078 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-08 16:33:15 +00:00
Thomas Guyot-Sionnest
7e3fc482ed
Typo
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1992 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-13 09:14:45 +00:00