Page 1 of 1

PHP Notice: Undefined variable: err

Posted: Tue Dec 11, 2018 12:25 pm
by benhank
Hey guys
i
I happened to run

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
while doing an apply config. The apply config ran and completed quickly, however this was the results:

Code: Select all

CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php                                                                                                              --cmd=syncall
PHP Notice:  Undefined variable: err in /usr/local/nagiosxi/html/includes/compon                                                                                                             ents/nagiosbpi/api_tool.php on line 146
CMD: syncall
MSG: Could not get data for objects. NDO or Core may not be running.
OUTPUT=MSG: Could not get data for objects. NDO or Core may not be running.
Should I be concerned about this?
this is on my Nagios XI 5.5.7 server.

Re: PHP Notice: Undefined variable: err

Posted: Tue Dec 11, 2018 1:33 pm
by npolovenko
@benhank, What is the output of:
service nagios status
service ndo2db status
Also, please run: ps -ef > /tmp/support.txt and upload the support.txt file from the /tmp/ folder.

Re: PHP Notice: Undefined variable: err

Posted: Tue Dec 11, 2018 2:13 pm
by benhank
the results are a little disturbing....

Code: Select all

[root@lkennagiost01 ~]# service nagios status
>=D
[root@lkennagiost01 ~]# service ndo2db status
you're screwed bro...
[root@lkennagiost01 ~]#

nah jk here you go:

Code: Select all

[root@lkennagiost01 ~]# service nagios status
nagios (pid 8913) is running...
[root@lkennagiost01 ~]# service ndo2db status
ndo2db (pid 8821) is running...
[root@lkennagiost01 ~]#


Re: PHP Notice: Undefined variable: err

Posted: Tue Dec 11, 2018 4:09 pm
by npolovenko
@benhank, Can you upload this config file?
/usr/local/nagiosxi/html/includes/components/nagiosbpi/bpi.conf
[root@lkennagiost01 ~]# service ndo2db status
you're screwed bro...
:D

Re: PHP Notice: Undefined variable: err

Posted: Wed Dec 12, 2018 9:29 am
by benhank
here you go

Re: PHP Notice: Undefined variable: err

Posted: Wed Dec 12, 2018 11:37 am
by npolovenko
@benhank No, wrong file. I need to see the bpi.conf. It's in the same folder.

Re: PHP Notice: Undefined variable: err

Posted: Wed Dec 12, 2018 11:49 am
by benhank
WHOOPS! there you go

Re: PHP Notice: Undefined variable: err

Posted: Wed Dec 12, 2018 4:55 pm
by npolovenko
@benhank, I spoke to my colleagues and that PHP notice likely means that when you restarted the Core/applied configuration ndo hasn't gotten in sync with the BPI component(for a short period of time). This notice is normal and can be ignored.

Re: PHP Notice: Undefined variable: err

Posted: Thu Dec 13, 2018 10:24 am
by benhank
Awesome thanks for the all the help man!

Re: PHP Notice: Undefined variable: err

Posted: Thu Dec 13, 2018 1:41 pm
by npolovenko
@benhank, You're welcome!