Problem with nagios and ndoutils

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.
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with nagios and ndoutils

Post by tgriep »

The nagios and www users are not part of the nagios group, run the following to fix this.

Code: Select all

usermod -a -G nagios nagios
usermod -a -G nagios www
Be sure to check out our Knowledgebase for helpful articles and solutions!
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post by eFusion »

I try this:

Code: Select all

pw usermod nagios -G nagios
pw usermod nagios -G www
but in db 27 records as usual.

In nagios.log have the following:

Code: Select all

Caught SIGTERM, shutting down...
Successfully shutdown... (PID=37902)
ndomod: Shutdown complete.
Event broker module '/usr/local/bin/ndomod-3x.o' deinitialized successfully.
Nagios 3.4.1 starting... (PID=23601)
Local time is Tue Mar 17 14:50:17 MSK 2015
LOG VERSION: 2.0
ndomod: NDOMOD 2.0.0 (02-28-2014) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
ndomod: Could not open data sink!  I'll keep trying, but some output may get lost...
ndomod registered for process data
ndomod registered for timed event data
ndomod registered for log data'
ndomod registered for system command data'
ndomod registered for event handler data'
ndomod registered for notification data'
ndomod registered for service check data'
ndomod registered for host check data'
ndomod registered for comment data'
ndomod registered for downtime data'
ndomod registered for flapping data'
ndomod registered for program status data'
ndomod registered for host status data'
ndomod registered for service status data'
ndomod registered for adaptive program data'
ndomod registered for adaptive host data'
ndomod registered for adaptive service data'
ndomod registered for external command data'
ndomod registered for aggregated status data'
ndomod registered for retention data'
ndomod registered for contact data'
ndomod registered for contact notification data'
ndomod registered for acknowledgement data'
ndomod registered for state change data'
ndomod registered for contact status data'
ndomod registered for adaptive contact data'
Event broker module '/usr/local/bin/ndomod-3x.o' initialized successfully.
Finished daemonizing... (New PID=23606)
ndomod: Successfully connected to data sink.  16586 items lost, 5000 queued items to flush.
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with nagios and ndoutils

Post by tgriep »

Could you run the following and post back the results?

Code: Select all

tail -n 100 /usr/local/nagios/var/ndo2db.debug
ps -aux
Be sure to check out our Knowledgebase for helpful articles and solutions!
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post by eFusion »

/usr/local/nagios/var/ndo2db.debug

Code: Select all

