Page 2 of 2

Re: Error: Unexpected token or statement in file

Posted: Mon May 29, 2017 3:10 am
by Rhobar
Hi!

Unfortunately I'm getting the same error as you can see from these:

Code: Select all

[root@vmnagios spool]# tail -50 /var/log/mysqld.log
170526 10:24:08  InnoDB: Completed initialization of buffer pool
170526 10:24:08  InnoDB: Started; log sequence number 0 44233
170526 10:24:08 [Note] Event Scheduler: Loaded 0 events
170526 10:24:08 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
170526 16:22:32 [Note] /usr/libexec/mysqld: Normal shutdown

170526 16:22:32 [Note] Event Scheduler: Purging the queue. 0 events
170526 16:22:32  InnoDB: Starting shutdown...
170526 16:22:34  InnoDB: Shutdown completed; log sequence number 0 44233
170526 16:22:34 [Note] /usr/libexec/mysqld: Shutdown complete

170526 16:22:34 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170526 16:23:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170526 16:23:07  InnoDB: Initializing buffer pool, size = 8.0M
170526 16:23:07  InnoDB: Completed initialization of buffer pool
170526 16:23:08  InnoDB: Started; log sequence number 0 44233
170526 16:23:08 [Note] Event Scheduler: Loaded 0 events
170526 16:23:08 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
170526 16:23:58 [Note] /usr/libexec/mysqld: Normal shutdown

170526 16:23:58 [Note] Event Scheduler: Purging the queue. 0 events
170526 16:23:58  InnoDB: Starting shutdown...
170526 16:24:03  InnoDB: Shutdown completed; log sequence number 0 44233
170526 16:24:03 [Note] /usr/libexec/mysqld: Shutdown complete

170526 16:24:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170526 16:24:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170526 16:24:04  InnoDB: Initializing buffer pool, size = 8.0M
170526 16:24:04  InnoDB: Completed initialization of buffer pool
170526 16:24:04  InnoDB: Started; log sequence number 0 44233
170526 16:24:04 [Note] Event Scheduler: Loaded 0 events
170526 16:24:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
170529 10:06:02 [Note] /usr/libexec/mysqld: Normal shutdown

170529 10:06:02 [Note] Event Scheduler: Purging the queue. 0 events
170529 10:06:02  InnoDB: Starting shutdown...
170529 10:06:03  InnoDB: Shutdown completed; log sequence number 0 44233
170529 10:06:03 [Note] /usr/libexec/mysqld: Shutdown complete

170529 10:06:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170529 10:06:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170529 10:06:03  InnoDB: Initializing buffer pool, size = 8.0M
170529 10:06:03  InnoDB: Completed initialization of buffer pool
170529 10:06:04  InnoDB: Started; log sequence number 0 44233
170529 10:06:04 [Note] Event Scheduler: Loaded 0 events
170529 10:06:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
[root@vmnagios spool]# tail -50 /var/log/mysqld.log
170526 10:24:08  InnoDB: Completed initialization of buffer pool
170526 10:24:08  InnoDB: Started; log sequence number 0 44233
170526 10:24:08 [Note] Event Scheduler: Loaded 0 events
170526 10:24:08 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
170526 16:22:32 [Note] /usr/libexec/mysqld: Normal shutdown

170526 16:22:32 [Note] Event Scheduler: Purging the queue. 0 events
170526 16:22:32  InnoDB: Starting shutdown...
170526 16:22:34  InnoDB: Shutdown completed; log sequence number 0 44233
170526 16:22:34 [Note] /usr/libexec/mysqld: Shutdown complete

170526 16:22:34 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170526 16:23:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170526 16:23:07  InnoDB: Initializing buffer pool, size = 8.0M
170526 16:23:07  InnoDB: Completed initialization of buffer pool
170526 16:23:08  InnoDB: Started; log sequence number 0 44233
170526 16:23:08 [Note] Event Scheduler: Loaded 0 events
170526 16:23:08 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
170526 16:23:58 [Note] /usr/libexec/mysqld: Normal shutdown

170526 16:23:58 [Note] Event Scheduler: Purging the queue. 0 events
170526 16:23:58  InnoDB: Starting shutdown...
170526 16:24:03  InnoDB: Shutdown completed; log sequence number 0 44233
170526 16:24:03 [Note] /usr/libexec/mysqld: Shutdown complete

170526 16:24:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170526 16:24:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170526 16:24:04  InnoDB: Initializing buffer pool, size = 8.0M
170526 16:24:04  InnoDB: Completed initialization of buffer pool
170526 16:24:04  InnoDB: Started; log sequence number 0 44233
170526 16:24:04 [Note] Event Scheduler: Loaded 0 events
170526 16:24:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
170529 10:06:02 [Note] /usr/libexec/mysqld: Normal shutdown

170529 10:06:02 [Note] Event Scheduler: Purging the queue. 0 events
170529 10:06:02  InnoDB: Starting shutdown...
170529 10:06:03  InnoDB: Shutdown completed; log sequence number 0 44233
170529 10:06:03 [Note] /usr/libexec/mysqld: Shutdown complete

170529 10:06:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170529 10:06:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170529 10:06:03  InnoDB: Initializing buffer pool, size = 8.0M
170529 10:06:03  InnoDB: Completed initialization of buffer pool
170529 10:06:04  InnoDB: Started; log sequence number 0 44233
170529 10:06:04 [Note] Event Scheduler: Loaded 0 events
170529 10:06:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution



[root@vmnagios spool]# grep ndo /var/log/nagios/nagios.log
[1496045193] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /var/log/nagios/spool/checkresults/nebmod9vBoNM: undefined symbol: num_objects


[root@vmnagios spool]# grep ndo /var/log/nagios/nagios.log
[1496045193] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /var/log/nagios/spool/checkresults/nebmod9vBoNM: undefined symbol: num_objects
[root@vmnagios spool]# grep ndo /var/log/messages
May 29 10:06:33 vmnagios nagios: Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /var/log/nagios/spool/checkresults/nebmod9vBoNM: undefined symbol: num_objects



Re: Error: Unexpected token or statement in file

Posted: Tue May 30, 2017 12:41 pm
by tgriep
Edit the nagios.cfg file and change the following line from

Code: Select all

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
to

Code: Select all

broker_module=/usr/local/nagios/bin/ndomod config_file=/usr/local/nagios/etc/ndomod.cfg
Save the file and restart the nagios daemon, if the correct version of the ndomod is copied over to the /usr/local/nagios/bin/ folder, that should fix the issue for you.
If not, in the src folder where you compiled the ndoutils is a files called ndo2db-3x, copy that file to the /usr/local/nagios/bin/ folder but call it ndomod and reload nagios.

Re: Error: Unexpected token or statement in file

Posted: Wed May 31, 2017 3:29 am
by Rhobar
Finally it works!

I was using a wrond ndomod module :)

Thanks for your precious help

Re: Error: Unexpected token or statement in file

Posted: Wed May 31, 2017 9:51 am
by tgriep
Your welcome, glad it is working now. I'll lock and mark the post as solved but if you have any new questions, please feel free to open a new post.