NagiosEnterprises / ndoutils

NDOUtils - Database Output for Nagios Core
GNU General Public License v2.0
48 stars 19 forks source link

Module ndomod.o is using an old or unspecified version of the event broker API. Module will be unloaded. #21

Closed box293 closed 4 years ago

box293 commented 8 years ago

I'm seeing this on FreeBSD:

[1475647908] Nagios 4.2.1 starting... (PID=565)
[1475647908] Local time is Wed Oct 05 17:11:48 AEDT 2016
[1475647908] LOG VERSION: 2.0
[1475647908] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1475647908] qh: core query handler registered
[1475647908] nerd: Channel hostchecks registered successfully
[1475647908] nerd: Channel servicechecks registered successfully
[1475647908] nerd: Channel opathchecks registered successfully
[1475647908] nerd: Fully initialized and ready to rock!
[1475647908] wproc: Successfully registered manager as @wproc with query handler
[1475647908] wproc: Registry request: name=Core Worker 573;pid=573
[1475647908] wproc: Registry request: name=Core Worker 574;pid=574
[1475647908] wproc: Registry request: name=Core Worker 575;pid=575
[1475647908] wproc: Registry request: name=Core Worker 572;pid=572
[1475647908] Error: Module '/usr/local/nagios/bin/ndomod.o' is using an old or unspecified version of the event broker API.  Module will be unloaded.
[1475647908] Caught SIGSEGV, shutting down...

Nagios 4.2.1 on FreeBSD 10.3 using NDOUtils in the maint branch.

jfrickson commented 8 years ago

By default, ndoutils builds versions compatible with Nagios v2, v3, and v4. Are you sure the correct ndomod.o got installed?

box293 commented 8 years ago

Yes I believe it did:

root@core-037:/tmp/ndoutils-maint # gmake install
cd ./src && gmake install
gmake[1]: Entering directory '/tmp/ndoutils-maint/src'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 -o nagios -g nagios ndo2db-4x /usr/local/nagios/bin/ndo2db
/usr/bin/install -c -m 755 -o nagios -g nagios ndomod-4x.o /usr/local/nagios/bin/ndomod.o
/usr/bin/install -c -m 774 -o nagios -g nagios file2sock /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios log2ndo /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios sockdebug /usr/local/nagios/bin

  Hint: NDOUtils Installation against Nagios v4.x
  completed.

  If you want to install NDOUtils for Nagios v3.x
  please type  'make install-3x

  If you want to install NDOUtils for Nagios v2.x
  please type  'make install-2x

  Next step should be the database initialization/upgrade
  cd into the db/ directory and either:
     ./installdb  (for a new installation) or:
     ./upgradedb  (for an existing one)

gmake[1]: Leaving directory '/tmp/ndoutils-maint/src'

Main NDOUtils components installed

root@core-037:/tmp/ndoutils-maint # 

Here are all the steps performed with all the output using the maint branch:

root@core-037:~ # cd /tmp
root@core-037:/tmp # wget https://github.com/NagiosEnterprises/ndoutils/archive/maint.zip
--2016-10-18 11:50:35--  https://github.com/NagiosEnterprises/ndoutils/archive/maint.zip
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/NagiosEnterprises/ndoutils/zip/maint [following]
--2016-10-18 11:50:36--  https://codeload.github.com/NagiosEnterprises/ndoutils/zip/maint
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: 'maint.zip'

maint.zip                         [                  <=>                            ]   2.28M   519KB/s   in 4.8s   

2016-10-18 11:50:42 (491 KB/s) - 'maint.zip' saved [2394476]

root@core-037:/tmp # unzip maint.zip 
Archive:  maint.zip
d ndoutils-maint
 extracting: ndoutils-maint/.gitignore  
 extracting: ndoutils-maint/Changelog  
 extracting: ndoutils-maint/LEGAL  
 extracting: ndoutils-maint/LICENSE  
 extracting: ndoutils-maint/Makefile.in  
 extracting: ndoutils-maint/README  
 extracting: ndoutils-maint/REQUIREMENTS  
 extracting: ndoutils-maint/THANKS  
 extracting: ndoutils-maint/TODO  
 extracting: ndoutils-maint/UPGRADING  
 extracting: ndoutils-maint/aclocal.m4  
 extracting: ndoutils-maint/config.guess  
 extracting: ndoutils-maint/config.sub  
d ndoutils-maint/config
 extracting: ndoutils-maint/config/misccommands.cfg.in  
 extracting: ndoutils-maint/config/nagios.cfg.in  
 extracting: ndoutils-maint/config/ndo2db.cfg-sample.in  
 extracting: ndoutils-maint/config/ndomod.cfg-sample.in  
 extracting: ndoutils-maint/configure  
 extracting: ndoutils-maint/configure.ac  
d ndoutils-maint/db
 extracting: ndoutils-maint/db/README  
 extracting: ndoutils-maint/db/installdb  
 extracting: ndoutils-maint/db/mysql-mods-1.4b5.sql  
 extracting: ndoutils-maint/db/mysql-mods-1.4b7.sql  
 extracting: ndoutils-maint/db/mysql-mods-1.4b8.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.3.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b1.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b2.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b3.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b4.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b5.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b6.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-1.4b8.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-2.0.0.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-2.0.1.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-2.1.0.sql  
 extracting: ndoutils-maint/db/mysql-upgrade-2.1.2.sql  
 extracting: ndoutils-maint/db/mysql.sql  
 extracting: ndoutils-maint/db/prepsql  
