Page 1 of 1

Error: api_tool.php on line 138

Posted: Thu Dec 06, 2018 3:36 am
by morabanc
Hi guys,

Our Nagios has a full disk and the cause is this log file:

- /usr/local/nagiosxi/var/cmdsubsys.log

The information of that file is:

- PHP Warning: Illegal string offset 'is_currently_running' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php on line 138

Script line 138:

Code: Select all

        // Verify ndo and core are running and loaded
        $data = get_program_status_xml_output(array(), true);
        if ($data['is_currently_running'] == 1) {
            $is_running = true;
        } else {
            sleep(1);
        }
Can you help us please ?


Thanks

Re: Error: api_tool.php on line 138

Posted: Thu Dec 06, 2018 5:34 am
by morabanc
I solve the problem restarting all services amd reconfigure nagios.

but now i have another problem, i don't know why my nagiosql.tbl_lnkServiceToServicetemplate was erased.

For this reason i can't specify templates in my services.

I try to create manually the table (create table... and with mysqldump) but don't work.

Code: Select all

ERROR 1146 (42S02) at line 1: Table 'nagiosql.tbl_lnkServiceToServicetemplate' doesn't exist
Any idea ?

Thanks

Re: Error: api_tool.php on line 138

Posted: Thu Dec 06, 2018 11:48 am
by scottwilkerson
Do you have a recent backup you can restore?

If not, that database is also restored if you can restore a previous snapshot
CCM -> Configuration Snapshots

Re: Error: api_tool.php on line 138

Posted: Fri Dec 07, 2018 2:38 am
by morabanc
Hi Scott,

Nice help !! :)


Regards

Re: Error: api_tool.php on line 138

Posted: Fri Dec 07, 2018 8:12 am
by scottwilkerson
morabanc wrote:Hi Scott,

Nice help !! :)


Regards
May we mark this issue as resolved?