Mailinglist Archive: opensuse (3217 mails)

< Previous Next >
[opensuse] nagios host validation problem
  • From: Georg <opensuse07ml@xxxxxxxxxxx>
  • Date: Thu, 15 Nov 2007 15:47:37 +0100
  • Message-id: <473C5C09.6050204@xxxxxxxxxxx>
Hello,

i use nagios-plugins 1.4.5 on opensuse 10.2 and have the problem to
check a host via snmp which has a singe character in its hostname.

# /usr/lib/nagios/plugins/check_ifoperstatus -H blabla.x.mydom.loc -C
mycomm -v 1 -k 1 -t 30 -D w

returns error / syntax.

same command on blabla.xy.mydom.loc works fine.


patching as follows soved the problem:
--- /usr/lib/nagios/plugins/utils.pm.old 2006-11-28
00:26:07.000000000 +0100
+++ /usr/lib/nagios/plugins/utils.pm 2007-11-14 20:41:00.000000000 +0100
@@ -60,7 +60,7 @@
} else {
return 0;
}
- } elsif ($host1 =~
m/^[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*\.?$/) {
+ } elsif ($host1 =~
m/^[a-zA-Z][-a-zA-Z0-9]*(\.[a-zA-Z][-a-zA-Z0-9]*)*\.?$/) {
return 1;
} else {
return 0;


http://tools.ietf.org/html/rfc1035 says:

"...There are also some
restrictions on the length. Labels must be 63 characters or less.

For example, the following strings identify hosts in the Internet:

A.ISI.EDU XX.LCS.MIT.EDU SRI-NIC.ARPA"


is this a bug in nagios?

regards, georg
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
This Thread
Follow Ups