Nagios CCM not accessible after changing mysql datadir
Nagios CCM not accessible after changing mysql datadir
Nagios XI Enterprise: 5.7.3
RHEL 7.3
Tried changing the data directory from /var/lib/mysql to another mount point.
Mariadb starts up fine and can log in into XI.
However the CCM screens is blank. There is no error message anywhere.
Please advice where to check and if I missed out any steps. Monitoring engine Process state was red.
I have reverted back now and it is working fine again.
RHEL 7.3
Tried changing the data directory from /var/lib/mysql to another mount point.
Mariadb starts up fine and can log in into XI.
However the CCM screens is blank. There is no error message anywhere.
Please advice where to check and if I missed out any steps. Monitoring engine Process state was red.
I have reverted back now and it is working fine again.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: Nagios CCM not accessible after changing mysql datadir
(From your previous posts I'm assuming you're using RHEL.)
If you just edited the datadir and socket keys in /etc/my.cnf, it'll break your configuration. Unless you edit a third file, PHP won't know how to connect to the database thru the socket.
You have to also edit /etc/my.cnf.d/client.cnf to add a socket= line under [client]. E.g.:
You can test this on the command line:
If you just edited the datadir and socket keys in /etc/my.cnf, it'll break your configuration. Unless you edit a third file, PHP won't know how to connect to the database thru the socket.
You have to also edit /etc/my.cnf.d/client.cnf to add a socket= line under [client]. E.g.:
Code: Select all
[client]
socket=/path/to/new/datadir/mysql.sockCode: Select all
$ mysql -unagiosql -pn@gweb -e 'select count(*) from information_schema.tables'If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: Nagios CCM not accessible after changing mysql datadir
Thanks. Will try this out.dchurch wrote:(From your previous posts I'm assuming you're using RHEL.)
If you just edited the datadir and socket keys in /etc/my.cnf, it'll break your configuration. Unless you edit a third file, PHP won't know how to connect to the database thru the socket.
You have to also edit /etc/my.cnf.d/client.cnf to add a socket= line under [client]. E.g.:
You can test this on the command line:Code: Select all
[client] socket=/path/to/new/datadir/mysql.sockCode: Select all
$ mysql -unagiosql -pn@gweb -e 'select count(*) from information_schema.tables'
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: Nagios CCM not accessible after changing mysql datadir
Same problem. RHEL 7.3. SELinux not running. MariaDBdchurch wrote:(From your previous posts I'm assuming you're using RHEL.)
If you just edited the datadir and socket keys in /etc/my.cnf, it'll break your configuration. Unless you edit a third file, PHP won't know how to connect to the database thru the socket.
You have to also edit /etc/my.cnf.d/client.cnf to add a socket= line under [client]. E.g.:
You can test this on the command line:Code: Select all
[client] socket=/path/to/new/datadir/mysql.sockCode: Select all
$ mysql -unagiosql -pn@gweb -e 'select count(*) from information_schema.tables'
All the checks is fine, just CCM is blank and monitoring engine process state is red.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: Nagios CCM not accessible after changing mysql datadir
Double-check that your user/password is proper in your /usr/local/nagiosxi/html/config.inc.php for the nagiosql table, that's where the CCM data lives.
You can test with this command with those credentials:
If you run this command as root and leave it running:
Then go back to the CCM to replicate the issue, do you see anything in the output from the still running tail command above? If so, please send it to us.
What process did you take to do it? Did you stop mariadb, move the data, change /etc/my.cnf, and start the service? Attach your /etc/my.cnf and the output from this command:
Additionally, since you changed that location you'll need to update the /usr/local/nagiosxi/scripts/repairmysql.sh and change these lines to match what you're using so the repair_databases.sh script works properly:
EDIT: PM me a copy of your profile as well.
You can test with this command with those credentials:
Code: Select all
mysql -h 127.0.0.1 -unagiosql -p'n@gweb' nagiosql -e "select * from tbl_host limit 1;"Code: Select all
tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_logWhat process did you take to do it? Did you stop mariadb, move the data, change /etc/my.cnf, and start the service? Attach your /etc/my.cnf and the output from this command:
Code: Select all
ls -la /path/to/your/new/data/dirCode: Select all
rm -f /var/lib/mysql/mysql.sock
dest="/var/lib/mysql/$db"
Re: Nagios CCM not accessible after changing mysql datadir
Sorry for the delay. I had to recreate a new env in Dev to test this. Same issue.
/var/log/httpd/error_log is showing it is using the old data dir. See below. /var/lib/mysql has been renamed to /var/lib/mysql.bak
my.cnf & my.cnf.d/client.cnf
The SQL test requested. It works fine
Datadir listing
This works in all my other instances but not in the moved data dir
[nagios@myucburhel74 ~]$ mysql --user=root --password=nagiosxi --host=localhost
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Please advice how to fix this issue. Only CCM is blank.
/var/log/httpd/error_log is showing it is using the old data dir. See below. /var/lib/mysql has been renamed to /var/lib/mysql.bak
my.cnf & my.cnf.d/client.cnf
Code: Select all
[nagios@myucburhel74 ~]$ cat /etc/my.cnf
[mysqld]
query_cache_size=16M
query_cache_limit=4M
tmp_table_size=64M
max_heap_table_size=64M
key_buffer_size=32M
table_open_cache=32
innodb_file_per_table=1
datadir=/nagiosdb/mysql
socket=/nagiosdb/mysql/mysql.sock
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
[client]
port=3306
socket=/nagiosdb/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
#symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[nagios@myucburhel74 ~]$ cat /etc/my.cnf.d/client.cnf
#
# These two groups are read by the client library
# Use it for options that affect all clients, but not the server
#
[client]
socket=/nagiosdb/mysql/mysql.sock
# This group is not read by mysql client library,
# If you use the same .cnf file for MySQL and MariaDB,
# use it for MariaDB-only client options
[client-mariadb]
[nagios@myucburhel74 ~]$
Code: Select all
mysql -h 127.0.0.1 -unagiosql -p'n@gweb' nagiosql -e "select * from tbl_host limit 1;"
+----+-----------+-----------+--------------+-----------+---------+--------------------+------------+-----------------------+---------------+--------------+-------------------------+---------------+--------------------+----------------+----------------+-----------------------+------------------------+--------------+------------------+-----------------+---------------------+---------------+-----------------------+--------------------+---------------------+------------------------+------------------------+-------------------+---------------------------+------------------------------+----------+---------------------+----------------+---------------------------+-----------------------+---------------------+--------------------------+----------------------+-----------------------+------------------+-------+-----------+------------+------------+----------------+------------+-----------------+-----------+-----------+---------------+------+--------+---------------------+---------------+-----------+
| id | host_name | alias | display_name | address | parents | parents_tploptions | hostgroups | hostgroups_tploptions | check_command | use_template | use_template_tploptions | initial_state | max_check_attempts | check_interval | retry_interval | active_checks_enabled | passive_checks_enabled | check_period | obsess_over_host | check_freshness | freshness_threshold | event_handler | event_handler_enabled | low_flap_threshold | high_flap_threshold | flap_detection_enabled | flap_detection_options | process_perf_data | retain_status_information | retain_nonstatus_information | contacts | contacts_tploptions | contact_groups | contact_groups_tploptions | notification_interval | notification_period | first_notification_delay | notification_options | notifications_enabled | stalking_options | notes | notes_url | action_url | icon_image | icon_image_alt | vrml_image | statusmap_image | 2d_coords | 3d_coords | use_variables | name | active | last_modified | access_rights | config_id |
+----+-----------+-----------+--------------+-----------+---------+--------------------+------------+-----------------------+---------------+--------------+-------------------------+---------------+--------------------+----------------+----------------+-----------------------+------------------------+--------------+------------------+-----------------+---------------------+---------------+-----------------------+--------------------+---------------------+------------------------+------------------------+-------------------+---------------------------+------------------------------+----------+---------------------+----------------+---------------------------+-----------------------+---------------------+--------------------------+----------------------+-----------------------+------------------+-------+-----------+------------+------------+----------------+------------+-----------------+-----------+-----------+---------------+------+--------+---------------------+---------------+-----------+
| 1 | localhost | localhost | | 127.0.0.1 | 0 | 2 | 0 | 2 | NULL | 1 | 2 | | NULL | NULL | NULL | 2 | 2 | 0 | 2 | 2 | NULL | 0 | 2 | NULL | NULL | 2 | | 2 | 2 | 2 | 0 | 2 | 0 | 2 | NULL | 0 | NULL | | 2 | | | | | | | | | | | 0 | | 1 | 2020-04-17 20:07:33 | NULL | 1 |
+----+-----------+-----------+--------------+-----------+---------+--------------------+------------+-----------------------+---------------+--------------+-------------------------+---------------+--------------------+----------------+----------------+-----------------------+------------------------+--------------+------------------+-----------------+---------------------+---------------+-----------------------+--------------------+---------------------+------------------------+------------------------+-------------------+---------------------------+------------------------------+----------+---------------------+----------------+---------------------------+-----------------------+---------------------+--------------------------+----------------------+-----------------------+------------------+-------+-----------+------------+------------+----------------+------------+-----------------+-----------+-----------+---------------+------+--------+---------------------+---------------+-----------+
[nagios@myucburhel74 my.cnf.d]$
Code: Select all
[nagios@myucburhel74 ~]$ ls -la /nagiosdb/mysql
total 28744
drwxr-xr-x 8 mysql mysql 4096 Nov 18 18:26 .
drwxr-xr-x 3 root root 4096 Nov 18 17:54 ..
-rw-rw---- 1 mysql mysql 16384 Nov 18 18:08 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 Nov 18 18:08 aria_log_control
-rw-rw---- 1 mysql mysql 18874368 Nov 18 18:42 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Nov 18 18:42 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Nov 18 18:30 ib_logfile1
drwx------ 2 mysql mysql 4096 Apr 17 2020 mysql
srwxrwxrwx 1 mysql mysql 0 Nov 18 18:26 mysql.sock
drwx------ 2 mysql mysql 12288 Nov 18 18:30 nagios
drwx------ 2 mysql mysql 16384 Nov 18 18:30 nagiosql
drwx------ 2 mysql mysql 4096 Nov 18 18:30 nagiosxi
drwx------ 2 mysql mysql 4096 Apr 17 2020 performance_schema
drwx------ 2 mysql mysql 4096 Apr 17 2020 test
Code: Select all
[nagios@myucburhel74 my.cnf.d]$ mysql -unagiosql -pn@gweb -e 'select count(*) from information_schema.tables'
+----------+
| count(*) |
+----------+
| 157 |
+----------+
[nagios@myucburhel74 my.cnf.d]$
[nagios@myucburhel74 ~]$ mysql --user=root --password=nagiosxi --host=localhost
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Code: Select all
[nagios@myucburhel74 ~]$ tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log
==> /var/log/httpd/error_log <==
==> /var/log/httpd/ssl_error_log <==
==> /var/log/httpd/error_log <==
[Wed Nov 18 18:40:12.399219 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '[b]/var/lib/mysql/mysql.sock[/b]' (2) in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 82, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.399295 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 86, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.406213 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 87, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.406256 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.406282 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.406299 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.406319 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.407635 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.407671 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.408540 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 103, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.408569 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Warning: DB::query(): Property access is not allowed yet in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 105, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.408579 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Notice: Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 116, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 18 18:40:12.408586 2020] [:error] [pid 9039] [client 10.17.44.253:51046] PHP Fatal error: Call to a member function free() on a non-object in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 121, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: Nagios CCM not accessible after changing mysql datadir
This looks like the issue as you saw:
Your conf files look proper, I had to add the socket under the /etc/my.cnf.d/client.cfg [client] section to get mine working but I had to restart some services after. Please run these commands and see if it works:
Code: Select all
[Wed Nov 18 18:32:48.107145 2020] [:error] [pid 9098] [client X.X.X.X:50883] PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 82, referer: http://X.X.X.X/nagiosxi/includes/components/ccm/xi-index.phpCode: Select all
systemctl restart mariadb
systemctl restart httpd
systemctl restart ndo2db
Re: Nagios CCM not accessible after changing mysql datadir
Same problem. I even rebooted the machine.ssax wrote:This looks like the issue as you saw:
Your conf files look proper, I had to add the socket under the /etc/my.cnf.d/client.cfg [client] section to get mine working but I had to restart some services after. Please run these commands and see if it works:Code: Select all
[Wed Nov 18 18:32:48.107145 2020] [:error] [pid 9098] [client X.X.X.X:50883] PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 82, referer: http://X.X.X.X/nagiosxi/includes/components/ccm/xi-index.php
Code: Select all
systemctl restart mariadb systemctl restart httpd systemctl restart ndo2db
Why is Nagios XI going to the old sqldb directory when it has been changed?
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: Nagios CCM not accessible after changing mysql datadir
Ah, there is a hidden setting that's not in there by default:
Please add this to your /usr/local/nagios/etc/ndo2db.cfg:
Then restart the services:
Please add this to your /usr/local/nagios/etc/ndo2db.cfg:
Code: Select all
db_socket=/nagiosdb/mysql/mysql.sockCode: Select all
systemctl restart ndo2db
systemctl restart nagiosRe: Nagios CCM not accessible after changing mysql datadir
Same problemssax wrote:Ah, there is a hidden setting that's not in there by default:
Please add this to your /usr/local/nagios/etc/ndo2db.cfg:
Then restart the services:Code: Select all
db_socket=/nagiosdb/mysql/mysql.sock
Code: Select all
systemctl restart ndo2db systemctl restart nagios
Code: Select all
[nagios@myucburhel74 debug]$ tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log
==> /var/log/httpd/error_log <==
==> /var/log/httpd/ssl_error_log <==
==> /var/log/httpd/error_log <==
[Fri Nov 20 11:14:13.554956 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 82, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.555128 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 86, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.555178 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 87, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.555233 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.555304 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.555350 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.555378 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.558076 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.558219 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 362, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.560209 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 103, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.560306 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Warning: DB::query(): Property access is not allowed yet in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 105, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.560327 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Notice: Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 116, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
[Fri Nov 20 11:14:13.560345 2020] [:error] [pid 2173] [client 10.17.44.253:56816] PHP Fatal error: Call to a member function free() on a non-object in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 121, referer: http://10.104.28.124/nagiosxi/includes/components/ccm/xi-index.php
Code: Select all
[nagios@myucburhel74 debug]$ 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=localhost
db_port=3306
db_socket=/nagiosdb/mysql/mysql.sock
db_name=nagios
db_prefix=nagios_
db_user=ndoutils
db_pass=n@gweb
## 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=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
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation