compile issue for nagios plugins 1.4.10

Dylan Bouterse dylan at corp.power1.com
Mon Oct 22 19:55:16 CEST 2007


I hope this goes back far enough and isn't overkill on the results of my make.


My configure command:
./configure --with-mysql=/usr

config.status: creating po/Makefile
            --with-apt-get-command: 
              --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
               --with-ping-command: /bin/ping -n -U -w %d -c %d %s
                       --with-ipv6: yes
                      --with-mysql: /usr/bin/mysql_config
                    --with-openssl: yes
                     --with-gnutls: no
                       --with-perl: /usr/bin/perl
             --enable-perl-modules: no
                     --with-cgiurl: /nagios/cgi-bin
               --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin

Snippet that shows the mysql error

gcc -g -O2 -o check_ide_smart check_ide_smart.o utils.o  -L/usr/local/src/nagios-plugins-1.4.10/plugins ../lib/libnagiosplug.a ../gl/libgnu.a
if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap  -I/usr/include -I/usr/include   -g -O2 -MT check_mysql-check_mysql.o -MD -MP -MF ".deps/check_mysql-check_mysql.Tpo" -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c; \
then mv -f ".deps/check_mysql-check_mysql.Tpo" ".deps/check_mysql-check_mysql.Po"; else rm -f ".deps/check_mysql-check_mysql.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2  -L. -o check_mysql  check_mysql-check_mysql.o netutils.o utils.o ../lib/libnagiosplug.a ../gl/libgnu.a  -lnsl -lresolv  
gcc -g -O2 -o check_mysql check_mysql-check_mysql.o netutils.o utils.o  -L/usr/local/src/nagios-plugins-1.4.10/plugins ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv
check_mysql-check_mysql.o(.text+0x5d9): In function `main':
/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:91: undefined reference to `mysql_init'
check_mysql-check_mysql.o(.text+0x5ef):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:93: undefined reference to `mysql_options'
check_mysql-check_mysql.o(.text+0x61d):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:96: undefined reference to `mysql_real_connect'
check_mysql-check_mysql.o(.text+0x637):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:112: undefined reference to `mysql_stat'
check_mysql-check_mysql.o(.text+0x653):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:115: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0x67f):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:126: undefined reference to `mysql_query'
check_mysql-check_mysql.o(.text+0x699):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:133: undefined reference to `mysql_store_result'
check_mysql-check_mysql.o(.text+0x6b8):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:140: undefined reference to `mysql_num_rows'
check_mysql-check_mysql.o(.text+0x6d3):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:146: undefined reference to `mysql_fetch_row'
check_mysql-check_mysql.o(.text+0x6f3):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:153: undefined reference to `mysql_field_count'
check_mysql-check_mysql.o(.text+0x72b):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:167: undefined reference to `mysql_num_fields'
check_mysql-check_mysql.o(.text+0x73d):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:168: undefined reference to `mysql_fetch_fields'
check_mysql-check_mysql.o(.text+0x80a):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:184: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0x818):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:185: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0x837):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:97: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x854):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:99: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x86d):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:101: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x88a):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:103: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x8a7):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:105: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x8c4):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:100: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0x8f6):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:221: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0x90b):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:225: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0x9ab):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:157: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0x9b9):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:192: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xa03):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:116: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0xa20):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:118: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0xa3d):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:120: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0xa5a):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:117: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xaca):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:191: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0xc3b):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:127: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xc53):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:128: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xc82):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:134: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xc9a):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:135: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xcb9):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:141: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xcde):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:147: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xcf4):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:148: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0xd02):/usr/local/src/nagios-plugins-1.4.10/plugins/check_mysql.c:149: undefined reference to `mysql_close'
collect2: ld returned 1 exit status
make[2]: *** [check_mysql] Error 1
make[2]: Leaving directory `/usr/local/src/nagios-plugins-1.4.10/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.10'
make: *** [all] Error 2

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Fulton, David
Sent: Monday, October 22, 2007 12:49 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_snmp syntax issue (now compileissuefornagios plugins)

Okay, now after reading the message again I understand(Duh). What sort of errors are you getting, could you post them so maybe we can help with options.

David Fulton

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Fulton, David
Sent: Monday, October 22, 2007 12:47 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_snmp syntax issue (now compile issuefornagios plugins)

Why do you want to skip it? If it finds the mysql libraries and header file it will make the check_mysql plugin. This could come in handy later. You never know when you will need it and it will be there just in case. If it doesn't find it, then it will not build it and no harm done?

David Fulton

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Dylan Bouterse
Sent: Monday, October 22, 2007 12:42 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check_snmp syntax issue (now compile issue fornagios plugins)

I am trying to compile the new Nagios plugins 1.4.10 but my make errors with mysql errors. What syntax do I use to skip the mysql plugin during compile/make?
--without-PACKAGE   ?
--disable-FEATURE   ?

Dylan

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Dylan Bouterse
Sent: Monday, October 22, 2007 12:01 PM
To: Yost, Josh; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_snmp syntax issue

I guess you have a different check_snmp version than I do because I was not showing a 2c option for the version. I will investigate that and see if that's my issue.

Dylan

From: Yost, Josh [mailto:josh.yost at epsiia.com] 
Sent: Monday, October 22, 2007 12:00 PM
To: Dylan Bouterse; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] check_snmp syntax issue

It looks like the -P switch will tell it which snmp version to use.  again, '-h' helps  =)
 
-P, --protocol=[1|2c|3]
    SNMP protocol version
- Josh

________________________________________
From: Dylan Bouterse [mailto:dylan at corp.power1.com]
Sent: Mon 10/22/2007 10:56 AM
To: Yost, Josh; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] check_snmp syntax issue
That may do it, but I can't get the host to respond using the check_snmp plugin. I think it may be a version mismatch. It seems the check_snmp plugin only supports SNMP v1 and v3, but not v2c. I cannot snmpget my device with v1 or v3.

Dylan


From: Yost, Josh [mailto:josh.yost at epsiia.com]
Sent: Monday, October 22, 2007 11:33 AM
To: Dylan Bouterse; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] check_snmp syntax issue

I think the:  --string='SYNC OK'   option would do it.  Try doing a '-h' on check_snmp to see all the options.
 
- Josh
 

________________________________________
From: nagios-users-bounces at lists.sourceforge.net on behalf of Dylan Bouterse
Sent: Mon 10/22/2007 10:24 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check_snmp syntax issue
I am trying to get check_snmp working to alert when my GPS sync stops
working on one of my devices. I can execute the snmpget command to get
the string but I'm having no luck in configuring a check_snmp syntax to
return values.


[root at ns1 cfg]# snmpget -v 2c -c community 1.1.20.3
1.3.6.1.4.1.161.19.3.4.4.13.0
SNMPv2-SMI::enterprises.161.19.3.4.4.13.0 = STRING: "SYNC OK"
[root at ns1 cfg]# snmpget -v 2c -c community 1.1.21.3
1.3.6.1.4.1.161.19.3.4.4.13.0
SNMPv2-SMI::enterprises.161.19.3.4.4.13.0 = STRING: "No SYNC"

How would I write the check_snmp command to show OK when "SYNC OK" and
alert critical when the "No SYNC" value is returned?

Dylan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list