Nagiosql 3.2 Unable to restart nagios4.0+ solution

Source: Internet
Author: User

Since the recent upgrade of Nagios from the 3.X version to 4.0.7, suddenly found that nagiosql can not restart Naigos, check a lot of information is not able to solve, finally, finally found in a forum, just not easy ah.

Cause: Because the nagiosql restart message format is still 3.x, and the 4.x version of the Nagios restart command format has changed.

Workaround:

Modify the Nagiosql verify.php so that it $strcommandstring = "[". Mktime (). "] Restart_program; ". Mktime (); are updated to $strcommandstring = "[". Mktime (). "] Restart_program\n "; The information that is available for nagios feedback is: I has checked that. Nagios 4.0.0 have a command queue-this ist located by default:

/usr/local/nagios/var/rw/nagios.cmd

But the old nagiosql command does isn't work with Nagios 4.0.0. So-edit verify.php and modify line 345 from:

$strCommandString = "[". Mktime (). "] Restart_program; ". Mktime ();

To:

$strCommandString = "[". Mktime (). "] Restart_program\n ";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.