Page 1 of 2

Monitoring engine, performance grapher DB backend wont start

Posted: Mon May 13, 2019 7:58 pm
by RLemana
I performed an offline build of Nagios xi however the Monitoring engine, Performance Grapher and DB back end wont start.

Any advice on where and what to check please? I have attached the Nagios profile, where can i find the install.log please ?

Any help would be much appreciated.

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Tue May 14, 2019 1:16 pm
by scottwilkerson
Can you show the following:

Code: Select all

chage -l nagios
tail -10 /var/log/cron
It sounds like your nagios user could be expired

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Tue May 14, 2019 5:12 pm
by RLemana
Thanks Scott, here are the results, however do yo think this may be related to my issue with httpd, crond, mysqld and ndo2db not starting?
Could the issues be related?

[root@caclasd05 ~]# chage -l nagios
Last password change : May 07, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1
[root@caclasd05 ~]# tail -10 /var/log/cron
May 15 10:09:01 caclasd05 CROND[40467]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1)
May 15 10:09:01 caclasd05 CROND[40468]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
May 15 10:09:01 caclasd05 CROND[40472]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2> &1)
May 15 10:09:01 caclasd05 CROND[40473]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1 )
May 15 10:09:01 caclasd05 CROND[40474]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
May 15 10:09:01 caclasd05 CROND[40478]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
May 15 10:09:01 caclasd05 CROND[40479]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1 )
May 15 10:09:01 caclasd05 CROND[40475]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
May 15 10:09:01 caclasd05 CROND[40480]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
May 15 10:09:01 caclasd05 CROND[40471]: (nagios) CMD (/usr/bin/php -q /usr/local /nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Wed May 15, 2019 6:43 am
by scottwilkerson
What do you get when you try to start httpd? Are their errors in the system log? Or httpd error_log?

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Wed May 15, 2019 12:59 pm
by RLemana
Thanks Scott, nothing happens when I run the sudo systemctl httpd start as root.

[root@caclasd02 ~]# sudo systemctl start httpd
[root@caclasd02 ~]#

Can you tell me which is the best command to use to start the service and should I be starting it as root?. Also which log is the best log to be looking at and where exactly might I find it please. I was granted sudo root access but sadly it didnt come with linux skills and knowledge :D .

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Wed May 15, 2019 1:20 pm
by scottwilkerson
RLemana wrote:Can you tell me which is the best command to use to start the service and should I be starting it as root?
that looks correct and yes as root.
RLemana wrote:Also which log is the best log to be looking at and where exactly might I find it please.
This depends on operating system, lets try these (only 1 will work)

Code: Select all

tail -20 /var/log/httpd/error_log
tail -20 /var/log/apache2/error.log
also, lets run

Code: Select all

systemctl status httpd
and show the output

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Wed May 15, 2019 4:35 pm
by RLemana
[root@caclasd02 /var/log/httpd]# tail -20 /var/log/httpd/error_log
[Wed May 15 20:20:13.700930 2019] [:error] [pid 80674] [client 10.96.14.28:50889] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:20:55.969307 2019] [:error] [pid 80340] [client 10.96.14.28:50917] PHP Notice: Undefined variable: id in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:21:45.816115 2019] [:error] [pid 77180] [client 10.96.14.28:50940] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:21:49.777892 2019] [:error] [pid 80340] [client 10.96.14.28:50939] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:22:05.518059 2019] [:error] [pid 75778] [client 10.96.14.28:50948] PHP Notice: Undefined variable: id in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:34:37.635842 2019] [:error] [pid 81976] [client 10.96.14.28:51279] PHP Notice: Undefined variable: id in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... /index.php
[Wed May 15 20:36:22.619966 2019] [:error] [pid 76099] [client 10.96.14.28:51330] PHP Notice: Undefined variable: id in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:36:53.379383 2019] [:error] [pid 80340] [client 10.96.14.28:51342] PHP Notice: Undefined variable: id in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... php?&tab=3
[Wed May 15 20:37:43.010930 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.011164 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.011371 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.011528 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.011680 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.011834 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.012475 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.012629 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.013417 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Object of class ADORecordSet_empty could not be converted to int in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:37:43.124002 2019] [:error] [pid 80674] [client 10.96.14.28:51358] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... =edit&id=1
[Wed May 15 20:41:41.131845 2019] [:error] [pid 98016] [client 10.171.27.132:63000] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/nagiosxi/html/dashboards/dashboard.php on line 0, referer: http://10.72.13.220/nagiosxi/dashboards/
[Wed May 15 20:59:46.870852 2019] [:error] [pid 104604] [client 10.96.14.28:51765] PHP Notice: Undefined variable: id in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://10.72.13.220/nagiosxi/includes/c ... /index.php

[root@caclasd02 /var/log/httpd]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-05-09 23:03:28 NZST; 6 days ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 57751 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Tasks: 13
Memory: 347.6M
CGroup: /system.slice/httpd.service
├─21971 /usr/sbin/httpd -DFOREGROUND
├─22356 /usr/sbin/httpd -DFOREGROUND
├─25854 /usr/sbin/httpd -DFOREGROUND
├─26811 /usr/sbin/httpd -DFOREGROUND
├─27186 /usr/sbin/httpd -DFOREGROUND
├─28316 /usr/sbin/httpd -DFOREGROUND
├─28671 /usr/sbin/httpd -DFOREGROUND
├─29111 /usr/sbin/httpd -DFOREGROUND
├─29533 /usr/sbin/httpd -DFOREGROUND
├─30018 /usr/sbin/httpd -DFOREGROUND
├─30604 /usr/sbin/httpd -DFOREGROUND
├─30962 /usr/sbin/httpd -DFOREGROUND
└─57751 /usr/sbin/httpd -DFOREGROUND

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Wed May 15, 2019 4:41 pm
by scottwilkerson
According to this httpd is running properly.

Let's go back to the beginning, what error are you getting?

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Wed May 15, 2019 5:51 pm
by RLemana
Hi Scott the sudo content you provided in my other issue has helped to get 3 of the 4 services started. The only service not starting now is the Monitoring engine and its only on one machine. All the other services are reporting as working. What can be checked to verify the status of the monitoring engine?.

Re: Monitoring engine, performance grapher DB backend wont s

Posted: Thu May 16, 2019 7:06 am
by scottwilkerson
Ok, on that server lets run the following:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Then if there are no errors run

Code: Select all

systemctl nagios start
If you get any errors report back, if it still doesn't show running after a few minutes send the results of the following

Code: Select all

tail -50 /usr/local/nagios/var/nagios.log