All mysql nagios tables are Empty
-
- Posts: 37
- Joined: Wed Jan 28, 2015 4:18 pm
- Location: India
All mysql nagios tables are Empty
Hi,
Configured ndoutils and ndo2db is started but i cant see any data in mysql all nagios tables are empty.
Please help on this one.
Configured ndoutils and ndo2db is started but i cant see any data in mysql all nagios tables are empty.
Please help on this one.
Configured ndoutils in nagios but all mysql nagios tables are empty
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: All mysql nagios tables are Empty
What guide did you use to integrate NDO and mysql? Can you provide a link? Have you provided the nagios.cfg file with the correct NDO module, and then restarted the nagios service?
-
- Posts: 37
- Joined: Wed Jan 28, 2015 4:18 pm
- Location: India
Re: All mysql nagios tables are Empty
Hi,
I followed the ndoutil read me file.
Yes i did that but still all tables are empty ndo2db is running.
Please fing nagios.cfg details and also logs
Logs:
nagios.cfg:
I followed the ndoutil read me file.
Yes i did that but still all tables are empty ndo2db is running.
Please fing nagios.cfg details and also logs
Logs:
Code: Select all
[1422569725] Warning: Host 'advantage.iriworldwide.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0001.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0002.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0004.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0005.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0006.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'www07.eu.infores.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Could not open object cache file '/usr/local/nagios/var/objects.cache' for writing!
[1422569727] Successfully launched command file worker with pid 29301
[1422571154] Auto-save of retention data completed successfully.
Code: Select all
############################################################################
#
# NAGIOS.CFG - Sample Main Config File for Nagios 4.0.8
#
# Read the documentation for more information on this configuration
# file. I've provided some comments here, but things may not be so
# clear without further explanation.
#
#
##############################################################################
# LOG FILE
# This is the main log file where service and host events are logged
# for historical purposes. This should be the first option specified
# in the config file!!!
log_file=/usr/local/nagios/var/nagios.log
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.
# You can specify individual object config files as shown below:
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/check-host-alive.cfg
cfg_file=/usr/local/nagios/etc/objects/HttpConf.cfg
cfg_file=/usr/local/nagios/etc/objects/client_power.cfg
#cfg_file=/usr/local/nagios/etc/objects/External_host.cfg
cfg_file=/usr/local/nagios/etc/objects/Pepsico.cfg
cfg_file=/usr/local/nagios/etc/objects/BWS.cfg
cfg_file=/usr/local/nagios/etc/objects/tesco-power.cfg
cfg_file=/usr/local/nagios/etc/objects/cvs_power.cfg
cfg_file=/usr/local/nagios/etc/objects/A-B_Power.cfg
cfg_file=/usr/local/nagios/etc/objects/RB.cfg
cfg_file=/usr/local/nagios/etc/objects/intl-ld-power.cfg
cfg_file=/usr/local/nagios/etc/objects/ap.cfg
cfg_file=/usr/local/nagios/etc/objects/aacAip.cfg
cfg_file=/usr/local/nagios/etc/objects/CRX.cfg
cfg_file=/usr/local/nagios/etc/objects/UK.cfg
cfg_file=/usr/local/nagios/etc/objects/UK_Monitor.cfg
# cfg_file=/usr/local/nagios/etc/ndomod.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
# Definitions for monitoring the local (Linux) host
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
# Definitions for monitoring a Windows machine
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg
# Definitions for monitoring a router/switch
#cfg_file=/usr/local/nagios/etc/objects/switch.cfg
# Definitions for monitoring a network printer
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
#cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
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
# This determines the effective user that Nagios should run as.
# You can either supply a username or a UID.
nagios_user=nagios
# NAGIOS GROUP
# This determines the effective group that Nagios should run as.
# You can either supply a group name or a GID.
nagios_group=nagios
check_external_commands=1
command_file=/usr/local/nagios/var/rw/nagios.cmd
# QUERY HANDLER INTERFACE
# This is the socket that is created for the Query Handler interface
#query_socket=/usr/local/nagios/var/rw/nagios.qh
lock_file=/usr/local/nagios/var/nagios.lock
temp_file=/usr/local/nagios/var/nagios.tmp
temp_path=/tmp
event_broker_options=-1
#broker_module=/somewhere/module1.o
#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0
broker_module=/usr/local/nagios/bin/ndomod.o
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives
use_syslog=1
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_current_states=1
log_external_commands=1
log_passive_checks=1
#global_host_event_handler=somecommand
#global_service_event_handler=somecommand
service_inter_check_delay_method=s
max_service_check_spread=30
service_interleave_factor=s
host_inter_check_delay_method=s
max_host_check_spread=30
max_concurrent_checks=0
check_result_reaper_frequency=10
max_check_result_reaper_time=30
check_result_path=/usr/local/nagios/var/spool/checkresults
max_check_result_file_age=3600
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
#time_change_threshold=900
auto_reschedule_checks=0
auto_rescheduling_interval=30
auto_rescheduling_window=180
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
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
# This mask determines what host attributes are not retained
retained_host_attribute_mask=0
# This mask determines what service attributes are not retained
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
check_for_updates=1
bare_update_check=0
use_aggressive_host_checking=0
execute_service_checks=1
accept_passive_service_checks=1
execute_host_checks=1
accept_passive_host_checks=1
enable_notifications=1
enable_event_handlers=1
process_performance_data=0
#host_perfdata_command=process-host-perfdata
#service_perfdata_command=process-service-perfdata
#host_perfdata_file=/usr/local/nagios/var/host-perfdata
#service_perfdata_file=/usr/local/nagios/var/service-perfdata
#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
#host_perfdata_file_mode=a
#service_perfdata_file_mode=a
#host_perfdata_file_processing_interval=15
#service_perfdata_file_processing_interval=15
#host_perfdata_file_processing_command=process-host-perfdata-file
#service_perfdata_file_processing_command=process-service-perfdata-file
#host_perfdata_process_empty_results=1
#service_perfdata_process_empty_results=1
obsess_over_services=0
#ocsp_command=somecommand
obsess_over_hosts=0
#ochp_command=somecommand
translate_passive_host_checks=0
passive_host_checks_are_soft=0
check_for_orphaned_services=1
check_for_orphaned_hosts=1
check_service_freshness=1
service_freshness_check_interval=60
service_check_timeout_state=c
check_host_freshness=0
host_freshness_check_interval=60
additional_freshness_latency=15
enable_flap_detection=1
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
date_format=us
#use_timezone=US/Mountain
#use_timezone=Australia/Brisbane
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
illegal_macro_output_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=0
#free_child_process_memory=1
#child_processes_fork_twice=1
debug_level=0
debug_verbosity=1
debug_file=/usr/local/nagios/var/nagios.debug
max_debug_file_size=1000000
max_debug_file_size=1000000
allow_empty_hostgroup_assignment=0
#check_workers=3
#loadctl_options=jobs_max=100;backoff_limit=10;rampup_change=5
############################################################################
Code: Select all
lnx0202:root# tail -f /usr/local/nagios/var/nagios.log
[1422569725] Warning: Host 'advantage.iriworldwide.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0001.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0002.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0004.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0005.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'win0006.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Host 'www07.eu.infores.com' has no default contacts or contactgroups defined!
[1422569725] Warning: Could not open object cache file '/usr/local/nagios/var/objects.cache' for writing!
[1422569727] Successfully launched command file worker with pid 29301
[1422571154] Auto-save of retention data completed successfully.
^C
lnx0202:root# ps -ef | grep ndo2db
root 6397 31655 0 17:00 pts/3 00:00:00 grep ndo2db
nagios 29107 1 0 16:15 ? 00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
Configured ndoutils in nagios but all mysql nagios tables are empty
Re: All mysql nagios tables are Empty
Can you post the full log output for nagios after a restart of the process? Your ndo broker line is missing a "config" directive. We should see some errors relating to that in the nagios.log immediately after startup.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
- Posts: 37
- Joined: Wed Jan 28, 2015 4:18 pm
- Location: India
Re: All mysql nagios tables are Empty
Code: Select all
[1422573107] Nagios 4.0.8 starting... (PID=8524)
[1422573107] Local time is Thu Jan 29 17:11:47 CST 2015
[1422573107] LOG VERSION: 2.0
[1422573107] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1422573107] qh: core query handler registered
[1422573107] nerd: Channel hostchecks registered successfully
[1422573107] nerd: Channel servicechecks registered successfully
[1422573107] nerd: Channel opathchecks registered successfully
[1422573107] nerd: Fully initialized and ready to rock!
[1422573107] wproc: Successfully registered manager as @wproc with query handler
[1422573107] wproc: Registry request: name=Core Worker 8527;pid=8527
[1422573107] wproc: Registry request: name=Core Worker 8532;pid=8532
[1422573107] wproc: Registry request: name=Core Worker 8539;pid=8539
[1422573107] wproc: Registry request: name=Core Worker 8541;pid=8541
[1422573107] wproc: Registry request: name=Core Worker 8540;pid=8540
[1422573107] wproc: Registry request: name=Core Worker 8538;pid=8538
[1422573107] ndomod: NDOMOD 2.0.0 (02-28-2014) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1422573107] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[1422573107] ndomod registered for contact data'
[1422573107] ndomod registered for contact notification data'
[1422573107] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1422573107] Warning: Host 'advantage.iriworldwide.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Host 'win0001.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Host 'win0002.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Host 'win0004.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Host 'win0005.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Host 'win0006.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Host 'www07.eu.infores.com' has no default contacts or contactgroups defined!
[1422573107] Warning: Could not open object cache file '/usr/local/nagios/var/objects.cache' for writing!
[1422573109] Successfully launched command file worker with pid 8542
[1422573113] Caught SIGTERM, shutting down...
[1422573113] Successfully shutdown... (PID=8524)
[1422573113] Event broker module 'NERD' deinitialized successfully.
[1422573113] ndomod: Shutdown complete.
[1422573113] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
[1422573114] Nagios 4.0.8 starting... (PID=8599)
[1422573114] Local time is Thu Jan 29 17:11:54 CST 2015
[1422573114] LOG VERSION: 2.0
[1422573114] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1422573114] qh: core query handler registered
[1422573114] nerd: Channel hostchecks registered successfully
[1422573114] nerd: Channel servicechecks registered successfully
[1422573114] nerd: Channel opathchecks registered successfully
[1422573114] nerd: Fully initialized and ready to rock!
[1422573114] wproc: Registry request: name=Core Worker 8602;pid=8602
[1422573114] wproc: Registry request: name=Core Worker 8601;pid=8601
[1422573114] wproc: Registry request: name=Core Worker 8603;pid=8603
[1422573114] wproc: Registry request: name=Core Worker 8606;pid=8606
[1422573114] wproc: Registry request: name=Core Worker 8604;pid=8604
[1422573114] wproc: Registry request: name=Core Worker 8605;pid=8605
[1422573114] ndomod: NDOMOD 2.0.0 (02-28-2014) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1422573114] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[1422573114] ndomod registered for contact data'
[1422573114] ndomod registered for contact notification data'
[1422573114] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1422573114] Warning: Host 'advantage.iriworldwide.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Host 'win0001.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Host 'win0002.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Host 'win0004.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Host 'win0005.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Host 'win0006.ch3.prod.i.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Host 'www07.eu.infores.com' has no default contacts or contactgroups defined!
[1422573114] Warning: Could not open object cache file '/usr/local/nagios/var/objects.cache' for writing!
[1422573116] Successfully launched command file worker with pid 8608
Configured ndoutils in nagios but all mysql nagios tables are empty
Re: All mysql nagios tables are Empty
It looks like you may have a couple issues. First:
This could be due to permissions. What is the output of the following commands:
Next, can you post the contents of the files:
And finally, check for any db errors:
Code: Select all
[1422573114] Warning: Could not open object cache file '/usr/local/nagios/var/objects.cache' for writing!
Code: Select all
ls -la /usr/local/nagios/var/objects.cache
ls -lad /usr/local/nagios/var/
Code: Select all
/usr/local/nagios/etc/ndo2db.cfg?
/usr/local/nagios/etc/ndomod.cfg?
Code: Select all
tail /var/log/mysqld.log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
- Posts: 37
- Joined: Wed Jan 28, 2015 4:18 pm
- Location: India
Re: All mysql nagios tables are Empty
Code: Select all
lnx0202:root# ls -la /usr/local/nagios/var/objects.cache
-rw-r--r-- 1 root nagios 81390 Jan 20 12:01 /usr/local/nagios/var/objects.cache
lnx0202:root# ls -lad /usr/local/nagios/var/
drwxrwxr-x 5 root nagios 4096 Jan 30 11:07 /usr/local/nagios/var/
lnx0202:root#
Code: Select all
####################################################################
# NDO2DB DAEMON CONFIG FILE
#
# Last Modified: 01-02-2009
#####################################################################
# LOCK FILE
# This is the lockfile that NDO2DB will use to store its PID number
# in when it is running in daemon mode.
lock_file=/usr/local/nagios/var/ndo2db.lock
# USER/GROUP PRIVILIGES
# These options determine the user/group that the daemon should run as.
# You can specify a number (uid/gid) or a name for either option.
ndo2db_user=nagios
ndo2db_group=nagios
# SOCKET TYPE
# This option determines what type of socket the daemon will create
# an accept connections from.
# Value:
# unix = Unix domain socket (default)
# tcp = TCP socket
socket_type=unix
#socket_type=tcp
# SOCKET NAME
# This option determines the name and path of the UNIX domain
# socket that the daemon will create and accept connections from.
# This option is only valid if the socket type specified above
# is "unix".
socket_name=/usr/local/nagios/var/ndo.sock
# TCP PORT
# This option determines what port the daemon will listen for
# connections on. This option is only vlaid if the socket type
# specified above is "tcp".
tcp_port=5668
# ENCRYPTION
# This option determines if the ndo2db daemon will accept SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature
use_ssl=0
# DATABASE SERVER TYPE
# This option determines what type of DB server the daemon should
# connect to.
# Values:
# mysql = MySQL
# pgsql = PostgreSQL
db_servertype=mysql
# DATABASE HOST
# This option specifies what host the DB server is running on.
db_host=10.106.10.197
# DATABASE PORT
# This option specifies the port that the DB server is running on.
# Values:
# 3306 = Default MySQL port
# 5432 = Default PostgreSQL port
db_port=3306
# DATABASE NAME
# This option specifies the name of the database that should be used.
db_name=nagios
# DATABASE TABLE PREFIX
# Determines the prefix (if any) that should be prepended to table names.
# If you modify the table prefix, you'll need to modify the SQL script for
# creating the database!
db_prefix=nagios_
# DATABASE USERNAME/PASSWORD
# This is the username/password that will be used to authenticate to the DB.
# The user needs at least SELECT, INSERT, UPDATE, and DELETE privileges on
# the database.
db_user=nagios
db_pass=nagios
## TABLE TRIMMING OPTIONS
# Several database tables containing Nagios event data can become quite large
# over time. Most admins will want to trim these tables and keep only a
# certain amount of data in them. The options below are used to specify the
# age (in MINUTES) that data should be allowd to remain in various tables
# before it is deleted. Using a value of zero (0) for any value means that
# that particular table should NOT be automatically trimmed.
# Keep timed events for 24 hours
max_timedevents_age=1440
# Keep system commands for 1 week
max_systemcommands_age=10080
# Keep service checks for 1 week
max_servicechecks_age=10080
# Keep host checks for 1 week
max_hostchecks_age=10080
# Keep event handlers for 31 days
max_eventhandlers_age=44640
# Keep external commands for 31 days
max_externalcommands_age=44640
# Keep notifications for 31 days
max_notifications_age=44640
# Keep contactnotifications for 31 days
max_contactnotifications=44640
# Keep contactnotificationmethods for 31 days
max_contactnotificationmethods=44640
# Keep logentries for 90 days
max_logentries_age=129600
# Keep acknowledgements for 31 days
max_acknowledgements_age=44640
# DEBUG LEVEL
# This option determines how much (if any) debugging information will
# be written to the debug file. OR values together to log multiple
# types of information.
# Values: -1 = Everything
# 0 = Nothing
# 1 = Process info
# 2 = SQL queries
debug_level=-1
# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
# 1 = More detailed
# 2 = Very detailed
debug_verbosity=1
# DEBUG FILE
# This option determines where the daemon should write debugging information.
debug_file=/usr/local/nagios/var/ndo2db.debug
# MAX DEBUG FILE SIZE
# This option determines the maximum size (in bytes) of the debug file. If
# the file grows larger than this size, it will be renamed with a .old
# extension. If a file already exists with a .old extension it will
# automatically be deleted. This helps ensure your disk space usage doesn't
# get out of control when debugging.
max_debug_file_size=1000000
Code: Select all
lnx0202:root# cat /usr/local/nagios/etc/ndomod.cfg
#####################################################################
# NDOMOD CONFIG FILE
#
# Last Modified: 09-05-2007
#####################################################################
# INSTANCE NAME
# This option identifies the "name" associated with this particular
# instance of Nagios and is used to seperate data coming from multiple
# instances. Defaults to 'default' (without quotes).
instance_name=Monitor
# OUTPUT TYPE
# This option determines what type of output sink the NDO NEB module
# should use for data output. Valid options include:
# file = standard text file
# tcpsocket = TCP socket
# unixsocket = UNIX domain socket (default)
#output_type=file
#output_type=tcpsocket
output_type=unixsocket
# OUTPUT
# This option determines the name and path of the file or UNIX domain
# socket to which output will be sent if the output type option specified
# above is "file" or "unixsocket", respectively. If the output type
# option is "tcpsocket", this option is used to specify the IP address
# of fully qualified domain name of the host that the module should
# connect to for sending output.
#output=/usr/local/nagios/var/ndo.dat
#output=127.0.0.1
output=/usr/local/nagios/var/ndo.sock
# TCP PORT
# This option determines what port the module will connect to in
# order to send output. This option is only valid if the output type
# option specified above is "tcpsocket".
tcp_port=5668
# ENCRYPTION
# This option determines if the module will use SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature
use_ssl=0
# OUTPUT BUFFER
# This option determines the size of the output buffer, which will help
# prevent data from getting lost if there is a temporary disconnect from
# the data sink. The number of items specified here is the number of
# lines (each of variable size) of output that will be buffered.
output_buffer_items=5000
# BUFFER FILE
# This option is used to specify a file which will be used to store the
# contents of buffered data which could not be sent to the NDO2DB daemon
# before Nagios shuts down. Prior to shutting down, the NDO NEB module
# will write all buffered data to this file for later processing. When
# Nagios (re)starts, the NDO NEB module will read the contents of this
# file and send it to the NDO2DB daemon for processing.
buffer_file=/usr/local/nagios/var/ndomod.tmp
# FILE ROTATION INTERVAL
# This option determines how often (in seconds) the output file is
# rotated by Nagios. File rotation is handled by Nagios by executing
# the command defined by the file_rotation_command option. This
# option has no effect if the output_type option is a socket.
file_rotation_interval=14400
# FILE ROTATION COMMAND
# This option specified the command (as defined in Nagios) that is
# used to rotate the output file at the interval specified by the
# file_rotation_interval option. This option has no effect if the
# output_type option is a socket.
#
# See the file 'misccommands.cfg' for an example command definition
# that you can use to rotate the log file.
#file_rotation_command=rotate_ndo_log
# FILE ROTATION TIMEOUT
# This option specified the maximum number of seconds that the file
# rotation command should be allowed to run before being prematurely
# terminated.
file_rotation_timeout=60
# RECONNECT INTERVAL
# This option determines how often (in seconds) that the NDO NEB
# module will attempt to re-connect to the output file or socket if
# a connection to it is lost.
reconnect_interval=15
# RECONNECT WARNING INTERVAL
# This option determines how often (in seconds) a warning message will
# be logged to the Nagios log file if a connection to the output file
# or socket cannot be re-established.
reconnect_warning_interval=15
#reconnect_warning_interval=900
# DATA PROCESSING OPTIONS
# These options determine what data the NDO NEB Module will process
#
data_processing_options=-1
acknowledgement_data=1
adaptive_contact_data=1
adaptive_host_data=1
adaptive_program_data=1
adaptive_service_data=1
aggregated_status_data=1
comment_data=1
contact_status_data=1
downtime_data=1
event_handler_data=1
external_command_data=1
flapping_data=1
host_check_data=1
host_status_data=1
log_data=1
main_config_data=1
notification_data=1
object_config_data=1
process_data=1
program_status_data=1
retention_data=1
service_check_data=1
service_status_data=1
statechange_data=1
system_command_data=1
timed_event_data=1
# CONFIG OUTPUT OPTION
# This option determines what types of configuration data the NDO
# NEB module will dump from Nagios. Values can be OR'ed together.
# Values:
# 0 = Don't dump any configuration information
# 1 = Dump only original config (from config files)
# 2 = Dump config only after retained information has been restored
# 3 = Dump both original and retained configuration
config_output_options=2
Code: Select all
lnx0202:root# tail /var/log/mysqld.log
150129 14:41:36 [Note] /usr/libexec/mysqld: Shutdown complete
150129 14:41:36 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150129 14:41:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150129 14:41:37 InnoDB: Initializing buffer pool, size = 8.0M
150129 14:41:37 InnoDB: Completed initialization of buffer pool
150129 14:41:37 InnoDB: Started; log sequence number 0 44233
150129 14:41:37 [Note] Event Scheduler: Loaded 0 events
150129 14:41:37 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.66' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
Configured ndoutils in nagios but all mysql nagios tables are empty
Re: All mysql nagios tables are Empty
Could you run the following from a command prompt and restart nagios afterwards?
Code: Select all
chown nagios.nagios /usr/local/nagios/var/objects.cache
chown nagios.nagios /usr/local/nagios/var/
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 37
- Joined: Wed Jan 28, 2015 4:18 pm
- Location: India
Re: All mysql nagios tables are Empty
Hi,
I performed the changes but still same all tables empty.
Logs:
I performed the changes but still same all tables empty.
Logs:
Code: Select all
lnx0202:root# tail -f nagios.log
[1422643169] Successfully shutdown... (PID=8599)
[1422643169] Event broker module 'NERD' deinitialized successfully.
[1422643169] ndomod: Still unable to connect to data sink. 0 items lost, 0 queued items to flush.
[1422643169] ndomod: Shutdown complete.
[1422643169] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
[1422643171] Nagios 4.0.8 starting... (PID=6949)
[1422643171] Local time is Fri Jan 30 12:39:31 CST 2015
[1422643171] LOG VERSION: 2.0
[1422643171] qh: Failed to init socket '/usr/local/nagios/var/rw/nagios.qh'. unlink() failed: Permission denied
[1422643171] Error: Failed to initialize query handler. Aborting
Configured ndoutils in nagios but all mysql nagios tables are empty
Re: All mysql nagios tables are Empty
Run these commands and post the results back.
Code: Select all
ll /usr/local/nagios/var/
ll /usr/local/nagios/var/rw
Be sure to check out our Knowledgebase for helpful articles and solutions!