d ndoutils-maint/db/queries
 extracting: ndoutils-maint/db/queries/comment_history.sql  
 extracting: ndoutils-maint/db/queries/comments.sql  
 extracting: ndoutils-maint/db/queries/contact_notification_methods.sql  
 extracting: ndoutils-maint/db/queries/contact_notifications.sql  
 extracting: ndoutils-maint/db/queries/contact_status.sql  
 extracting: ndoutils-maint/db/queries/contactgroup_membership.sql  
 extracting: ndoutils-maint/db/queries/contacts.sql  
 extracting: ndoutils-maint/db/queries/downtime_history.sql  
 extracting: ndoutils-maint/db/queries/event_handlers.sql  
 extracting: ndoutils-maint/db/queries/flapping_history.sql  
 extracting: ndoutils-maint/db/queries/host_comments.sql  
 extracting: ndoutils-maint/db/queries/host_downtime_history.sql  
 extracting: ndoutils-maint/db/queries/host_event_handlers.sql  
 extracting: ndoutils-maint/db/queries/host_flapping_history.sql  
 extracting: ndoutils-maint/db/queries/host_notifications.sql  
 extracting: ndoutils-maint/db/queries/host_state_history.sql  
 extracting: ndoutils-maint/db/queries/host_status.sql  
 extracting: ndoutils-maint/db/queries/hostgroup_membership.sql  
 extracting: ndoutils-maint/db/queries/hosts.sql  
 extracting: ndoutils-maint/db/queries/notifications.sql  
 extracting: ndoutils-maint/db/queries/scheduled_downtime.sql  
 extracting: ndoutils-maint/db/queries/service_comments.sql  
 extracting: ndoutils-maint/db/queries/service_downtime_history.sql  
 extracting: ndoutils-maint/db/queries/service_event_handlers.sql  
 extracting: ndoutils-maint/db/queries/service_flapping_history.sql  
 extracting: ndoutils-maint/db/queries/service_notifications.sql  
 extracting: ndoutils-maint/db/queries/service_state_history.sql  
 extracting: ndoutils-maint/db/queries/service_status.sql  
 extracting: ndoutils-maint/db/queries/servicegroup_membership.sql  
 extracting: ndoutils-maint/db/queries/services.sql  
 extracting: ndoutils-maint/db/queries/state_history.sql  
 extracting: ndoutils-maint/db/queries/timed_event_queue.sql  
 extracting: ndoutils-maint/db/queries/timed_events.sql  
 extracting: ndoutils-maint/db/upgradedb  
d ndoutils-maint/docs
 extracting: ndoutils-maint/docs/NDOUTILS DB Model.odt  
 extracting: ndoutils-maint/docs/NDOUTILS DB Model.pdf  
 extracting: ndoutils-maint/docs/NDOUtils Documentation.odt  
 extracting: ndoutils-maint/docs/NDOUtils Documentation.pdf  
d ndoutils-maint/docs/docbook
d ndoutils-maint/docs/docbook/en-en
 extracting: ndoutils-maint/docs/docbook/en-en/Makefile.in  
 extracting: ndoutils-maint/docs/docbook/en-en/NDOUtils.xml  
 extracting: ndoutils-maint/docs/docbook/en-en/all-entities.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/components.xml  
d ndoutils-maint/docs/docbook/en-en/ent
 extracting: ndoutils-maint/docs/docbook/en-en/ent/documents.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/ent/names.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/ent/plugins.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/ent/protocols.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/ent/urls.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/ent/version.ent  
 extracting: ndoutils-maint/docs/docbook/en-en/example-configs.xml  
 extracting: ndoutils-maint/docs/docbook/en-en/installation.xml  
 extracting: ndoutils-maint/docs/docbook/en-en/introduction.xml  
 extracting: ndoutils-maint/docs/docbook/en-en/whatsnew.xml  
d ndoutils-maint/docs/docbook/images
 extracting: ndoutils-maint/docs/docbook/images/fig1.png  
 extracting: ndoutils-maint/docs/docbook/images/fig10.png  
 extracting: ndoutils-maint/docs/docbook/images/fig11.png  
 extracting: ndoutils-maint/docs/docbook/images/fig12.png  
 extracting: ndoutils-maint/docs/docbook/images/fig13.png  
 extracting: ndoutils-maint/docs/docbook/images/fig2.png  
 extracting: ndoutils-maint/docs/docbook/images/fig3.png  
 extracting: ndoutils-maint/docs/docbook/images/fig4.png  
 extracting: ndoutils-maint/docs/docbook/images/fig5.png  
 extracting: ndoutils-maint/docs/docbook/images/fig6.png  
 extracting: ndoutils-maint/docs/docbook/images/fig7.png  
 extracting: ndoutils-maint/docs/docbook/images/fig8.png  
 extracting: ndoutils-maint/docs/docbook/images/fig9.png  
 extracting: ndoutils-maint/docs/docbook/images/important.png  
 extracting: ndoutils-maint/docs/docbook/images/logofullsize.png  
 extracting: ndoutils-maint/docs/docbook/images/note.png  
 extracting: ndoutils-maint/docs/docbook/images/tip.png  
d ndoutils-maint/docs/docbook/xsl
 extracting: ndoutils-maint/docs/docbook/xsl/fo.xsl  
 extracting: ndoutils-maint/docs/docbook/xsl/html-chunked.xsl  
 extracting: ndoutils-maint/docs/docbook/xsl/html-single.xsl  
 extracting: ndoutils-maint/docs/docbook/xsl/titlepage.xml  
 extracting: ndoutils-maint/docs/docbook/xsl/titlepage.xsl  
d ndoutils-maint/docs/html
d ndoutils-maint/docs/html/en-en
 extracting: ndoutils-maint/docs/html/en-en/ch01.html  
 extracting: ndoutils-maint/docs/html/en-en/ch02.html  
 extracting: ndoutils-maint/docs/html/en-en/ch03.html  
 extracting: ndoutils-maint/docs/html/en-en/ch04.html  
 extracting: ndoutils-maint/docs/html/en-en/components.html  
 extracting: ndoutils-maint/docs/html/en-en/example-configs.html  
 extracting: ndoutils-maint/docs/html/en-en/index.html  
 extracting: ndoutils-maint/docs/html/en-en/installation.html  
 extracting: ndoutils-maint/docs/html/en-en/intro.html  
 extracting: ndoutils-maint/docs/html/en-en/whatsnew.html  
d ndoutils-maint/docs/html/images
 extracting: ndoutils-maint/docs/html/images/fig1.png  
 extracting: ndoutils-maint/docs/html/images/fig10.png  
 extracting: ndoutils-maint/docs/html/images/fig11.png  
 extracting: ndoutils-maint/docs/html/images/fig12.png  
 extracting: ndoutils-maint/docs/html/images/fig13.png  
 extracting: ndoutils-maint/docs/html/images/fig2.png  
 extracting: ndoutils-maint/docs/html/images/fig3.png  
 extracting: ndoutils-maint/docs/html/images/fig4.png  
 extracting: ndoutils-maint/docs/html/images/fig5.png  
 extracting: ndoutils-maint/docs/html/images/fig6.png  
 extracting: ndoutils-maint/docs/html/images/fig7.png  
 extracting: ndoutils-maint/docs/html/images/fig8.png  
 extracting: ndoutils-maint/docs/html/images/fig9.png  
 extracting: ndoutils-maint/docs/html/images/important.png  
 extracting: ndoutils-maint/docs/html/images/logofullsize.png  
 extracting: ndoutils-maint/docs/html/images/note.png  
 extracting: ndoutils-maint/docs/html/images/tip.png  
d ndoutils-maint/include
 extracting: ndoutils-maint/include/common.h.in  
 extracting: ndoutils-maint/include/config.h.in  
 extracting: ndoutils-maint/include/db.h  
 extracting: ndoutils-maint/include/dbhandlers.h  
 extracting: ndoutils-maint/include/getheaders  
 extracting: ndoutils-maint/include/io.h.in  
d ndoutils-maint/include/nagios-2x
 extracting: ndoutils-maint/include/nagios-2x/broker.h  
 extracting: ndoutils-maint/include/nagios-2x/cgiauth.h  
 extracting: ndoutils-maint/include/nagios-2x/cgiutils.h  
 extracting: ndoutils-maint/include/nagios-2x/comments.h  
 extracting: ndoutils-maint/include/nagios-2x/common.h  
 extracting: ndoutils-maint/include/nagios-2x/config.h  
 extracting: ndoutils-maint/include/nagios-2x/downtime.h  
 extracting: ndoutils-maint/include/nagios-2x/epn_nagios.h  
 extracting: ndoutils-maint/include/nagios-2x/getcgi.h  
 extracting: ndoutils-maint/include/nagios-2x/locations.h  
 extracting: ndoutils-maint/include/nagios-2x/nagios.h  
 extracting: ndoutils-maint/include/nagios-2x/nebcallbacks.h  
 extracting: ndoutils-maint/include/nagios-2x/neberrors.h  
 extracting: ndoutils-maint/include/nagios-2x/nebmods.h  
 extracting: ndoutils-maint/include/nagios-2x/nebmodules.h  
 extracting: ndoutils-maint/include/nagios-2x/nebstructs.h  
 extracting: ndoutils-maint/include/nagios-2x/objects.h  
 extracting: ndoutils-maint/include/nagios-2x/perfdata.h  
 extracting: ndoutils-maint/include/nagios-2x/snprintf.h  
 extracting: ndoutils-maint/include/nagios-2x/sretention.h  
 extracting: ndoutils-maint/include/nagios-2x/statusdata.h  
d ndoutils-maint/include/nagios-3x
 extracting: ndoutils-maint/include/nagios-3x/broker.h  
 extracting: ndoutils-maint/include/nagios-3x/cgiauth.h  
 extracting: ndoutils-maint/include/nagios-3x/cgiutils.h  
 extracting: ndoutils-maint/include/nagios-3x/comments.h  
 extracting: ndoutils-maint/include/nagios-3x/common.h  
 extracting: ndoutils-maint/include/nagios-3x/compat.h  
 extracting: ndoutils-maint/include/nagios-3x/config.h  
 extracting: ndoutils-maint/include/nagios-3x/downtime.h  
 extracting: ndoutils-maint/include/nagios-3x/epn_nagios.h  
 extracting: ndoutils-maint/include/nagios-3x/getcgi.h  
 extracting: ndoutils-maint/include/nagios-3x/locations.h  
 extracting: ndoutils-maint/include/nagios-3x/logging.h  
 extracting: ndoutils-maint/include/nagios-3x/macros.h  
 extracting: ndoutils-maint/include/nagios-3x/nagios.h  
 extracting: ndoutils-maint/include/nagios-3x/nebcallbacks.h  
 extracting: ndoutils-maint/include/nagios-3x/neberrors.h  
 extracting: ndoutils-maint/include/nagios-3x/nebmods.h  
 extracting: ndoutils-maint/include/nagios-3x/nebmodules.h  
 extracting: ndoutils-maint/include/nagios-3x/nebstructs.h  
 extracting: ndoutils-maint/include/nagios-3x/netutils.h  
 extracting: ndoutils-maint/include/nagios-3x/objects.h  
 extracting: ndoutils-maint/include/nagios-3x/perfdata.h  
 extracting: ndoutils-maint/include/nagios-3x/shared.h  
 extracting: ndoutils-maint/include/nagios-3x/skiplist.h  
 extracting: ndoutils-maint/include/nagios-3x/snprintf.h  
 extracting: ndoutils-maint/include/nagios-3x/sretention.h  
 extracting: ndoutils-maint/include/nagios-3x/statusdata.h  
d ndoutils-maint/include/nagios-4x
 extracting: ndoutils-maint/include/nagios-4x/broker.h  
 extracting: ndoutils-maint/include/nagios-4x/cgiauth.h  
 extracting: ndoutils-maint/include/nagios-4x/cgiutils.h  
 extracting: ndoutils-maint/include/nagios-4x/comments.h  
 extracting: ndoutils-maint/include/nagios-4x/common.h  
 extracting: ndoutils-maint/include/nagios-4x/config.h  
 extracting: ndoutils-maint/include/nagios-4x/defaults.h  
 extracting: ndoutils-maint/include/nagios-4x/downtime.h  
 extracting: ndoutils-maint/include/nagios-4x/getcgi.h  
