Nagios XI - Configure PHP Development Environment


Overview

If you are going to develop addons for Nagiox XI you will need your PHP environment configured to help you with this. This document describes some setting to help you configure your environment to extend Nagios XI with PHP.

 

 

Editing Files

In many steps of this article you will be required to edit files. This documentation will use the vi text editor. When using the vi
editor:

 

 

php.ini

When developing with PHP you will want to turn on some additional error reporting usually turned off. These changes need to be made to your php.ini file, to determine the location of this file execute the following command:

find /etc -name php.ini

If there are multiple results then the one in the apache directory is the one that needs changing.

 

Edit the file and make the following changes:

error_reporting = E_ALL
display_errors = On
ignore_repeated_errors = On

 

Once these changes are made you will have to restart apache for the changes to take effect using one of the commands below:

 

RHEL 7 | CentOS 7 | Oracle Linux 7

systemctl restart httpd.service

 

Debian | Ubuntu 16/18

systemctl restart apache2.service

 

You could also log php error to syslog and use Nagios Log server to monitor/capture your php errors.

 

 

Other PHP Resources

PHP php.ini documentation

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Article ID: 52
Created On: Mon, Feb 2, 2015 at 5:53 PM
Last Updated On: Tue, Feb 9, 2021 at 10:17 AM
Authored by: bdgoecke

Online URL: https://support.nagios.com/kb/article/nagios-xi-configure-php-development-environment-52.html