[1425463817.097157] [002.0] [pid=38505] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-bg7a-p2-n0-zyxel-es31244f' AND name2 IS
[1425463817.097423] [002.0] [pid=38505] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-bg7a-p2-n0-zyxel-es31244f'
[1425463817.097588] [002.0] [pid=38505] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='16', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1425463817.098126] [002.0] [pid=38505] DELETE FROM nagios_timedevents WHERE instance_id='1' AND scheduled_time<FROM_UNIXTIME(1425377417)
[1425463817.098215] [002.0] [pid=38505] DELETE FROM nagios_systemcommands WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424859017)
[1425463817.098291] [002.0] [pid=38505] DELETE FROM nagios_servicechecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424859017)
[1425463817.098365] [002.0] [pid=38505] DELETE FROM nagios_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424859017)
[1425463817.098471] [002.0] [pid=38505] DELETE FROM nagios_eventhandlers WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1422785417)
[1425463817.098548] [002.0] [pid=38505] DELETE FROM nagios_externalcommands WHERE instance_id='1' AND entry_time<FROM_UNIXTIME(1422785417)
[1425463817.098703] [002.0] [pid=38505] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-bg7a-p2-n1-dlink-des3200-18' AND name2 I
[1425463817.098954] [002.0] [pid=38505] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-bg7a-p2-n1-dlink-des3200-18'
[1425463817.099104] [002.0] [pid=38505] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='17', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1425464053.251593] [002.0] [pid=44143] SELECT instance_id FROM nagios_instances WHERE instance_name='default'
[1425464053.251832] [002.0] [pid=44143] INSERT INTO nagios_conninfo SET instance_id='1', connect_time=NOW(), last_checkin_time=NOW(), bytes_processed='0', lines_processed='0',
[1425464053.252014] [002.0] [pid=44143] SELECT object_id, objecttype_id, name1, name2 FROM nagios_objects WHERE instance_id='1'
[1425464053.252218] [002.0] [pid=44143] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_programstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1425464053.252302] [002.0] [pid=44143] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_hoststatus WHERE instance_id='1' ORDER BY status_update_time DESC
[1425464053.252427] [002.0] [pid=44143] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_servicestatus WHERE instance_id='1' ORDER BY status_update_time DE
[1425464053.252539] [002.0] [pid=44143] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_contactstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1425464053.252614] [002.0] [pid=44143] SELECT UNIX_TIMESTAMP(queued_time) AS latest_time FROM nagios_timedeventqueue WHERE instance_id='1' ORDER BY queued_time DESC LIMIT 0,1
[1425464053.252719] [002.0] [pid=44143] SELECT UNIX_TIMESTAMP(entry_time) AS latest_time FROM nagios_comments WHERE instance_id='1' ORDER BY entry_time DESC LIMIT 0,1
[1425464053.252875] [002.0] [pid=44143] UPDATE nagios_conninfo SET last_checkin_time=NOW(), bytes_processed='676', lines_processed='63', entries_processed='0' WHERE conninfo_i
[1425464053.253037] [002.0] [pid=44143] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-bs7b-p0-n0-zyxel-es2108g' AND name2 IS N
[1425464053.253325] [002.0] [pid=44143] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-bs7b-p0-n0-zyxel-es2108g'
[1425464053.253489] [002.0] [pid=44143] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='18', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1425464053.254038] [002.0] [pid=44143] DELETE FROM nagios_timedevents WHERE instance_id='1' AND scheduled_time<FROM_UNIXTIME(1425377653)
[1425464053.254126] [002.0] [pid=44143] DELETE FROM nagios_systemcommands WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424859253)
[1425464053.254202] [002.0] [pid=44143] DELETE FROM nagios_servicechecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424859253)
[1425464053.254277] [002.0] [pid=44143] DELETE FROM nagios_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424859253)
[1425464053.254388] [002.0] [pid=44143] DELETE FROM nagios_eventhandlers WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1422785653)
[1425464053.254464] [002.0] [pid=44143] DELETE FROM nagios_externalcommands WHERE instance_id='1' AND entry_time<FROM_UNIXTIME(1422785653)
[1425464053.254617] [002.0] [pid=44143] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-ca12-p0-n0-dlink-des3200-28' AND name2 I
[1425464053.254875] [002.0] [pid=44143] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-ca12-p0-n0-dlink-des3200-28'
[1425464053.255014] [002.0] [pid=44143] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='19', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1426592936.190325] [002.0] [pid=20929] SELECT instance_id FROM nagios_instances WHERE instance_name='default'
[1426592936.237929] [002.0] [pid=20929] INSERT INTO nagios_conninfo SET instance_id='1', connect_time=NOW(), last_checkin_time=NOW(), bytes_processed='0', lines_processed='0',
[1426592936.276460] [002.0] [pid=20929] SELECT object_id, objecttype_id, name1, name2 FROM nagios_objects WHERE instance_id='1'
[1426592936.283247] [002.0] [pid=20929] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_programstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426592936.308085] [002.0] [pid=20929] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_hoststatus WHERE instance_id='1' ORDER BY status_update_time DESC
[1426592936.347742] [002.0] [pid=20929] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_servicestatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426592936.368602] [002.0] [pid=20929] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_contactstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426592936.369036] [002.0] [pid=20929] SELECT UNIX_TIMESTAMP(queued_time) AS latest_time FROM nagios_timedeventqueue WHERE instance_id='1' ORDER BY queued_time DESC LIMIT 0,1
[1426592936.369453] [002.0] [pid=20929] SELECT UNIX_TIMESTAMP(entry_time) AS latest_time FROM nagios_comments WHERE instance_id='1' ORDER BY entry_time DESC LIMIT 0,1
[1426592936.380965] [002.0] [pid=20929] UPDATE nagios_conninfo SET last_checkin_time=NOW(), bytes_processed='676', lines_processed='63', entries_processed='0' WHERE conninfo_i
[1426592936.381148] [002.0] [pid=20929] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-ch184a-p10-n0-zyxel-es3124' AND name2 IS
[1426592936.432560] [002.0] [pid=20929] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-ch184a-p10-n0-zyxel-es3124'
[1426592936.432767] [002.0] [pid=20929] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='20', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1426592936.433361] [002.0] [pid=20929] DELETE FROM nagios_timedevents WHERE instance_id='1' AND scheduled_time<FROM_UNIXTIME(1426506536)
[1426592936.473709] [002.0] [pid=20929] DELETE FROM nagios_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1425988136)
[1426592936.477860] [002.0] [pid=20929] DELETE FROM nagios_eventhandlers WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1423914536)
[1426592936.493537] [002.0] [pid=20929] DELETE FROM nagios_externalcommands WHERE instance_id='1' AND entry_time<FROM_UNIXTIME(1423914536)
[1426592936.494034] [002.0] [pid=20929] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-ch184a-p11-n0-zyxel-es3124' AND name2 IS
[1426592936.494290] [002.0] [pid=20929] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-ch184a-p11-n0-zyxel-es3124'
[1426592936.494479] [002.0] [pid=20929] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='21', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1426593033.095967] [002.0] [pid=24202] SELECT instance_id FROM nagios_instances WHERE instance_name='default'
[1426593033.096152] [002.0] [pid=24202] INSERT INTO nagios_conninfo SET instance_id='1', connect_time=NOW(), last_checkin_time=NOW(), bytes_processed='0', lines_processed='0',
[1426593033.096322] [002.0] [pid=24202] SELECT object_id, objecttype_id, name1, name2 FROM nagios_objects WHERE instance_id='1'
[1426593033.096542] [002.0] [pid=24202] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_programstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426593033.096628] [002.0] [pid=24202] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_hoststatus WHERE instance_id='1' ORDER BY status_update_time DESC
[1426593033.096749] [002.0] [pid=24202] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_servicestatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426593033.096877] [002.0] [pid=24202] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_contactstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426593033.096953] [002.0] [pid=24202] SELECT UNIX_TIMESTAMP(queued_time) AS latest_time FROM nagios_timedeventqueue WHERE instance_id='1' ORDER BY queued_time DESC LIMIT 0,1
[1426593033.097030] [002.0] [pid=24202] SELECT UNIX_TIMESTAMP(entry_time) AS latest_time FROM nagios_comments WHERE instance_id='1' ORDER BY entry_time DESC LIMIT 0,1
[1426593033.097235] [002.0] [pid=24202] UPDATE nagios_conninfo SET last_checkin_time=NOW(), bytes_processed='675', lines_processed='63', entries_processed='0' WHERE conninfo_i
[1426593033.097393] [002.0] [pid=24202] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-ch186a-p3-n0-zyxel-es3124' AND name2 IS
[1426593033.097717] [002.0] [pid=24202] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-ch186a-p3-n0-zyxel-es3124'
[1426593033.097886] [002.0] [pid=24202] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='22', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1426593033.098422] [002.0] [pid=24202] DELETE FROM nagios_timedevents WHERE instance_id='1' AND scheduled_time<FROM_UNIXTIME(1426506633)
[1426593033.098509] [002.0] [pid=24202] DELETE FROM nagios_systemcommands WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1425988233)
[1426593033.098585] [002.0] [pid=24202] DELETE FROM nagios_servicechecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1425988233)
[1426593033.098659] [002.0] [pid=24202] DELETE FROM nagios_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1425988233)
[1426593033.098779] [002.0] [pid=24202] DELETE FROM nagios_eventhandlers WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1423914633)
[1426593033.098854] [002.0] [pid=24202] DELETE FROM nagios_externalcommands WHERE instance_id='1' AND entry_time<FROM_UNIXTIME(1423914633)
[1426593033.099011] [002.0] [pid=24202] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-ch186a-p3-n1-dlink-des3200-26' AND name2
[1426593033.099260] [002.0] [pid=24202] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-ch186a-p3-n1-dlink-des3200-26'
[1426593033.099444] [002.0] [pid=24202] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='23', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1426681458.129417] [002.0] [pid=63381] SELECT instance_id FROM nagios_instances WHERE instance_name='default'
[1426681458.146529] [002.0] [pid=63381] INSERT INTO nagios_conninfo SET instance_id='1', connect_time=NOW(), last_checkin_time=NOW(), bytes_processed='0', lines_processed='0',
[1426681458.186896] [002.0] [pid=63381] SELECT object_id, objecttype_id, name1, name2 FROM nagios_objects WHERE instance_id='1'
[1426681458.199799] [002.0] [pid=63381] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_programstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426681458.199929] [002.0] [pid=63381] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_hoststatus WHERE instance_id='1' ORDER BY status_update_time DESC
[1426681458.208163] [002.0] [pid=63381] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_servicestatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426681458.212868] [002.0] [pid=63381] SELECT UNIX_TIMESTAMP(status_update_time) AS latest_time FROM nagios_contactstatus WHERE instance_id='1' ORDER BY status_update_time DE
[1426681458.212975] [002.0] [pid=63381] SELECT UNIX_TIMESTAMP(queued_time) AS latest_time FROM nagios_timedeventqueue WHERE instance_id='1' ORDER BY queued_time DESC LIMIT 0,1
[1426681458.213067] [002.0] [pid=63381] SELECT UNIX_TIMESTAMP(entry_time) AS latest_time FROM nagios_comments WHERE instance_id='1' ORDER BY entry_time DESC LIMIT 0,1
[1426681458.213300] [002.0] [pid=63381] UPDATE nagios_conninfo SET last_checkin_time=NOW(), bytes_processed='676', lines_processed='63', entries_processed='0' WHERE conninfo_i
[1426681458.213499] [002.0] [pid=63381] SELECT * FROM nagios_objects WHERE instance_id='1' AND objecttype_id='1' AND BINARY name1='don-cr7-p0-n0-dlink-dgs1100-06' AND name2 IS
[1426681458.278605] [002.0] [pid=63381] INSERT INTO nagios_objects SET instance_id='1', objecttype_id='1' , name1='don-cr7-p0-n0-dlink-dgs1100-06'
[1426681458.278886] [002.0] [pid=63381] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='24', status_update_time=FROM_UNIXTIME(1424941246), output='PING OK -
[1426681458.279836] [002.0] [pid=63381] DELETE FROM nagios_timedevents WHERE instance_id='1' AND scheduled_time<FROM_UNIXTIME(1426595058)
[1426681458.279971] [002.0] [pid=63381] DELETE FROM nagios_systemcommands WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1426076658)
[1426681458.280081] [002.0] [pid=63381] DELETE FROM nagios_servicechecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1426076658)
[1426681458.280207] [002.0] [pid=63381] DELETE FROM nagios_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1426076658)
[1426681458.280374] [002.0] [pid=63381] DELETE FROM nagios_eventhandlers WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1424003058)
[1426681458.293750] [002.0] [pid=63381] DELETE FROM nagios_externalcommands WHERE instance_id='1' AND entry_time<FROM_UNIXTIME(1424003058)
ps-aux

Code: Select all

root   32476  0.0  0.0      0      0 ??  ZJ   10:35AM     0:00.08 <defunct>
root   32477  0.0  0.0      0      0 ??  ZJ   10:35AM     0:00.08 <defunct>
root   45273  0.0  1.0 251248 100664 ??  SJ   12:25PM     0:02.41 /usr/local/bin/spine 0 531
root   45328  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.08 <defunct>
www    45391  0.0  0.2 266380  20120 ??  IJ    3:17PM     0:00.67 /usr/local/sbin/httpd -DNOHTTPACCEPT
root   45496  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.12 <defunct>
root   45661  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.11 <defunct>
root   45822  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.09 <defunct>
root   45986  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.08 <defunct>
nagios 46121  0.0  0.2  43196  16456 ??  SsJ   4:49PM    22:28.72 /usr/local/bin/nagios -d /usr/local/etc/nagios/nagios.cfg
root   46125  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.09 <defunct>
root   46289  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.08 <defunct>
root   46450  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.11 <defunct>
root   46616  0.0  0.0      0      0 ??  ZJ   12:25PM     0:00.08 <defunct>
....
....
....
root   62845  0.0  0.0      0      0 ??  ZJ    1:05PM     0:00.08 <defunct>
root   62855  0.0  0.0      0      0 ??  ZJ    1:05PM     0:00.08 <defunct>
root   62856  0.0  0.0      0      0 ??  ZJ    1:05PM     0:00.08 <defunct>
root   62886  0.0  0.0      0      0 ??  ZJ    1:05PM     0:00.11 <defunct>
root   62908  0.0  0.0      0      0 ??  ZJ    1:05PM     0:00.08 <defunct>
root   62942  0.0  0.0      0      0 ??  ZJ    1:05PM     0:00.09 <defunct>
nagios 63365  0.0  0.1  63992   5544 ??  IsJ   3:24PM     0:00.00 /usr/local/bin/ndo2db-3x -c /usr/local/etc/nagios/ndo2db.cfg
nagios 63366  0.0  0.0      0      0 ??  ZJ    3:24PM     0:00.01 <defunct>
nagios 63368  0.0  0.0      0      0 ??  ZJ    3:24PM     0:00.01 <defunct>
nagios 63370  0.0  0.0      0      0 ??  ZJ    3:24PM     0:00.01 <defunct>
nagios 63380  0.0  0.1  63992   5792 ??  IJ    3:24PM     0:00.01 /usr/local/bin/ndo2db-3x -c /usr/local/etc/nagios/ndo2db.cfg
nagios 63381  0.0  0.1  63992   5868 ??  IJ    3:24PM     0:00.01 /usr/local/bin/ndo2db-3x -c /usr/local/etc/nagios/ndo2db.cfg
www    63418  0.0  0.1 258188  12352 ??  SJ    3:24PM     0:00.00 /usr/local/sbin/httpd -DNOHTTPACCEPT
root   65556  0.0  1.0 251248  99736 ??  SJ    7:50AM     0:02.42 /usr/local/bin/spine 0 531
root   65608  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.09 <defunct>
root   65779  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.12 <defunct>
root   65940  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.12 <defunct>
root   66098  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.08 <defunct>
root   66262  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.09 <defunct>
root   66429  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.08 <defunct>
root   66589  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.08 <defunct>
root   66611  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.11 <defunct>
root   66612  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.08 <defunct>
root   66616  0.0  0.0      0      0 ??  ZJ    7:50AM     0:00.08 <defunct>
root   71572  0.0  1.0 255344 100892 ??  IJ    6:40AM     0:02.60 /usr/local/bin/spine 0 531
root   71574  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.12 <defunct>
root   71608  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   71609  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.12 <defunct>
root   71610  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   71611  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   71612  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   71613  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   71614  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.11 <defunct>
root   71615  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   71616  0.0  0.0      0      0 ??  ZJ    6:40AM     0:00.08 <defunct>
root   73523  0.0  1.0 251248  99548 ??  SJ   10:15AM     0:02.47 /usr/local/bin/spine 0 531
root   73524  0.0  0.0      0      0 ??  ZJ   10:15AM     0:00.08 <defunct>
root   73530  0.0  0.0      0      0 ??  ZJ   10:15AM     0:00.11 <defunct>
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with nagios and ndoutils

Post by tgriep »

Could you run the following and post back the results?

Code: Select all

ll /usr/local/bin/ndomod-3x.o
ll /usr/local/etc/nagios
ll /usr/local/etc
ll /usr/local/nagios/var
Could you upload this file too?
/usr/local/etc/nagios/ndomod.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post by eFusion »

ls -lG /usr/local/bin/ndomod-3x.o

Code: Select all

-rwxr-xr-x  1 root  wheel  100469 Feb 26 13:27 /usr/local/bin/ndomod-3x.o
ls -lG /usr/local/etc/nagios

Code: Select all

total 81
-rw-r--r--  1 www   nagios  11185 Feb 26 14:58 cgi.cfg
-rw-r--r--  1 root  wheel   11665 Feb 25 16:28 cgi.cfg-sample
-rwxrwxrwx  1 www   nagios   4847 Jan 21  2009 checkcommands.cfg
-rw-r--r--  1 www   nagios     53 Jul  5  2013 htpasswd.users
-rwxrwxrwx  1 www   nagios  13599 Jan 21  2009 minimal.cfg
-rwxrwxrwx  1 www   nagios   4354 Jan 21  2009 misccommands.cfg
-rw-r--r--  1 www   nagios   3394 Feb 26 11:15 nagios.cfg
-rw-r--r--  1 root  wheel   44174 Feb 25 16:28 nagios.cfg-sample
-rw-rw-r--  1 www   nagios   4834 Mar  4 13:13 ndo2db.cfg
-rw-rw-r--  1 www   nagios   5130 Feb 27 10:10 ndomod.cfg
drwxr-xr-x  2 root  wheel       9 Feb 25 16:28 objects
-rwxrwxrwx  1 www   nagios   1335 Jan 21  2009 resource.cfg
-rw-r--r--  1 root  wheel    1340 Feb 25 16:28 resource.cfg-sample
ls -lG /usr/local/etc/