d ndoutils-maint/include/nagios-4x/lib
 extracting: ndoutils-maint/include/nagios-4x/lib/bitmap.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/dkhash.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/fanout.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/iobroker.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/iocache.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/kvvec.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/libnagios.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/lnag-utils.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/nsock.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/nspath.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/nsutils.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/pqueue.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/runcmd.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/skiplist.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/snprintf.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/squeue.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/t-utils.h  
 extracting: ndoutils-maint/include/nagios-4x/lib/worker.h  
 extracting: ndoutils-maint/include/nagios-4x/locations.h  
 extracting: ndoutils-maint/include/nagios-4x/logging.h  
 extracting: ndoutils-maint/include/nagios-4x/macros.h  
 extracting: ndoutils-maint/include/nagios-4x/nagios.h  
 extracting: ndoutils-maint/include/nagios-4x/nebcallbacks.h  
 extracting: ndoutils-maint/include/nagios-4x/neberrors.h  
 extracting: ndoutils-maint/include/nagios-4x/nebmods.h  
 extracting: ndoutils-maint/include/nagios-4x/nebmodules.h  
 extracting: ndoutils-maint/include/nagios-4x/nebstructs.h  
 extracting: ndoutils-maint/include/nagios-4x/netutils.h  
 extracting: ndoutils-maint/include/nagios-4x/objects.h  
 extracting: ndoutils-maint/include/nagios-4x/perfdata.h  
 extracting: ndoutils-maint/include/nagios-4x/shared.h  
 extracting: ndoutils-maint/include/nagios-4x/snprintf.h  
 extracting: ndoutils-maint/include/nagios-4x/sretention.h  
 extracting: ndoutils-maint/include/nagios-4x/statusdata.h  
 extracting: ndoutils-maint/include/nagios-4x/workers.h  
 extracting: ndoutils-maint/include/ndo2db.h  
 extracting: ndoutils-maint/include/ndomod.h  
 extracting: ndoutils-maint/include/protoapi.h  
 extracting: ndoutils-maint/include/queue.h  
 extracting: ndoutils-maint/include/utils.h  
 extracting: ndoutils-maint/install-sh  
d ndoutils-maint/m4
 extracting: ndoutils-maint/m4/np_mysqlclient.m4  
d ndoutils-maint/macros
 extracting: ndoutils-maint/macros/.gitignore  
 extracting: ndoutils-maint/macros/LICENSE  
 extracting: ndoutils-maint/macros/README.md  
 extracting: ndoutils-maint/macros/add_group_user  
 extracting: ndoutils-maint/macros/ax_nagios_get_distrib  
 extracting: ndoutils-maint/macros/ax_nagios_get_files  
 extracting: ndoutils-maint/macros/ax_nagios_get_inetd  
 extracting: ndoutils-maint/macros/ax_nagios_get_init  
 extracting: ndoutils-maint/macros/ax_nagios_get_os  
 extracting: ndoutils-maint/macros/ax_nagios_get_paths  
 extracting: ndoutils-maint/macros/ax_nagios_get_ssl  
 extracting: ndoutils-maint/make-tarball  
d ndoutils-maint/src
 extracting: ndoutils-maint/src/Makefile.in  
 extracting: ndoutils-maint/src/db.c  
 extracting: ndoutils-maint/src/dbhandlers.c  
 extracting: ndoutils-maint/src/file2sock.c  
 extracting: ndoutils-maint/src/io.c  
 extracting: ndoutils-maint/src/log2ndo.c  
 extracting: ndoutils-maint/src/ndo2db.c  
 extracting: ndoutils-maint/src/ndomod.c  
 extracting: ndoutils-maint/src/protonum.c  
 extracting: ndoutils-maint/src/queue.c  
 extracting: ndoutils-maint/src/snprintf.c  
 extracting: ndoutils-maint/src/sockdebug.c  
 extracting: ndoutils-maint/src/utils.c  
d ndoutils-maint/startup
 extracting: ndoutils-maint/startup/bsd-init.in  
 extracting: ndoutils-maint/startup/debian-init.in  
 extracting: ndoutils-maint/startup/default-inetd.in  
 extracting: ndoutils-maint/startup/default-init.in  
 extracting: ndoutils-maint/startup/default-service.in  
 extracting: ndoutils-maint/startup/default-socket-svc.in  
 extracting: ndoutils-maint/startup/default-socket.in  
 extracting: ndoutils-maint/startup/default-xinetd.in  
 extracting: ndoutils-maint/startup/mac-inetd.plist.in  
 extracting: ndoutils-maint/startup/mac-init.plist.in  
 extracting: ndoutils-maint/startup/newbsd-init.in  
 extracting: ndoutils-maint/startup/openbsd-init.in  
 extracting: ndoutils-maint/startup/openrc-conf.in  
 extracting: ndoutils-maint/startup/openrc-init.in  
 extracting: ndoutils-maint/startup/rh-upstart-init.in  
 extracting: ndoutils-maint/startup/solaris-inetd.xml.in  
 extracting: ndoutils-maint/startup/solaris-init.xml.in  
 extracting: ndoutils-maint/startup/tmpfile.conf.in  
 extracting: ndoutils-maint/startup/upstart-init.in  
 extracting: ndoutils-maint/update-version  

root@core-037:/tmp # cd ndoutils-maint/
root@core-037:/tmp/ndoutils-maint # sed -i '' 's/-g root/-g wheel/g' Makefile.in
root@core-037:/tmp/ndoutils-maint # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking for perl... /usr/local/bin/perl
checking build system type... x86_64-unknown-freebsd10.3
checking host system type... x86_64-unknown-freebsd10.3
checking for gcc... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking what the operating system is ... bsd
checking what the distribution type is ... freebsd
checking what init system is being used ... newbsd
checking what inetd is being used ... inetd (Not running)
checking for which paths to use ... default
checking for which init file to use ... newbsd-init
checking for which inetd files to use ... default-inetd
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... no
checking sys/sendfile.h presence... no
checking for sys/sendfile.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking size of int... 4
checking size of short... 2
checking size of long... 8
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for main in -lnsl... no
checking for socket in -lsocket... no
checking for main in -lwrap... yes
checking for getopt_long... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for nanosleep... yes
checking for va_copy... yes
checking for snprintf... yes
checking for asprintf... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -shared
checking for mysql_config... /usr/local/bin/mysql_config
checking for mysql_init in -lmysqlclient... yes
MySQL library and include file(s) were found!
checking for library containing sd_listen_fds... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config/ndo2db.cfg-sample
config.status: creating config/ndomod.cfg-sample
config.status: creating config/nagios.cfg
config.status: creating config/misccommands.cfg
config.status: creating docs/docbook/en-en/Makefile
config.status: creating include/io.h
config.status: creating include/common.h
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
config.status: creating startup/default-service
config.status: creating startup/default-socket
config.status: creating startup/default-socket-svc
config.status: creating startup/default-xinetd
config.status: creating startup/mac-init.plist
config.status: creating startup/mac-inetd.plist
config.status: creating startup/newbsd-init
config.status: creating startup/openbsd-init
config.status: creating startup/openrc-conf
config.status: creating startup/openrc-init
config.status: creating startup/solaris-init.xml
config.status: creating startup/solaris-inetd.xml
config.status: creating startup/tmpfile.conf
config.status: creating startup/upstart-init
config.status: creating startup/rh-upstart-init
config.status: creating include/config.h

