[Nagiosplug-devel] [ nagiosplug-Bugs-3552818 ] configure script not compatible with newer version of net-to

SourceForge.net noreply at sourceforge.net
Wed Aug 1 00:42:59 CEST 2012


Bugs item #3552818, was opened at 2012-07-31 15:42
Message generated for change (Tracker Item Submitted) made by calestyo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3552818&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Cálestyo (calestyo)
Assigned to: Nobody/Anonymous (nobody)
Summary: configure script not compatible with newer version of net-to

Initial Comment:
Hi.

This is from the old / soon to be disabled again Nagios Plugins bug tracker that used to be at Nagios itself.
I've just copied this bug over. I'm not the original reporter and have no idea about the thoughts about this bug.

This used to be: http://tracker.nagios.org/view.php?id=298
--------------------------------------------------------------------------------
SethRobertson:
--------------------------------------------------------------------------------
The configure script parses the output of ifconfig to find first_ip. However, a newer version of ifconfig has a different output syntax which causes first_ip to be empty. (first_ip is subsequently used to try to probe PING_COMMAND which fails, causing check_ping to fail).

FAILING SYSTEM:
-----------------------------------
ifconfig --version
net-tools 1.60_p201111202031570500
ifconfig 1.42 (2001-04-13)

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
        inet 204.52.227.15 netmask 255.255.255.224 broadcast 204.52.227.159
        inet6 fe80::21d:60ff:fecf:3213 prefixlen 64 scopeid 0x20<link>
        RX packets 48697927 bytes 48259662481 (44.9 GiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 35395890 bytes 22321875058 (20.7 GiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device interrupt 17

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
        inet 172.25.111.5 netmask 255.255.255.252 broadcast 172.25.111.59
        inet6 fe80::21d:60ff:fecf:30d5 prefixlen 64 scopeid 0x20<link>
        ether 00:1d:60:cf:30:d5 txqueuelen 1000 (Ethernet)
        RX packets 15610212 bytes 9829520165 (9.1 GiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 9213019 bytes 628567083 (599.4 MiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device interrupt 16 base 0xec00

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10<host>
        loop txqueuelen 0 (Local Loopback)
        RX packets 126050249 bytes 344817663604 (321.1 GiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 126050249 bytes 344817663604 (321.1 GiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
-------------------------------------------------------------------


WORKING SYSTEM
-----------------------------------
ifconfig --version
net-tools 1.60_p20110409135728
ifconfig 1.42 (2001-04-13)

--------------------------------------------------------------------------------
SethRobertson:
--------------------------------------------------------------------------------
Gaa, it submitted before I was done. Stupid forms.

This was using nagios-plugins-1.4.15 running on Gentoo.

The following command would seem to work on both the new and old output syntax:

/sbin/ifconfig | egrep "inet (addr:)?" | sed -n -r -e 's/ (Bcast|netmask).*$//' -e 's/^\s*inet (addr:)?//' -e '1p'


One further suggestion (untested) is to simply use 127.0.0.1 if first_ip is undefined add the following line to configure.ac immediately after the first_ip definition attempt.

: ${first_ip:=127.0.0.1}


These are the working ifconfig output.

eth0 Link encap:Ethernet HWaddr 00:25:22:fd:c1:20
          inet addr:204.52.227.12 Bcast:204.52.227.255 Mask:255.255.255.224
          inet6 addr: fe80::225:22ff:fefd:c120/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
          RX packets:21482175 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40645487 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2750581366 (2.5 GiB) TX bytes:45839132246 (42.6 GiB)
          Interrupt:83 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:25:22:fd:c1:17
          inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.252
          inet6 addr: fe80::25:2f:fefd:c117/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:193824 errors:0 dropped:0 overruns:0 frame:0
          TX packets:318462 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21038697 (20.0 MiB) TX bytes:148442291 (141.5 MiB)
          Interrupt:84 Base address:0xa000 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3552818&group_id=29880




More information about the Devel mailing list