LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NDOmod(nagios)::: "ndomod: Error writing to data sink!" error (https://www.linuxquestions.org/questions/linux-server-73/ndomod-nagios-ndomod-error-writing-to-data-sink-error-785654/)

knockout_artist 01-29-2010 01:25 PM

NDOmod(nagios)::: "ndomod: Error writing to data sink!" error
 
hi,

How do I fix it?


Thanks

Code:

grep -v  '#'  ndo2db.cfg                                               


lock_file=/usr/local/nagios/var/ndo2db.lock
ndo2db_user=nagios
ndo2db_group=nagios
socket_type=unix
socket_name=/usr/local/nagios/var/ndo.sock
tcp_port=5668
use_ssl=0
db_servertype=mysql
db_host=localhost
db_port=3306
db_name=nagios
db_prefix=nagios_
db_user=nagios
db_pass=<PASSWORD>
max_timedevents_age=1440
max_systemcommands_age=10080
max_servicechecks_age=10080
max_hostchecks_age=10080
max_eventhandlers_age=44640
max_externalcommands_age=44640
debug_level=0
debug_verbosity=1
debug_file=/usr/local/nagios/var/ndo2db.debug
max_debug_file_size=1000000


Code:


grep -v  '#'  ndomod.cfg



instance_name=default
output_type=unixsocket
output=/usr/local/nagios/var/ndo.sock
tcp_port=5668
use_ssl=0
output_buffer_items=5000
buffer_file=/usr/local/nagios/var/ndomod.tmp
file_rotation_interval=14400
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=15
data_processing_options=-1
config_output_options=2


Code:


grep -v  '#'  nagios.cfg  | grep '\n'


log_file=/usr/local/nagios/var/nagios.log                 
cfg_file=/usr/local/nagios/etc/objects/commands.cfg       
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg       
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg   
cfg_file=/usr/local/nagios/etc/objects/templates.cfg     
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg     
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg     
cfg_dir=/usr/local/nagios/etc/servers                     
object_cache_file=/usr/local/nagios/var/objects.cache     
precached_object_file=/usr/local/nagios/var/objects.precache
resource_file=/usr/local/nagios/etc/resource.cfg           
status_file=/usr/local/nagios/var/status.dat               
status_update_interval=10                                 
nagios_user=nagios                                         
nagios_group=nagios                                       
check_external_commands=1                                 
command_check_interval=-1                                 
command_file=/usr/local/nagios/var/rw/nagios.cmd           
external_command_buffer_slots=4096                         
lock_file=/usr/local/nagios/var/nagios.lock               
temp_file=/usr/local/nagios/var/nagios.tmp                 
event_broker_options=-1                                   
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
log_rotation_method=d                                                                   
log_archive_path=/usr/local/nagios/var/archives                                         
log_notifications=1                                                                     
log_event_handlers=1                                                                   
log_initial_states=0                                                                   
log_external_commands=1                                                                 
service_inter_check_delay_method=s                                                     
service_interleave_factor=s                                                             
host_inter_check_delay_method=s                                                         
max_concurrent_checks=0                                                                 
check_result_reaper_frequency=10
check_result_path=/usr/local/nagios/var/spool/checkresults
cached_host_check_horizon=15
cached_service_check_horizon=15
enable_predictive_host_dependency_checks=1
enable_predictive_service_dependency_checks=1
soft_state_dependencies=0
auto_rescheduling_interval=30
auto_rescheduling_window=180
event_handler_timeout=30
notification_timeout=30
retain_state_information=1
state_retention_file=/usr/local/nagios/var/retention.dat
retention_update_interval=60
use_retained_program_state=1
use_retained_scheduling_info=1
retained_host_attribute_mask=0
retained_service_attribute_mask=0
retained_process_host_attribute_mask=0
retained_process_service_attribute_mask=0
retained_contact_host_attribute_mask=0
retained_contact_service_attribute_mask=0
interval_length=60
use_aggressive_host_checking=0
enable_notifications=1
enable_event_handlers=1
process_performance_data=0
translate_passive_host_checks=0
check_for_orphaned_services=1
check_for_orphaned_hosts=1
check_service_freshness=1
service_freshness_check_interval=60
check_host_freshness=0
host_freshness_check_interval=60
additional_freshness_latency=15
enable_flap_detection=1
p1_file=/usr/local/nagios/bin/p1.pl
enable_embedded_perl=1
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
use_regexp_matching=0
use_true_regexp_matching=0
admin_email=nagios@localhost
admin_pager=pagenagios@localhost
daemon_dumps_core=0
use_large_installation_tweaks=0
enable_environment_macros=1
debug_file=/usr/local/nagios/var/nagios.debug

OutPut:
Code:

Jan 29 14:33:36 localhost kernel: ndo2db[7845]: segfault at 00007fff2d15dff0 rip 0000003a8e65ff50 rsp 00007fff2d15e008 error 6
Jan 29 14:33:36 localhost nagios: ndomod: Error writing to data sink!  Some output may get lost...
Jan 29 14:33:36 localhost nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Jan 29 14:33:52 localhost nagios: ndomod: Successfully reconnected to data sink!  0 items lost, 98 queued items to flush.
Jan 29 14:33:52 localhost nagios: ndomod: Successfully flushed 98 queued items to data sink.
Jan 29 14:33:52 localhost kernel: ndo2db[7865]: segfault at 00007fff2d15dff0 rip 0000003a8e65ff50 rsp 00007fff2d15e008 error 6
Jan 29 14:33:52 localhost nagios: ndomod: Error writing to data sink!  Some output may get lost...
Jan 29 14:33:52 localhost nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Jan 29 14:34:08 localhost nagios: ndomod: Successfully reconnected to data sink!  0 items lost, 116 queued items to flush.
Jan 29 14:34:08 localhost nagios: ndomod: Successfully flushed 116 queued items to data sink.
Jan 29 14:34:08 localhost kernel: ndo2db[7882]: segfault at 00007fff2d15dff0 rip 0000003a8e65ff50 rsp 00007fff2d15e008 error 6
Jan 29 14:34:08 localhost nagios: ndomod: Error writing to data sink!  Some output may get lost...
Jan 29 14:34:08 localhost nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Jan 29 14:34:24 localhost nagios: ndomod: Successfully reconnected to data sink!  0 items lost, 106 queued items to flush.
Jan 29 14:34:24 localhost nagios: ndomod: Successfully flushed 106 queued items to data sink.
Jan 29 14:34:24 localhost kernel: ndo2db[7901]: segfault at 00007fff2d15dff0 rip 0000003a8e65ff50 rsp 00007fff2d15e008 error 6
Jan 29 14:34:24 localhost nagios: ndomod: Error writing to data sink!  Some output may get lost...
Jan 29 14:34:24 localhost nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters


TB0ne 01-30-2010 10:01 AM

Quote:

Originally Posted by knockout_artist (Post 3845220)
hi,
How do I fix it?

First step is providing some ACTUAL DETAILS...version/distro of Linux, etc.

Are you losing any data?? Because the messages we had to wade through, say you're not...it's reconnecting and putting things away. So either it's not a problem, or you ARE missing data. Check the ownership on the ndo.sock file....and since this was covered on the Nagios forums, it should be easy to find there.

knockout_artist 01-30-2010 09:59 PM

RHEL 5.3
Nagios Core 3.2.0
NDO is version 3.

Code:


ls -l ndo.sock
srwxr-xr-x 1 nagios nagios 0 Jan 30 22:46 ndo.sock


Code:


 nagios_servicegroup_members            |
| nagios_servicegroups                  |
| nagios_services                        |
| nagios_servicestatus                  |
| nagios_statehistory                    |
| nagios_systemcommands                  |
| nagios_timedeventqueue                |
| nagios_timedevents                    |
| nagios_timeperiod_timeranges          |
| nagios_timeperiods                    |
+----------------------------------------+
59 rows in set (0.02 sec)

mysql> SELECT * FROM  nagios_programstatus;
Empty set (0.01 sec)

mysql> SELECT * FROM  nagios_services;
Empty set (0.01 sec)

mysql> SELECT * FROM  nagios_services;
Empty set (0.00 sec)

mysql> SELECT * FROM  nagios_programstatus;
Empty set (0.00 sec)

mysql> SELECT * FROM  nagios_services;
Empty set (0.00 sec)

mysql> SELECT * FROM  nagios_services;


TB0ne 01-31-2010 11:28 AM

Quote:

Originally Posted by knockout_artist (Post 3846771)
RHEL 5.3
Nagios Core 3.2.0
NDO is version 3.

Did you check the ndo2db log, database connection or SSL Parameters, as was suggested by the messages you first posted? Did you check the Nagios forums, as suggested??

Just shoving a list of things out there, still doesn't give alot for folks to go on, without saying what you've already DONE.

knockout_artist 02-01-2010 10:18 AM

I did go through nagios forum. Only problem I found close to mine was some one miss-configured ndomod.cfg file.

I did look for ndo2db file could not find it.

Is it named some thing other then ndo2db?


Code:

find /usr  -name  "ndo2db*"
/usr/local/nagios/etc/ndo2db.cfg
/usr/local/nagios/var/ndo2db.lock
/usr/local/nagios/bin/ndo2db


knockout_artist 02-03-2010 11:45 AM

This was fixed.

I was trying to configure Nagvis too.
That too had issue connecting DB(nagios).

So I just deleted
1-NDO(config/bin)
2-Nagvis
3-DB(agios)
4-user(nagios)

And then install every thing again. Its working how :)

