NDOutils instalation problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sstapels
Posts: 7
Joined: Wed Mar 28, 2018 7:59 am

NDOutils instalation problem

Post by sstapels »

I have followed the instructions for Raspberian and installed NDOutils on my Raspberry PI 3 NAGIOS server. I have been able to work through most of the issues but this last one has me stumped. When I start Nagios I get a flood of error messages in my sys log

ndo2db[2726]: Error: queue recv error

followed by

Error: queue remove error.

and then finally

Successfully disconnected from MySQL database


Any help would be greatly appreciated

I did have one error on install when I did
systemctl enable ndo2db.service

I got the error Synchronizing state of ndo2db.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ndo2db
update-rc.d: error: ndo2db Default-Start contains no runlevels, aborting.


however I can start and restart the ndo2db service just find so I thought that was not the root of this problem.

in other topics I have seen requests for the following so will provide incase it helps


root@NGIOS_PI:/etc/init.d# chage -l nagios
Last password change : Mar 12, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@NGIOS_PI:/etc/init.d# grep nag /etc/group
nagios:x:9000:
nagcmd:x:9001:nagios,www-data
root@NGIOS_PI:/etc/init.d# ipcs -q

------ Message Queues --------
key msqid owner perms used-bytes messages


root@NGIOS_PI:/etc/init.d# tail -n50 /var/log/messages /var/log/mysqld.log /var/log/mariadb/mariadb.log
==> /var/log/messages <==
tail: cannot open '/var/log/mysqld.log' for reading: No such file or directory
tail: cannot open '/var/log/mariadb/mariadb.log' for reading: No such file or directory


My goal is to save the nagios info to a mysql dbso that I can use cacti to graph it with other snmpo dat I am collecting on my network in case that matters to anyone
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NDOutils instalation problem

Post by scottwilkerson »

This doesn't even look like you have mysql or mariadb installed.

But before you go any further, I'd like to point out that ndoutils only save the latest info for each check and isn't what almost anyone uses for graphing, for that you want to look info something like pnp4nagios
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sstapels
Posts: 7
Joined: Wed Mar 28, 2018 7:59 am

Re: NDOutils instalation problem

Post by sstapels »

scottwilkerson wrote:This doesn't even look like you have mysql or mariadb installed.

But before you go any further, I'd like to point out that ndoutils only save the latest info for each check and isn't what almost anyone uses for graphing, for that you want to look info something like pnp4nagios

I am able to connect and see the nagios database. I am using Cacti to graph the data. When I start the nagios it logs a number of lines in the log session table before crashing. The nagios dashboard continues to run after the reported crash.
sstapels
Posts: 7
Joined: Wed Mar 28, 2018 7:59 am

Re: NDOutils instalation problem

Post by sstapels »

Thanks Scott - mysql is installed I just cannot fid where it is writing the log files


$
>mariadbcheck nagios
nagios.nagios_acknowledgements OK
nagios.nagios_commands OK
nagios.nagios_commenthistory OK
nagios.nagios_comments OK
nagios.nagios_configfiles OK
nagios.nagios_configfilevariables OK
nagios.nagios_conninfo OK
nagios.nagios_contact_addresses OK
nagios.nagios_contact_notificationcommands OK
nagios.nagios_contactgroup_members OK
nagios.nagios_contactgroups OK
nagios.nagios_contactnotificationmethods OK
nagios.nagios_contactnotifications OK
nagios.nagios_contacts OK
nagios.nagios_contactstatus OK
nagios.nagios_customvariables OK
nagios.nagios_customvariablestatus OK
nagios.nagios_dbversion OK
nagios.nagios_downtimehistory OK
nagios.nagios_eventhandlers OK
nagios.nagios_externalcommands OK
nagios.nagios_flappinghistory OK
nagios.nagios_host_contactgroups OK
nagios.nagios_host_contacts OK
nagios.nagios_host_parenthosts OK
nagios.nagios_hostchecks OK
nagios.nagios_hostdependencies OK
nagios.nagios_hostescalation_contactgroups OK
nagios.nagios_hostescalation_contacts OK
nagios.nagios_hostescalations OK
nagios.nagios_hostgroup_members OK
nagios.nagios_hostgroups OK
nagios.nagios_hosts OK
nagios.nagios_hoststatus OK
nagios.nagios_instances OK
nagios.nagios_logentries OK
nagios.nagios_notifications OK
nagios.nagios_objects OK
nagios.nagios_processevents OK
nagios.nagios_programstatus OK
nagios.nagios_runtimevariables OK
nagios.nagios_scheduleddowntime OK
nagios.nagios_service_contactgroups OK
nagios.nagios_service_contacts OK
nagios.nagios_service_parentservices OK
nagios.nagios_servicechecks OK
nagios.nagios_servicedependencies OK
nagios.nagios_serviceescalation_contactgroups OK
nagios.nagios_serviceescalation_contacts OK
nagios.nagios_serviceescalations OK
nagios.nagios_servicegroup_members OK
nagios.nagios_servicegroups OK
nagios.nagios_services OK
nagios.nagios_servicestatus OK
nagios.nagios_statehistory OK
nagios.nagios_systemcommands OK
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NDOutils instalation problem