Code: Select all

total 306
drwxr-xr-x  3 root    wheel       3 Jul 30  2013 CORBA
drwxr-xr-x  5 root    wheel       5 Jul 30  2013 X11
drwxr-xr-x  6 root    wheel      17 Dec 25 13:53 apache22
drwxr-xr-x  4 root    wheel       4 Jul 30  2013 dconf
drwxr-xr-x  2 root    wheel       2 Jun 26  2013 devd
drwxr-xr-x  4 root    wheel       7 Jul 30  2013 fonts
drwxr-xr-x  6 root    wheel       6 Jul 30  2013 gconf
drwxr-xr-x  3 root    wheel       3 Jul 30  2013 gnome
drwxr-xr-x  3 root    wheel       3 Jul 30  2013 gnome-vfs-2.0
-rw-r--r--  1 root    wheel     577 Feb 17 21:03 ldap.conf
-r--r--r--  1 root    wheel    8678 Aug  6  2013 ldap.conf.dist
drwxr-xr-x  2 root    wheel       3 Jun 26  2013 man.d
drwxr-xr-x  6 root    wheel       6 Jul 30  2013 mateconf
drwxr-xr-x  2 root    wheel      12 Jun 26  2013 mc
drwxr-xr-x  2 root    wheel       3 Jul 30  2013 mtree
drwxr-xr-x  3 root    wheel      15 Mar  4 13:13 nagios
drwxr-xr-x  3 root    wheel       9 Jul  5  2013 nagios-back
drwxr-xr-x  5 www     nagios     20 Mar 10 13:19 nagiosql
drwxr-x---  6 www     nagios     21 Aug  2  2013 nagiosql-back
drwxrwxr-x  8 root    wheel      31 Feb 26 10:37 ndoutils-2.0.0
lrwxr-xr-x  1 root    wheel      24 Aug  6  2013 nss_ldap.conf -> /usr/local/etc/ldap.conf
-r--r--r--  1 root    wheel    9496 Aug  6  2013 nss_ldap.conf.sample
drwxr-xr-x  2 root    wheel       4 Aug  6  2013 openldap
drwxr-xr-x  2 root    wheel       4 Aug  6  2013 pam.d
drwxr-xr-x  2 root    wheel       4 Jul 30  2013 pango
-rw-r--r--  1 root    wheel     480 Jul  3  2013 pear.conf
-rw-r--r--  1 root    wheel     480 Jul  3  2013 pear.conf.sample
drwxr-xr-x  2 root    wheel       3 Nov 26  2013 php
-rw-r--r--  1 root    wheel   21804 Jul  3  2013 php-fpm.conf
-rw-r--r--  1 root    wheel   21804 Jul  3  2013 php-fpm.conf.default
-r--r--r--  1 root    wheel      75 Jul  3  2013 php.conf
-r--r--r--  1 root    wheel   66969 Nov 25 18:32 php.ini
-r--r--r--  1 root    wheel   66905 Jul  3  2013 php.ini-development
-r--r--r--  1 root    wheel   66938 Jul  3  2013 php.ini-production
-r--r--r--  1 root    wheel    3381 Nov 13  2013 portmaster.rc.sample
drwxr-xr-x  2 root    wheel      13 Feb 26 10:12 rc.d
drwxr-xr-x  3 root    wheel      28 Mar 18 20:53 scripts
-r--r--r--  1 root    wheel    1443 Jun 26  2013 slsh.rc
drwxr-xr-x  2 snmptt  snmptt      8 Aug 11  2013 snmp
drwxr-xr-x  3 root    wheel       3 Jul 30  2013 sound
-r--r--r--  1 root    wheel    2787 Nov 13  2013 spine.conf
-r--r--r--  1 root    wheel    2787 Nov 13  2013 spine.conf_bak
-r--r-----  1 root    wheel    3284 Mar 12  2014 sudoers
drwxr-x---  2 root    wheel       3 Aug  6  2013 sudoers.d
-r--r-----  1 root    wheel    3284 Aug  6  2013 sudoers.sample
drwxr-xr-x  3 root    wheel       3 Jul 30  2013 vfs
-r--r--r--  1 root    wheel    4499 Aug 11  2013 wgetrc.sample
drwxr-xr-x  3 root    wheel       3 Jul 30  2013 xdg
-r--r--r--  1 root    wheel     339 Jul  3  2013 xml2Conf.sh
ls -lG /usr/local/nagios/var/
total 53
-rw-r--r-- 1 nagios nagios 110918 Mar 18 15:24 ndo2db.debug
Attachments
ndomod.cfg
ndomod.cfg
(5.01 KiB) Downloaded 232 times
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with nagios and ndoutils