Thanks.

Sourabh Maggo 09-06-2010 08:23 AM

Nagios: Error writing to data sink!
 
Hi all,
me a new member of Nagios. trying to install nagios for cacti npc. I installed nagios ndoutils using

nagioswiki.com/wiki/index.php/NDOutils_on_CentOS

But when i start nagios service it shows following errors

ndomod: Error writing to data sink! Some output may get lost...
ndomod: Please check remote ndo2db log, database connection or SSL Parameters


Mine configuration files are as:-----

ndomod.conf

output_type=unixsocket
output=/var/run/nagios/ndo.sock

ndo2db.conf

ndo2db_user=nagios
ndo2db_group=nagios
socket_type=unix
socket_name=/var/run/nagios/ndo.sock
db_servertype=mysql
db_host=ip of cacti server
db_name=cacti
db_prefix=npc_
db_user=cactiuser
db_pass=cactiuser
debug_level=1

nagios.cfg


event_broker_options=-1
broker_module=/usr/bin/ndomod.o config_file=/etc/nagios/ndomod.cfg

Any one who can help do this favor.

Thanks

Sourabh

TB0ne 09-06-2010 07:26 PM

Quote:

Originally Posted by Sourabh Maggo (Post 4089459)
Hi all,
me a new member of Nagios. trying to install nagios for cacti npc. I installed nagios ndoutils using
nagioswiki.com/wiki/index.php/NDOutils_on_CentOS

But when i start nagios service it shows following errors
ndomod: Error writing to data sink! Some output may get lost...
ndomod: Please check remote ndo2db log, database connection or SSL Parameters


Mine configuration files are as:-----
Any one who can help do this favor.

Open your own thread, for your own problem, please. Don't re-open old threads, and tack questions on to the bottom of someone elses.

And as we said to the OP of this thread....did you check the logs? Check the DB parameters??? The errors are quite clear.


All times are GMT -5. The time now is 01:46 PM.