Post by scottwilkerson »

lets look here

Code: Select all

ls-al /var/log
Can you post your ndo2db configuration files?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sstapels
Posts: 7
Joined: Wed Mar 28, 2018 7:59 am

Re: NDOutils instalation problem

Post by sstapels »

Turned up degub and verbose levels

sudo service nagios stop
sudo service ndo2db stop

sudo service ndo2db start
sudo service nagios start

From syslog -----

Mar 29 13:47:57 NGIOS_PI systemd[1]: Stopping User Manager for UID 9000...
Mar 29 13:47:57 NGIOS_PI nagios[32056]: nerd: Channel hostchecks registered successfully
Mar 29 13:47:57 NGIOS_PI systemd[1]: Started LSB: Starts and stops the Nagios monitoring server.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: nerd: Channel servicechecks registered successfully
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Stopped target Default.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: nerd: Channel opathchecks registered successfully
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Stopped target Basic System.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: nerd: Fully initialized and ready to rock!
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Stopped target Timers.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Successfully registered manager as @wproc with query handler
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Stopped target Sockets.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Registry request: name=Core Worker 32061;pid=32061
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Closed GnuPG cryptographic agent and passphrase cache.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Registry request: name=Core Worker 32059;pid=32059
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Registry request: name=Core Worker 32058;pid=32058
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Closed GnuPG cryptographic agent (access for web browsers).
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Registry request: name=Core Worker 32060;pid=32060
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Registry request: name=Core Worker 32062;pid=32062
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Closed D-Bus User Message Bus Socket.
Mar 29 13:47:57 NGIOS_PI sudo[31963]: pam_unix(sudo:session): session closed for user root
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Reached target Shutdown.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: wproc: Registry request: name=Core Worker 32063;pid=32063
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Starting Exit the Session...
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod: NDOMOD 2.1.3 (2017-04-13) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Stopped target Paths.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod: Successfully connected to data sink. 0 queued items to flush.
Mar 29 13:47:57 NGIOS_PI systemd[32039]: Received SIGRTMIN+24 from PID 32064 (kill).
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for process data
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for timed event data
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for log data'
Mar 29 13:47:57 NGIOS_PI systemd[1]: Stopped User Manager for UID 9000.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for system command data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for event handler data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for notification data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for service check data'
Mar 29 13:47:57 NGIOS_PI systemd[1]: Removed slice User Slice of nagios.
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for host check data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for comment data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for downtime data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for flapping data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for program status data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for host status data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for service status data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for adaptive program data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for adaptive host data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for adaptive service data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for external command data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for aggregated status data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for retention data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for contact data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for contact notification data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for acknowledgement data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for state change data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for contact status data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: ndomod registered for adaptive contact data'
Mar 29 13:47:57 NGIOS_PI nagios[32056]: Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
Mar 29 13:47:57 NGIOS_PI systemd[32042]: pam_unix(systemd-user:session): session closed for user nagios
Mar 29 13:47:57 NGIOS_PI ndo2db[32065]: Successfully connected to MySQL database
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Successfully connected to MySQL database
Mar 29 13:47:57 NGIOS_PI nagios[32056]: HOST FLAPPING ALERT: Camera_Front_Yard;STARTED; Host appears to have started flapping (20.3% change > 20.0% threshold)
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming timedevents.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming systemcommands.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming servicechecks.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming hostchecks.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming eventhandlers.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming externalcommands.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming notifications.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming contactnotifications.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming contactnotificationmethods.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming logentries.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Trimming acknowledgements.


Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:57 NGIOS_PI ndo2db[32066]: Error: queue recv error.
.....
Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:58 NGIOS_PI nagios[32056]: Successfully launched command file worker with pid 32076

Mar 29 13:47:58 NGIOS_PI nagios[32056]: Caught SIGSEGV, shutting down...

Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.
-----
Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.
Mar 29 13:47:58 NGIOS_PI ndo2db[32065]: Successfully disconnected from MySQL database
Mar 29 13:47:58 NGIOS_PI ndo2db[32066]: Error: queue recv error.


Appreciate the help
Attachments
ndomod.cfg
(5.16 KiB) Downloaded 352 times
ndo2db.cfg
(6.24 KiB) Downloaded 333 times
nagios.cfg
(45.37 KiB) Downloaded 334 times
sstapels
Posts: 7
Joined: Wed Mar 28, 2018 7:59 am

Re: NDOutils instalation problem

Post by sstapels »

Doing some additional testing and thought I should share

changed back from from TCP to Unix sockets - no change
tried starting nagios with ndo2db stopped. It still crashes with caught SIGSEGV, shutting down

Only when I remove the broker_modeule from the nagios.cfg is nagios able to run without the crash.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NDOutils instalation problem

Post by scottwilkerson »

What versions of nagios and ndo2db did you install?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sstapels
Posts: 7
Joined: Wed Mar 28, 2018 7:59 am

Re: NDOutils instalation problem

Post by sstapels »

ndoutils-2.1.3
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NDOutils instalation problem

Post by scottwilkerson »

I see you have debugging on, do you have output in here
/usr/local/nagios/var/ndo2db.debug
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked