Page 2 of 5

Re: Problem with nagios and ndoutils

Posted: Fri Mar 06, 2015 12:08 pm
by abrist
That listing seems too minimal. You should have a bunch of files in that folder. Are you using a ramdisk?

Re: Problem with nagios and ndoutils

Posted: Tue Mar 10, 2015 5:37 am
by eFusion
No, i have local hdd.

Re: Problem with nagios and ndoutils

Posted: Tue Mar 10, 2015 3:34 pm
by ssax
Please post the output of the following:

Code: Select all

grep object_cache_file /usr/local/nagios/etc/nagios.cfg

Re: Problem with nagios and ndoutils

Posted: Wed Mar 11, 2015 2:11 am
by eFusion

Code: Select all

grep object_cache_file /usr/local/etc/nagios/nagios.cfg
object_cache_file=/var/spool/nagios/objects.cache

Re: Problem with nagios and ndoutils

Posted: Wed Mar 11, 2015 12:43 pm
by tgriep
Could you do the following and post the results back?

Code: Select all

ll /usr/local/etc/
ll /usr/local/etc/nagios/
tail -200 /var/log/mysqld.log

Re: Problem with nagios and ndoutils

Posted: Thu Mar 12, 2015 3:01 am
by eFusion

Code: Select all

[10:12:36 root@m /]# ls -lG /usr/local/etc/
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      27 Mar  5 16:33 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
[10:12:50 root@m /]# ls -lG /usr/local/etc/nagios
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
[10:13:11 root@m /]#
Mysql.log is empty

Re: Problem with nagios and ndoutils

Posted: Thu Mar 12, 2015 2:09 pm
by tgriep
Could you post your nagios.cfg and ndo2db.cfg file so we can review it?
Also run these commands in a shell and post back the results.

Code: Select all

grep nag /etc/group
grep nag /etc/passwd

Re: Problem with nagios and ndoutils

Posted: Fri Mar 13, 2015 5:20 am
by eFusion

Code: Select all

grep nag /etc/group
nagios:*:181:snmptt

grep nag /etc/passwd
nagios:*:181:181:Nagios pseudo-user:/var/spool/nagios:/usr/sbin/nologin
nagios.cfg

Code: Select all

cfg_file=/usr/local/etc/nagiosql/contacttemplates.cfg
cfg_file=/usr/local/etc/nagiosql/contactgroups.cfg
cfg_file=/usr/local/etc/nagiosql/contacts.cfg
cfg_file=/usr/local/etc/nagiosql/timeperiods.cfg
cfg_file=/usr/local/etc/nagiosql/commands.cfg
cfg_file=/usr/local/etc/nagiosql/hostgroups.cfg
cfg_file=/usr/local/etc/nagiosql/servicegroups.cfg
cfg_dir=/usr/local/etc/nagiosql/hosts
cfg_dir=/usr/local/etc/nagiosql/services
cfg_file=/usr/local/etc/nagiosql/hosttemplates.cfg
cfg_file=/usr/local/etc/nagiosql/servicetemplates.cfg
cfg_file=/usr/local/etc/nagiosql/servicedependencies.cfg
cfg_file=/usr/local/etc/nagiosql/serviceescalations.cfg
cfg_file=/usr/local/etc/nagiosql/hostdependencies.cfg
cfg_file=/usr/local/etc/nagiosql/hostescalations.cfg
cfg_file=/usr/local/etc/nagiosql/hostextinfo.cfg
cfg_file=/usr/local/etc/nagiosql/serviceextinfo.cfg

log_file=/var/spool/nagios/nagios.log
object_cache_file=/var/spool/nagios/objects.cache
resource_file=/usr/local/etc/nagios/resource.cfg
status_file=/var/spool/nagios/status.dat
nagios_user=nagios
nagios_group=nagios
check_external_commands=1
command_check_interval=-1
command_file=/var/spool/nagios/rw/nagios.cmd
###commented at 120104
#comment_file=/var/spool/nagios/comments.dat
#downtime_file=/var/spool/nagios/downtime.dat
lock_file=/var/spool/nagios/nagios.lock
temp_file=/var/spool/nagios/nagios.tmp
event_broker_options=-1
log_rotation_method=d
#log_archive_path=/var/spool/nagios/archives
#new nomenclature
log_archive_path=/var/spool/nagios/archivesnew
use_syslog=1
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_external_commands=1
log_passive_checks=1
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=60
max_concurrent_checks=0
service_reaper_frequency=20
auto_reschedule_checks=0
auto_rescheduling_interval=300
auto_rescheduling_window=180
sleep_time=0.25
service_check_timeout=30
host_check_timeout=35
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
retain_state_information=1
state_retention_file=/var/spool/nagios/retention.dat
retention_update_interval=60
use_retained_program_state=1
use_retained_scheduling_info=0
interval_length=60
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
obsess_over_services=0
check_for_orphaned_services=0
check_service_freshness=1
service_freshness_check_interval=60
check_host_freshness=0
host_freshness_check_interval=60
###commented at 120104
#aggregate_status_updates=1
status_update_interval=15
enable_flap_detection=0
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=euro
p1_file=/usr/local/bin/p1.pl
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
illegal_macro_output_chars=`~$&|'"<>
use_regexp_matching=0
use_true_regexp_matching=0
admin_email=root
admin_pager=pagenagios
daemon_dumps_core=0

#debug_level=-1
#debug_verbosity=2
#debug_file=/var/spool/nagios/nagios.debug
#max_debug_file_size=1000000

#use_timezone = Europe/Zaporozhye

broker_module=/usr/local/bin/ndomod-3x.o config_file=/usr/local/etc/nagios/ndomod.cfg
event_broker_options=-1
ndp2db.cfg

Code: Select all

lock_file=/usr/local/nagios/var/ndo2db.lock
ndo2db_user=nagios
ndo2db_group=nagios
socket_type=unix
#socket_type=tcp
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=ndo_nagios
db_prefix=nagios_
db_user=ndo
db_pass=********
max_timedevents_age=1440
max_systemcommands_age=10080
max_servicechecks_age=10080
max_hostchecks_age=10080
max_eventhandlers_age=44640
max_externalcommands_age=44640
max_notifications_age=44640
max_contactnotifications=44640
max_contactnotificationmethods=44640
max_logentries_age=129600
max_acknowledgements_age=44640
debug_level=2
debug_verbosity=2
debug_file=/usr/local/nagios/var/ndo2db.debug
max_debug_file_size=1000000

Re: Problem with nagios and ndoutils

Posted: Fri Mar 13, 2015 2:17 pm
by ssax
Please post the output of the following command:

Code: Select all

echo "select User from mysql.user" | mysql -uroot -pROOTPASS
Make sure to change ROOTPASS to whatever it is you used.

Re: Problem with nagios and ndoutils

Posted: Mon Mar 16, 2015 4:01 am
by eFusion

Code: Select all

mysql> select user from user;
+----------------+
| user           |
+----------------+
| root           |
| nagiosql_user  |
| ndo            |
| cacti          |
+----------------+