*** Configuration summary for ndoutils 2.1.1 09-06-2016 ***:

 General Options:
 -------------------------
 NDO2DB user:      nagios
 NDO2DB group:     nagios
 NDO2DB tcp port:  5668

Review the options above for accuracy.  If they look
okay, type 'make all' to compile the NDO utilities,
or type 'make' to get a list of make options.

root@core-037:/tmp/ndoutils-maint # gmake all
cd ./src && gmake
gmake[1]: Entering directory '/tmp/ndoutils-maint/src'
cc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -c -o io.o io.c
cc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -c -o utils.o utils.c
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm  
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -o log2ndo log2ndo.c io.o utils.o   -lm  
gmake ndo2db-2x
gmake[2]: Entering directory '/tmp/ndoutils-maint/src'
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -c -o db.o db.c
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
18 warnings generated.
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_2X -o ndo2db-2x queue.c ndo2db.c dbhandlers-2x.o  io.o utils.o db.o     -L/usr/local/lib/mysql -lmysqlclient -pthread -lm -lrt -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
3 warnings generated.
gmake[2]: Leaving directory '/tmp/ndoutils-maint/src'
gmake ndo2db-3x
gmake[2]: Entering directory '/tmp/ndoutils-maint/src'
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
18 warnings generated.
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_3X -o ndo2db-3x queue.c ndo2db.c dbhandlers-3x.o  io.o utils.o db.o     -L/usr/local/lib/mysql -lmysqlclient -pthread -lm -lrt -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
3 warnings generated.
gmake[2]: Leaving directory '/tmp/ndoutils-maint/src'
gmake ndo2db-4x
gmake[2]: Entering directory '/tmp/ndoutils-maint/src'
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -c -o dbhandlers-4x.o dbhandlers.c
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3821:5: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                idi->dbinfo.instance_id, service_id, member_id) == -1) {
                                ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
19 warnings generated.
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_4X -o ndo2db-4x queue.c ndo2db.c dbhandlers-4x.o  io.o utils.o db.o     -L/usr/local/lib/mysql -lmysqlclient -pthread -lm -lrt -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
3 warnings generated.
gmake[2]: Leaving directory '/tmp/ndoutils-maint/src'
gmake ndomod-2x.o
gmake[2]: Entering directory '/tmp/ndoutils-maint/src'
cc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c  io.o utils.o -shared    
ndomod.c:361:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
1 warning generated.
gmake[2]: Leaving directory '/tmp/ndoutils-maint/src'
gmake ndomod-3x.o
gmake[2]: Entering directory '/tmp/ndoutils-maint/src'
cc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c  io.o utils.o -shared    
ndomod.c:361:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
1 warning generated.
gmake[2]: Leaving directory '/tmp/ndoutils-maint/src'
gmake ndomod-4x.o
gmake[2]: Entering directory '/tmp/ndoutils-maint/src'
cc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -o ndomod-4x.o ndomod.c  io.o utils.o -shared    
ndomod.c:361:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
1 warning generated.
gmake[2]: Leaving directory '/tmp/ndoutils-maint/src'
cc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -o sockdebug sockdebug.c io.o utils.o   -lm  
gmake[1]: Leaving directory '/tmp/ndoutils-maint/src'
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint # gmake install
cd ./src && gmake install
gmake[1]: Entering directory '/tmp/ndoutils-maint/src'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 -o nagios -g nagios ndo2db-4x /usr/local/nagios/bin/ndo2db
/usr/bin/install -c -m 755 -o nagios -g nagios ndomod-4x.o /usr/local/nagios/bin/ndomod.o
/usr/bin/install -c -m 774 -o nagios -g nagios file2sock /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios log2ndo /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios sockdebug /usr/local/nagios/bin

  Hint: NDOUtils Installation against Nagios v4.x
  completed.

  If you want to install NDOUtils for Nagios v3.x
  please type  'make install-3x

  If you want to install NDOUtils for Nagios v2.x
  please type  'make install-2x

  Next step should be the database initialization/upgrade
  cd into the db/ directory and either:
     ./installdb  (for a new installation) or:
     ./upgradedb  (for an existing one)

gmake[1]: Leaving directory '/tmp/ndoutils-maint/src'

Main NDOUtils components installed

root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint # cd db
root@core-037:/tmp/ndoutils-maint/db # perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios 
DBD::mysql::db do failed: Table 'nagios.nagios_dbversion' doesn't exist at ./installdb line 52.
** Creating tables for version 2.0.1
     Using mysql.sql for installation...
mysql: [Warning] Using a password on the command line interface can be insecure.
** Updating table nagios_dbversion
Done!
root@core-037:/tmp/ndoutils-maint/db # cd ..
root@core-037:/tmp/ndoutils-maint # gmake install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndo2db.cfg-sample /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndomod.cfg-sample /usr/local/nagios/etc

*** Config files installed ***

Remember, these are *SAMPLE* config files.  You'll need to rename
the files in order to use them.
Please read the documentation to know what they are doing.

root@core-037:/tmp/ndoutils-maint # mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
root@core-037:/tmp/ndoutils-maint # sed -i '' 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
root@core-037:/tmp/ndoutils-maint # sed -i '' 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
root@core-037:/tmp/ndoutils-maint # mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint # gmake install-init
/usr/bin/install -c -m 755 startup/newbsd-init /etc/rc.d/ndo2db
root@core-037:/tmp/ndoutils-maint # echo '/usr/local/etc/rc.d/ndo2db start' >> /etc/rc.local
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint # service ndo2db start
Starting ndo2db.
root@core-037:/tmp/ndoutils-maint # printf "\n\n# NDOUtils Broker Module\n" >> /usr/local/nagios/etc/nagios.cfg
root@core-037:/tmp/ndoutils-maint # printf "broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg\n" >> /usr/local/nagios/etc/nagios.cfg 
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint #  service nagios restart
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
root@core-037:/tmp/ndoutils-maint # service nagios status
nagios (pid 2987) is running...
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint #  service ndo2db status
ndo2db is running as pid 2941.
root@core-037:/tmp/ndoutils-maint # grep ndo /usr/local/nagios/var/nagios.log
[1476751997] Error: Module '/usr/local/nagios/bin/ndomod.o' is using an old or unspecified version of the event broker API.  Module will be unloaded.
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint # echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password'
mysql: [Warning] Using a password on the command line interface can be insecure.
root@core-037:/tmp/ndoutils-maint # 
root@core-037:/tmp/ndoutils-maint # service ndo2db stop
Stopping ndo2db.
root@core-037:/tmp/ndoutils-maint # service ndo2db status
ndo2db is not running.
root@core-037:/tmp/ndoutils-maint # service ndo2db start
Starting ndo2db.
root@core-037:/tmp/ndoutils-maint # service ndo2db restart
Stopping ndo2db.
Starting ndo2db.
root@core-037:/tmp/ndoutils-maint # service ndo2db status
ndo2db is running as pid 3040.
root@core-037:/tmp/ndoutils-maint # 
jfrickson commented 8 years ago

I just finished doing a full install of core (maint) and ndoutils (maint) on a FreeBSD VM. Worked perfectly! Are you still having trouble with it?

jfrickson commented 7 years ago

Closing per Troy's request. He will reopen if necessary.

box293 commented 7 years ago

I want to re-open this as I still believe it is an issue.

Fresh install of FreeBSD. Fresh install of Nagios Core 4.3.1 and Plugins 2.2.0. Fresh install of NDOUtils 2.1.3

Full steps below to re-create the issue.

Last login: Fri Mar 17 10:14:19 2017 from 2001-44b8-3132-0025-0010-0025-0254-0050.static.ipv6.internode.on.net
FreeBSD 10.3-RELEASE (GENERIC) #0 r297264: Fri Mar 25 02:10:02 UTC 2016

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
root@core-037:~ # pkg install -y mysql56-server p5-DBD-mysql p5-DBI
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB 541.8kB/s    00:11    
Processing entries: 100%
FreeBSD repository update completed. 26279 packages processed.
Updating database digests format: 100%
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
    pkg: 1.9.4_1 -> 1.10.1

Number of packages to be upgraded: 1

3 MiB to be downloaded.
Fetching pkg-1.10.1.txz: 100%    3 MiB 328.3kB/s    00:08    
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.9.4_1 to 1.10.1...
[1/1] Extracting pkg-1.10.1: 100%
Updating FreeBSD repository catalogue...
Repo "FreeBSD" upgrade schema 2013 to 2014: DROP TABLE pkg_search;
FreeBSD repository is up to date.
All repositories are up to date.
The following 7 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql56-server: 5.6.35_7
    p5-DBD-mysql: 4.042
    p5-DBI: 1.636_1
    libevent: 2.1.8
    mysql56-client: 5.6.35_3
    liblz4: 1.7.5,1

Installed packages to be UPGRADED:
    perl5: 5.20.3_8 -> 5.24.1

Number of packages to be installed: 6
Number of packages to be upgraded: 1

The process will require 126 MiB more space.
23 MiB to be downloaded.
[1/7] Fetching mysql56-server-5.6.35_7.txz: 100%    8 MiB 416.2kB/s    00:19    
[2/7] Fetching p5-DBD-mysql-4.042.txz: 100%  100 KiB 102.8kB/s    00:01    
[3/7] Fetching p5-DBI-1.636_1.txz: 100%  691 KiB 353.7kB/s    00:02    
[4/7] Fetching perl5-5.24.1.txz: 100%   13 MiB 451.5kB/s    00:31    
[5/7] Fetching libevent-2.1.8.txz: 100%  297 KiB 152.1kB/s    00:02    
[6/7] Fetching mysql56-client-5.6.35_3.txz: 100%    1 MiB 357.1kB/s    00:04    
[7/7] Fetching liblz4-1.7.5,1.txz: 100%   94 KiB  95.8kB/s    00:01    
Checking integrity... done (0 conflicting)
[1/7] Upgrading perl5 from 5.20.3_8 to 5.24.1...
[1/7] Extracting perl5-5.24.1: 100%
[2/7] Installing libevent-2.1.8...
[2/7] Extracting libevent-2.1.8: 100%
[3/7] Installing liblz4-1.7.5,1...
[3/7] Extracting liblz4-1.7.5,1: 100%
[4/7] Installing p5-DBI-1.636_1...
[4/7] Extracting p5-DBI-1.636_1: 100%
[5/7] Installing mysql56-client-5.6.35_3...
[5/7] Extracting mysql56-client-5.6.35_3: 100%
[6/7] Installing mysql56-server-5.6.35_7...
===> Creating groups.
Creating group 'mysql' with gid '88'.
===> Creating users
Creating user 'mysql' with uid '88'.
[6/7] Extracting mysql56-server-5.6.35_7: 100%
[7/7] Installing p5-DBD-mysql-4.042...
Extracting p5-DBD-mysql-4.042: 100%
Message from perl5-5.24.1:
The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.
Message from mysql56-client-5.6.35_3:
* * * * * * * * * * * * * * * * * * * * * * * *

Please be aware the database client is vulnerable
to CVE-2015-3152 - SSL Downgrade aka "BACKRONYM".
You may find more information at the following URL:

http://www.vuxml.org/freebsd/36bd352d-299b-11e5-86ff-14dae9d210b8.html

Although this database client is not listed as
"affected", it is vulnerable and will not be
receiving a patch. Please take note of this when
deploying this software.

* * * * * * * * * * * * * * * * * * * * * * * *
Message from mysql56-server-5.6.35_7:
*****************************************************************************

Remember to run mysql_upgrade the first time you start the MySQL server
after an upgrade from an earlier version.

Initial password for first time use of MySQL is saved in $HOME/.mysql_secret
ie. when you want to use "mysql -u root -p" first you should see password
in /root/.mysql_secret

*****************************************************************************

*****************************************************************************

Please keep in mind that the default location for my.cnf will be changed
from "/var/db/mysql/my.cnf" to "/usr/local/etc/mysql/my.cnf" in the near
future.  If you do not want to move your my.cnf to the new location then
you must set "mysql_optfile" in /etc/rc.conf to "/var/db/mysql/my.cnf".

*****************************************************************************
root@core-037:~ # echo 'mysql_enable="YES"' >> /etc/rc.conf
root@core-037:~ # service mysql-server start
Starting mysql.
root@core-037:~ # ps ax | grep mysql | grep -v grep
773  -  Ss   0:00.01 /bin/sh /usr/local/bin/mysqld_safe --basedir=/usr/local --datadir=/var/db/mysql --pid-file=/var
894  -  S    0:00.33 /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/mysql --plugin-dir=/usr/local/
root@core-037:~ # 
root@core-037:~ # mysqladmin -u root password 'mypassword'
Warning: Using a password on the command line interface can be insecure.
root@core-037:~ # 
root@core-037:~ # mysql -u root -p'mypassword'
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.35 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE nagios DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> 
mysql> CREATE USER 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password';
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> GRANT USAGE ON *.* TO 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON nagios.* TO 'ndoutils'@'localhost' WITH GRANT OPTION ; 
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye
root@core-037:~ # echo 'show databases;' | mysql -u ndoutils -p'ndoutils_password' -h localhost
Warning: Using a password on the command line interface can be insecure.
Database
information_schema
nagios
test
root@core-037:~ # 
root@core-037:~ # cp /etc/sysctl.conf /etc/sysctl.conf_backup
root@core-037:~ # cp /boot/loader.conf /boot/loader.conf_backup
root@core-037:~ # 
root@core-037:~ # sed -i '' '/msgmnb/d' /boot/loader.conf
root@core-037:~ # sed -i '' '/msgmax/d' /boot/loader.conf
root@core-037:~ # sed -i '' '/shmmax/d' /etc/sysctl.conf
root@core-037:~ # sed -i '' '/shmall/d' /etc/sysctl.conf
root@core-037:~ # printf "\n\nkern.ipc.msgmnb = 131072000\n" >> /boot/loader.conf
root@core-037:~ # printf "kern.ipc.msgmax = 131072000\n" >> /boot/loader.conf
root@core-037:~ # printf "\n\nkern.ipc.shmmax = 4294967295\n" >> /etc/sysctl.conf
root@core-037:~ # printf "kern.ipc.shmall = 268435456\n" >> /etc/sysctl.conf
root@core-037:~ #
root@core-037:~ # reboot

OS rebooted

Last login: Mon May  8 14:23:42 2017 from 2001-44b8-3132-0025-0010-0025-0254-0050.static.ipv6.internode.on.net
FreeBSD 10.3-RELEASE (GENERIC) #0 r297264: Fri Mar 25 02:10:02 UTC 2016

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
root@core-037:~ # cd /tmp
root@core-037:/tmp # wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
--2017-05-08 14:28:45--  https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
Resolving github.com (github.com)... 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/NagiosEnterprises/ndoutils/tar.gz/ndoutils-2.1.3 [following]
--2017-05-08 14:28:46--  https://codeload.github.com/NagiosEnterprises/ndoutils/tar.gz/ndoutils-2.1.3
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2182999 (2.1M) [application/x-gzip]
Saving to: 'ndoutils.tar.gz'

ndoutils.tar.gz               100%[==============================================>]   2.08M   474KB/s    in 4.5s    

2017-05-08 14:28:51 (474 KB/s) - 'ndoutils.tar.gz' saved [2182999/2182999]

root@core-037:/tmp # tar xzf ndoutils.tar.gz
root@core-037:/tmp # 
root@core-037:/tmp # cd /tmp/ndoutils-ndoutils-2.1.3/
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking for perl... /usr/local/bin/perl
checking build system type... x86_64-unknown-freebsd10.3
checking host system type... x86_64-unknown-freebsd10.3
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking what the operating system is ... bsd
checking what the distribution type is ... freebsd
checking what init system is being used ... newbsd
checking what inetd is being used ... inetd (Not running)
checking for which paths to use ... default
checking for which init file to use ... newbsd-init
checking for which inetd files to use ... default-inetd
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... no
checking sys/sendfile.h presence... no
checking for sys/sendfile.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking size of int... 4
checking size of short... 2
checking size of long... 8
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for main in -lnsl... no
checking for socket in -lsocket... no
checking for main in -lwrap... yes
checking for getopt_long... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for nanosleep... yes
checking for va_copy... yes
checking for snprintf... yes
checking for asprintf... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -shared
checking for mysql_config... /usr/local/bin/mysql_config
checking for mysql_init in -lmysqlclient... yes
MySQL library and include file(s) were found!
checking for library containing sd_listen_fds... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config/ndo2db.cfg-sample
config.status: creating config/ndomod.cfg-sample
config.status: creating config/nagios.cfg
config.status: creating config/misccommands.cfg
config.status: creating docs/docbook/en-en/Makefile
config.status: creating include/io.h
config.status: creating include/common.h
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
config.status: creating startup/default-service
config.status: creating startup/default-socket
config.status: creating startup/default-socket-svc
config.status: creating startup/default-xinetd
config.status: creating startup/mac-init.plist
config.status: creating startup/mac-inetd.plist
config.status: creating startup/newbsd-init
config.status: creating startup/openbsd-init
config.status: creating startup/openrc-conf
config.status: creating startup/openrc-init
config.status: creating startup/solaris-init.xml
config.status: creating startup/solaris-inetd.xml
config.status: creating startup/tmpfile.conf
config.status: creating startup/upstart-init
config.status: creating startup/rh-upstart-init
config.status: creating include/config.h

*** Configuration summary for ndoutils 2.1.3 2017-04-13 ***:

 General Options:
 -------------------------
 NDO2DB user:      nagios
 NDO2DB group:     nagios
 NDO2DB tcp port:  5668

Review the options above for accuracy.  If they look
okay, type 'make all' to compile the NDO utilities,
or type 'make' to get a list of make options.

root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # gmake all
cd ./src && gmake
gmake[1]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -c -o io.o io.c
gcc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -c -o utils.o utils.c
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm  
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -o log2ndo log2ndo.c io.o utils.o   -lm  
gmake ndo2db-2x
gmake[2]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -c -o db.o db.c
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_2X -o ndo2db-2x queue.c ndo2db.c dbhandlers-2x.o  io.o utils.o db.o     -L/usr/local/lib/mysql  -lmysqlclient  -pthread -lz -lm -lexecinfo -lssl -lcrypto -lm 
gmake[2]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gmake ndo2db-3x
gmake[2]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_3X -o ndo2db-3x queue.c ndo2db.c dbhandlers-3x.o  io.o utils.o db.o     -L/usr/local/lib/mysql  -lmysqlclient  -pthread -lz -lm -lexecinfo -lssl -lcrypto -lm 
gmake[2]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gmake ndo2db-4x
gmake[2]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -c -o dbhandlers-4x.o dbhandlers.c
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_4X -o ndo2db-4x queue.c ndo2db.c dbhandlers-4x.o  io.o utils.o db.o     -L/usr/local/lib/mysql  -lmysqlclient  -pthread -lz -lm -lexecinfo -lssl -lcrypto -lm 
gmake[2]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gmake ndomod-2x.o
gmake[2]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c  io.o utils.o -shared    
gmake[2]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gmake ndomod-3x.o
gmake[2]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c  io.o utils.o -shared    
gmake[2]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gmake ndomod-4x.o
gmake[2]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc  -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -o ndomod-4x.o ndomod.c  io.o utils.o -shared    
gmake[2]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
gcc -fPIC -g -O2 -I/usr/local/include/mysql -DHAVE_CONFIG_H  -o sockdebug sockdebug.c io.o utils.o   -lm  
gmake[1]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # gmake install
cd ./src && gmake install
gmake[1]: Entering directory '/tmp/ndoutils-ndoutils-2.1.3/src'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 -o nagios -g nagios ndo2db-4x /usr/local/nagios/bin/ndo2db
/usr/bin/install -c -m 755 -o nagios -g nagios ndomod-4x.o /usr/local/nagios/bin/ndomod.o
/usr/bin/install -c -m 774 -o nagios -g nagios file2sock /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios log2ndo /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios sockdebug /usr/local/nagios/bin

  Hint: NDOUtils Installation against Nagios v4.x
  completed.

  If you want to install NDOUtils for Nagios v3.x
  please type  'make install-3x

  If you want to install NDOUtils for Nagios v2.x
  please type  'make install-2x

  Next step should be the database initialization/upgrade
  cd into the db/ directory and either:
     ./installdb  (for a new installation) or:
     ./upgradedb  (for an existing one)

gmake[1]: Leaving directory '/tmp/ndoutils-ndoutils-2.1.3/src'

Main NDOUtils components installed

root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # cd db/
root@core-037:/tmp/ndoutils-ndoutils-2.1.3/db # perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
DBD::mysql::db do failed: Table 'nagios.nagios_dbversion' doesn't exist at ./installdb line 52.
** Creating tables for version 2.0.1
     Using mysql.sql for installation...
Warning: Using a password on the command line interface can be insecure.
** Updating table nagios_dbversion
Done!
root@core-037:/tmp/ndoutils-ndoutils-2.1.3/db # cd .. 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 #  gmake install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndo2db.cfg-sample /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndomod.cfg-sample /usr/local/nagios/etc

*** Config files installed ***

Remember, these are *SAMPLE* config files.  You'll need to rename
the files in order to use them.
Please read the documentation to know what they are doing.

root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # sed -i '' 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # sed -i '' 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 #  gmake install-init
/usr/bin/install -c -m 755 startup/newbsd-init /etc/rc.d/ndo2db
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # echo '/usr/local/etc/rc.d/ndo2db start' >> /etc/rc.local
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # service ndo2db start
Starting ndo2db.
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # printf "\n\n# NDOUtils Broker Module\n" >> /usr/local/nagios/etc/nagios.cfg
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # printf "broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg\n" >> /usr/local/nagios/etc/nagios.cfg 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # service nagios restart
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # service nagios status
nagios (pid 3579) is running...
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # service nagios status
nagios is not running
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # tail /usr/local/nagios/var/nagios.log
[1494217807] nerd: Channel servicechecks registered successfully
[1494217807] nerd: Channel opathchecks registered successfully
[1494217807] nerd: Fully initialized and ready to rock!
[1494217807] wproc: Successfully registered manager as @wproc with query handler
[1494217807] wproc: Registry request: name=Core Worker 3582;pid=3582
[1494217807] wproc: Registry request: name=Core Worker 3583;pid=3583
[1494217807] wproc: Registry request: name=Core Worker 3584;pid=3584
[1494217807] wproc: Registry request: name=Core Worker 3585;pid=3585
[1494217807] Error: Module '/usr/local/nagios/bin/ndomod.o' is using an old or unspecified version of the event broker API.  Module will be unloaded.
[1494217807] Caught SIGSEGV, shutting down...
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # 
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # ls -la src/ndomod-4x.o
-rwxr-xr-x  1 root  wheel  195120 May  8 14:29 src/ndomod-4x.o
root@core-037:/tmp/ndoutils-ndoutils-2.1.3 # ls -la /usr/local/nagios/bin/ndomod.o
-rwxr-xr-x  1 nagios  nagios  195120 May  8 14:29 /usr/local/nagios/bin/ndomod.o
jfrickson commented 7 years ago

Ok, I'll look into it some more.

jfrickson commented 7 years ago

The problem is that dlopen() works, but dlsym() to load the version from the module fails.

I wrote a very short program and lib, and all the dynamic library stuff worked just fine. So it seems to be something specific to core or ndomod. Though what would stop it from working, I have no idea.

sawolf commented 4 years ago

This appears to not be an issue in the ndo-3 branch, so I'm closing it.