Post by tgriep »

Can you run the following.

Code: Select all

chown nagios.nagios /usr/local/bin/ndomod-3x.o
chown nagios.nagios /usr/local/etc/nagios/objects
chown -r nagios.nagios /usr/local/nagios/
Restart nagios and post the last 200 lines of the nagios.log file.
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post by eFusion »

After this command and restart nagios with ndo have this:

Code: Select all

[1426857559] ndomod: Still unable to connect to data sink.  391603 items lost, 5000 queued items to flush.
[1426857575] ndomod: Still unable to connect to data sink.  393200 items lost, 5000 queued items to flush.
[1426857591] ndomod: Still unable to connect to data sink.  394280 items lost, 5000 queued items to flush.
[1426857607] ndomod: Still unable to connect to data sink.  395338 items lost, 5000 queued items to flush.
[1426857623] ndomod: Still unable to connect to data sink.  395471 items lost, 5000 queued items to flush.
[1426857639] ndomod: Still unable to connect to data sink.  396566 items lost, 5000 queued items to flush.
[1426857655] ndomod: Still unable to connect to data sink.  397646 items lost, 5000 queued items to flush.
[1426857671] ndomod: Still unable to connect to data sink.  398737 items lost, 5000 queued items to flush.
[1426857674] Caught SIGTERM, shutting down...
[1426857674] Successfully shutdown... (PID=46121)
[1426857675] ndomod: Shutdown complete.
[1426857675] Event broker module '/usr/local/bin/ndomod-3x.o' deinitialized successfully.
[1426857675] Nagios 3.4.1 starting... (PID=43133)
[1426857675] Local time is Fri Mar 20 16:21:15 MSK 2015
[1426857675] LOG VERSION: 2.0
[1426857675] ndomod: NDOMOD 2.0.0 (02-28-2014) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1426857676] ndomod: Could not open data sink!  I'll keep trying, but some output may get lost...
[1426857676] ndomod registered for process data
[1426857676] ndomod registered for timed event data
[1426857676] ndomod registered for log data'
[1426857676] ndomod registered for system command data'
[1426857676] ndomod registered for event handler data'
[1426857676] ndomod registered for notification data'
[1426857676] ndomod registered for service check data'
[1426857676] ndomod registered for host check data'
[1426857676] ndomod registered for comment data'
[1426857676] ndomod registered for downtime data'
[1426857676] ndomod registered for flapping data'
[1426857676] ndomod registered for program status data'
[1426857676] ndomod registered for host status data'
[1426857676] ndomod registered for service status data'
[1426857676] ndomod registered for adaptive program data'
[1426857676] ndomod registered for adaptive host data'
[1426857676] ndomod registered for adaptive service data'
[1426857676] ndomod registered for external command data'
[1426857676] ndomod registered for aggregated status data'
[1426857676] ndomod registered for retention data'
[1426857676] ndomod registered for contact data'
[1426857676] ndomod registered for contact notification data'
[1426857676] ndomod registered for acknowledgement data'
[1426857676] ndomod registered for state change data'
[1426857676] ndomod registered for contact status data'
[1426857676] ndomod registered for adaptive contact data'
[1426857676] Event broker module '/usr/local/bin/ndomod-3x.o' initialized successfully.
[1426857676] Finished daemonizing... (New PID=43146)
[1426857692] ndomod: Still unable to connect to data sink.  16609 items lost, 5000 queued items to flush.
[1426857708] ndomod: Successfully connected to data sink.  17957 items lost, 5000 queued items to flush.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Problem with nagios and ndoutils

Post by ssax »

Now that it's has successfully connected to the data sink are you seeing any improvement? Since that is the last line of your log can you post another 200 or so lines?
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post by eFusion »

Thank you for taking part , but I do not think it is a success because in db 25 records as usual :cry:
For some reason in nagios.log have this:

Code: Select all

ndomod: Still unable to connect to data sink.  14056720 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14056863 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14057740 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14059512 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14060765 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14062248 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14062369 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14064009 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14065317 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14066531 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14067631 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14067709 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14068517 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14069847 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14071077 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14072207 items lost, 5000 queued items to flush.
ndomod: Still unable to connect to data sink.  14072349 items lost, 5000 queued items to flush.
Why the number after "connect to data sink" increases?
Locked