Page 1 of 2

All is empty

Posted: Wed Oct 24, 2018 11:28 am
by sigmainformatique
Hello,

I have an issue : all is empty in Nagios XI home dashboard.
0 hosts, 0 services... (see capture)

I have made repair_databases script (ok), checked that tables from mysql "nagios" (ndo) database are not empty...
ndo2db is running and populating tables.

For example :

Code: Select all

MariaDB [nagios]> select count(*) from nagios.nagios_hosts;
+----------+
| count(*) |
+----------+
|     2583 |
+----------+
1 row in set (0.00 sec)

MariaDB [nagios]> select count(*) from nagios.nagios_services;
+----------+
| count(*) |
+----------+
|     4786 |
+----------+
1 row in set (0.00 sec)

Nagios is running and diplaying correctly services/hosts on our thruk with livestatus.

Any idea? It seems as if there were an issue with a join table or something like this.

Regards
Guillaume

Re: All is empty

Posted: Wed Oct 24, 2018 2:19 pm
by npolovenko
Hello, @sigmainformatique. Please run the following commands in order and let me know if it resolves the issue.
mysqlcheck -r -f -uroot -pnagiosxi --all-databases
service nagios stop
service ndo2db stop
mv /usr/local/nagios/var/ndo2db.lock /usr/local/nagios/var/ndo2db.lock.bak
mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
service ndo2db start
service nagios start

Re: All is empty

Posted: Thu Oct 25, 2018 2:33 am
by sigmainformatique
Hello,
[root@xxxxxx ~]# service nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@xxxxxx ~]# service ndo2db stop
Stopping ndo2db (via systemctl): [ OK ]


[root@xxxxxx ~]# mv /usr/local/nagios/var/ndo2db.lock /usr/local/nagios/var/ndo2db.lock.bak
mv: impossible d'évaluer « /usr/local/nagios/var/ndo2db.lock »: Aucun fichier ou dossier de ce type (no such file in french)
[root@xxxxxx ~]# mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
mv: impossible d'évaluer « /usr/local/nagios/var/ndo.sock »: Aucun fichier ou dossier de ce type
[root@xxxxxx ~]# mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
mv: impossible d'évaluer « /usr/local/nagios/var/ndo.sock »: Aucun fichier ou dossier de ce type


[root@xxxxxx ~]# service ndo2db start
Starting ndo2db (via systemctl): [ OK ]

[root@xxxxxx ~]# service nagios start
Starting nagios (via systemctl): [ OK ]
Does not work : 0 service 0 host displayed. (but thruk... are ok)

Tried to purge all tables (it s our dev environment) :
set foreign_key_checks=0; delete from nagios.nagios_acknowledgements;
set foreign_key_checks=0; delete from nagios.nagios_commands;
set foreign_key_checks=0; delete from nagios.nagios_commenthistory;
set foreign_key_checks=0; delete from nagios.nagios_comments;
set foreign_key_checks=0; delete from nagios.nagios_configfiles;...
set foreign_key_checks=0; delete from nagios.nagios_configfilevariables;
...
Tables are well populated after the restart of nagios+ndo2db, but XI is still displaying nothing.

Re: All is empty

Posted: Thu Oct 25, 2018 10:31 am
by lmiltchev
Nagios is running and diplaying correctly services/hosts on our thruk with livestatus.
Have you done major customizations to your Nagios XI instance? Nagios XI with thruk/livestatus wouldn't be supported.

Can you run the following commands, and show the output if code wraps?

Code: Select all

grep ndo2db /usr/local/nagios/var/nagios.log | tail -100

Code: Select all

tail -50 /var/log/mysqld.log
If running mariadb:

Code: Select all

tail -50 /var/log/mariadb/mariadb.log
Also, post the following files on the forum: /usr/local/nagios/etc/nagios.cfg, /usr/local/nagios/etc/ndo2db.cfg, and /usr/local/nagios/etc/ndomod.cfg.

Re: All is empty

Posted: Tue Oct 30, 2018 11:46 am
by sigmainformatique
Hello,

that you requestd in following posts :

Code: Select all

[1540854000] CURRENT SERVICE STATE: localhost;Service Status - ndo2db;WARNING;HARD;4;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540854907] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540858597] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540862277] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540865937] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540869627] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540873297] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540876977] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540880647] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540884327] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540887997] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540891667] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540895327] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540898997] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540902657] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540906317] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540909985] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540913646] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :
[1540917306] SERVICE NOTIFICATION: nagiosadmin;localhost;Service Status - ndo2db;WARNING;notify_service_by_email;[Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :

Re: All is empty

Posted: Tue Oct 30, 2018 11:51 am
by sigmainformatique
For Maria DB : Old issues with space (before our incident) :
The DB is up and running, and as i said, NDO tables are well populated. Tables were repaired

Code: Select all

[root@infnxddat021 ~]# tail -50 /var/log/mariadb/mariadb.log
2018-08-20 12:04:12 140201291060992 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:04:12 140201291060992 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:06:34 140200824362752 [Warning] mysqld: Retry in 60 secs. Message reprinted in 600 secs
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:21 140200487073536 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:07:58 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:08:34 140198912378624 [ERROR] mysqld: Disk full (/tmp/#sql_68b_3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
2018-08-20 12:15:15 140198916679424 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2018-08-20 12:15:15 140198916679424 [Note] Event Scheduler: Purging the queue. 0 events
2018-08-20 12:15:15 140200843912960 [Note] InnoDB: FTS optimize thread exiting.
2018-08-20 12:15:35 140198916679424 [Warning] /usr/sbin/mysqld: Forcing close of thread 4842792  user: 'nagios'

2018-08-20 12:15:35 140198916679424 [ERROR] mysqld: Got an error writing communication packets
2018-08-20 12:15:36 140198916679424 [Note] InnoDB: Starting shutdown...
2018-08-20 12:15:36 140200966375168 [Note] InnoDB: Dumping buffer pool(s) to /app/mysql/ib_buffer_pool
2018-08-20 12:15:36 140200966375168 [Note] InnoDB: Instance 0, restricted to 2048 pages due to innodb_buf_pool_dump_pct=25
2018-08-20 12:15:36 140200966375168 [Note] InnoDB: Buffer pool(s) dump completed at 180820 12:15:36
2018-08-20 12:15:38 140198916679424 [Note] InnoDB: Shutdown completed; log sequence number 84456222
2018-08-20 12:15:38 140198916679424 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-08-20 12:15:39 140198916679424 [Note] /usr/sbin/mysqld: Shutdown complete

Re: All is empty

Posted: Tue Oct 30, 2018 11:58 am
by sigmainformatique
nagios.cfg

Code: Select all

# MODIFIED
admin_email=root@localhost
admin_pager=root@localhost
translate_passive_host_checks=1
log_event_handlers=0
use_large_installation_tweaks=1
enable_environment_macros=0
host_down_disable_service_checks=1


# NDOUtils module
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg


# Module mod gearman
broker_module=/usr/lib64/mod_gearman2/mod_gearman2.o config=/etc/mod_gearman2/module.conf eventhandler=no

# Module livestatus
#broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live debug=1
broker_module=/usr/local/lib/mk-livestatus/livestatus14.o /usr/local/nagios/var/rw/live debug=0



# PNP settings - bulk mode with NCPD
process_performance_data=0
# service performance data
service_perfdata_file=/var/nagiosramdisk/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$\tLONGSERVICEOUTPUT::$LONGSERVICEOUTPUT$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-bulk
# host performance data
host_perfdata_file=/var/nagiosramdisk/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$\tLONGHOSTOUTPUT::$LONGHOSTOUTPUT$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file-bulk


# OBJECTS - UNMODIFIED
#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/localhost.cfg
#cfg_file=/usr/local/nagios/etc/objects/templates.cfg
#cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg


# STATIC OBJECT DEFINITIONS (THESE DON'T GET EXPORTED/IMPORTED BY NAGIOSQL)
cfg_dir=/usr/local/nagios/etc/static

# OBJECTS EXPORTED FROM NAGIOSQL
cfg_file=/usr/local/nagios/etc/contacttemplates.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/servicegroups.cfg
cfg_file=/usr/local/nagios/etc/hosttemplates.cfg
cfg_file=/usr/local/nagios/etc/servicetemplates.cfg
cfg_file=/usr/local/nagios/etc/servicedependencies.cfg
cfg_file=/usr/local/nagios/etc/serviceescalations.cfg
cfg_file=/usr/local/nagios/etc/hostdependencies.cfg
cfg_file=/usr/local/nagios/etc/hostescalations.cfg
cfg_file=/usr/local/nagios/etc/hostextinfo.cfg
cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg
cfg_dir=/usr/local/nagios/etc/hosts
cfg_dir=/usr/local/nagios/etc/services

# GLOBAL EVENT HANDLERS
#global_host_event_handler=xi_host_event_handler
#global_service_event_handler=xi_service_event_handler



# UNMODIFIED
accept_passive_host_checks=1
accept_passive_service_checks=1
additional_freshness_latency=15
auto_reschedule_checks=1
auto_rescheduling_interval=30
auto_rescheduling_window=45
bare_update_check=0
cached_host_check_horizon=15
cached_service_check_horizon=15
check_external_commands=1
check_for_orphaned_hosts=1
check_for_orphaned_services=1
check_for_updates=1
check_host_freshness=0
check_result_path=/var/nagiosramdisk/spool/checkresults
check_result_reaper_frequency=10
check_service_freshness=1
command_file=/usr/local/nagios/var/rw/nagios.cmd
daemon_dumps_core=0
date_format=us
debug_file=/usr/local/nagios/var/nagios.debug
debug_level=0
debug_verbosity=1
enable_event_handlers=1
enable_flap_detection=0
enable_notifications=1
enable_predictive_host_dependency_checks=1
enable_predictive_service_dependency_checks=1
event_broker_options=-1
event_handler_timeout=30
execute_host_checks=1
execute_service_checks=1
high_host_flap_threshold=20.0
high_service_flap_threshold=20.0
host_check_timeout=30
host_freshness_check_interval=60
host_inter_check_delay_method=s
illegal_macro_output_chars=`~$&|'"<>
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
interval_length=60
lock_file=/usr/local/nagios/var/nagios.lock
log_archive_path=/usr/local/nagios/var/archives
log_external_commands=0
log_file=/usr/local/nagios/var/nagios.log
log_host_retries=1
log_initial_states=0
log_notifications=1
log_passive_checks=0
log_rotation_method=d
log_service_retries=1
low_host_flap_threshold=5.0
low_service_flap_threshold=5.0
max_check_result_file_age=3600
max_check_result_reaper_time=30
max_concurrent_checks=0
max_debug_file_size=1000000
max_host_check_spread=30
max_service_check_spread=30
nagios_group=nagios
nagios_user=nagios
notification_timeout=30
object_cache_file=/var/nagiosramdisk/objects.cache
obsess_over_hosts=0
obsess_over_services=0
ocsp_timeout=5
passive_host_checks_are_soft=0
perfdata_timeout=5
precached_object_file=/usr/local/nagios/var/objects.precache
resource_file=/usr/local/nagios/etc/resource.cfg
retained_contact_host_attribute_mask=0
retained_contact_service_attribute_mask=0
retained_host_attribute_mask=0
retained_process_host_attribute_mask=0
retained_process_service_attribute_mask=0
retained_service_attribute_mask=0
retain_state_information=1
retention_update_interval=60
service_check_timeout=60
service_freshness_check_interval=60
service_inter_check_delay_method=s
service_interleave_factor=s
soft_state_dependencies=0
state_retention_file=/usr/local/nagios/var/retention.dat
status_file=/var/nagiosramdisk/status.dat
status_update_interval=10
temp_file=/usr/local/nagios/var/nagios.tmp
temp_path=/var/nagiosramdisk/tmp
use_aggressive_host_checking=0
use_regexp_matching=0
use_retained_program_state=1
use_retained_scheduling_info=1
use_syslog=1
use_true_regexp_matching=0

Re: All is empty

Posted: Tue Oct 30, 2018 12:04 pm
by sigmainformatique

Code: Select all

[INF_S01LX01SA@infnxdsup020 ~]$ cat /usr/local/nagios/etc/ndo2db.cfg
#####################################################################
# NDO2DB DAEMON CONFIG FILE
#####################################################################


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


db_servertype=mysql
db_host=172.31.210.50
#db_host=localhost
db_port=3306

db_name=nagios
db_prefix=nagios_

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





# 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=0



# 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=2



# 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

Re: All is empty

Posted: Tue Oct 30, 2018 12:17 pm
by sigmainformatique

Code: Select all

[INF_S01LX01SA@infnxdsup020 ~]$ cat /usr/local/nagios/etc/ndomod.cfg
#####################################################################
# NDOMOD CONFIG FILE
#####################################################################


# 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=localhost



# 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 vlaid if the output type
# option specified above is "tcpsocket".

tcp_port=5668



# 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 OPTION
# This option determines what data the NDO NEB module will process.
# Do not mess with this option unless you know what you're doing!!!!
# Read the source code (include/ndbxtmod.h) to determine what values
# to use here.  Values from source code should be OR'ed to get the
# value to use here.  A value of -1 will cause all data to be processed.
# Read the source code (include/ndomod.h) and look for "NDOMOD_PROCESS_"
# to determine what values to use here.  Values from source code should
# be OR'ed to get the value to use here.  A value of -1 will cause all
# data to be processed.

# Process everything
#data_processing_options=-1

#no timed event, no host check, no service check
data_processing_options=67108669


# 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

Re: All is empty

Posted: Tue Oct 30, 2018 1:04 pm
by lmiltchev
I didn't see any issues with configs/logs with the exception of the "No space left on device" error, but you said it was an old issue, so I would ignore it.

Have you tried restarting nagios and ndo2db to see if this is going to fix the issue?

Code: Select all

service nagios stop
service ndo2db restart
service nagios start  
Can you run the following command and show the output?

Code: Select all

echo "select * from nagios_objects where is_active=1;" | mysql -t -h 172.31.210.50 -unagios -pnagios nagios | wc -l
Lastly, are you logged in Nagios XI as an admin user?