User Tools

Site Tools

  Main   About   Help   Download

Troubleshooting (FAQ)

Web interface

[KB1001] Host-presets don't update

Problem description
When modifying a host-preset, services and other things related to that preset are not updated. The same thing happens when changing the default parameters of a checkcommand: the parameters of services using that command are not updated.

Host-presets do two things:

  • define the host-alive-check
  • define the default services to be added to a host

While the host-alive-check is physically linked to the host over its preset, the services themselves are not linked to the preset. The host-preset only “suggests” possible services for a host. This is a one-time action when adding a new host. If a host-preset is modified later, the hosts which use the preset will not be updated (except for the host-alive-check). Only new hosts will be affected by the change. The same thing applies to default service parameters. These are predefined for each checkcommand and are set when a service is added. Modifying default parameters later on will not cause the services to be updated automatically.

If you want to define global values for multiple hosts, and want to be able to update these values any time, then use the host-template functionality instead (hint: host-presets were called host-templates prior to release 1.2.6).

[KB1002] Backslashes not handled properly (escaped)

Problem description
If you store a text value containing backslashes, the backslashes will be escaped every time you edit the same item:

original value: "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n
edited 1 time:  "***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n
edited 5 times: "***** Nagios *****\\\\\\n\\\\\\nNotification Type: $NOTIFICATIONTYPE$\\\\\\n

Make sure the option “magic_quotes_gpc” is set to “Off” in your php.ini (see NConf system requirements).

[KB1004] Submited infos are not allowed to be resent

Problem description
The following error may sometimes appear when you're submitting data (e.g. adding or modifying an item). The error is based on a feature which is intended to protect the application from users who unintentionally resubmit the same data.

Make sure the user account which is running your webserver has write access to the session-cache path specified in your php.ini (the “session.save_path” variable).

[KB1005] No notifications are sent by Nagios

Problem description
You have configured your hosts and services in NConf and then successfully generated and deployed your configuration to Nagios. Now, when a host or service goes “down”, you do not receive any notifications from Nagios.

In NConf, check the two parameters host_notification_options and service_notification_options defined in each of your “contact” items. Make sure none of the parameters is set to “n” (“n” = none).
Prior to NConf 1.2.6, the default value for these parameters used to contain the “n” option. Remove the “n” if you wish to receive notifications.

This problem has been fixed in NConf 1.3

Authentication and permissions

Generating the configuration

[KB3001] "Error accessing or executing Nagios binary"

Problem description
When you click “Generate Nagios config” you get an error saying “Error accessing or executing Nagios binary”.

Make sure you've set the NAGIOS_BIN constant properly under config/nconf.php. Make sure the path is pointing to the actual binary, not the folder the binary is in. Also make sure the permissions are set properly, and that you have no additional mechanisms preventing execution of the binary (such as SELinux). The binary must be accessed by the user that you webserver runs under (usually “apache” or “www-data”).

[KB3002] "Unable to write to check_result_path"

Problem description
When generating the Nagios configuration, you get an error saying (path may differ):

Error: Unable to write to check_result_path ('/var/nagios/spool/checkresults') - No such file or directory
Error: Unable to write to check_result_path ('/var/nagios/spool/checkresults') - Permission denied

As of Nagios 3.x, the results of the syntax check are cached to a temporary folder. This problem usually occurs if you are running NConf on a system where Nagios isn't installed. You might have copied the Nagios binary manually, and now the binary is trying to access a folder that does not exists. Or you might just have to enable write-access to the folder.

Create the missing folder (if not existing), make sure your webserver user has write-access to it.

[KB3003] Debugging "Error: ... on line x" messages

Problem description
When generating the Nagios configuration, the syntax check fails saying you have an error on line “x”:

Error: ... on line x

Next, you try to manually access the generated file(s), but they are nowhere to be found.

NConf generates the Nagios config to a temporary folder, then runs the syntax check, and if any problems occur, the temporary files are deleted, so that they are not rolled out accidentally.

If you want to access the temporary files for debugging purposes, do the following:

  • Enable debug mode by setting the DEBUG_MODE constant within your config/nconf.php file to '1'.
  • The next time you generate the config, NConf will write a file named NagiosConfig_FAILED.tgz to our nconf/output directory
  • Unpack the .tgz file and proceed to debug the generated config as necessary
  • Remember to disable debug mode and to clean up the output directory once you are done

[KB3004] "Generate Nagios config" hangs (100% CPU load)

Problem description
When you hit the “Generate Nagios config” button, the generate process runs indefinitely, raising the CPU load of your server to 100%, possibly even crashing the server.

The cause of this problem is a bug in the perl-API. With NConf 1.2.6, we introduced a new feature that allows users to use %…% style macros in any text fields within their configuration. The macros are replaced with the respective values when the configuration files for Nagios are generated.

A bug in the macro replacement function causes an endless loop. The bug is triggered every time a user places a string enclosed by two %-signs in any textfield (e.g. %MYSTRING%). Only the macros predefined by NConf are safe: NConf macros

This bug will be fixed in the next release. As a work-around, you may edit the following file:

'nconf/bin/lib/NConf/': comment out the “while” loop on line 160 and 172.

# while($string =~ /%\w+%/){

This problem has been fixed in NConf 1.3

[KB3005] "Deploying configuration: tty required error"

Problem description
When deploying the configuration, reload of Nagios using sudo fails with the following message:
sudo: sorry, you must have a tty to run sudo

The issue is most likely that sudo won't allow you to run the command without a tty (terminal).

According to what security allows, do one of the following:

  • Add a new rule to not make the tty required for the user. (e.g. user: apache)

Defaults:apache !requiretty

  • Or just delete (or comment out) the rule which defines the requiretty.

#Defaults    requiretty

[KB3006] "admins" contact group automatically added to all hosts/services

Problem description
The “admins” contactgroup is automatically added to all my hosts and services. Why? How do I get rid of it?

This is an optional feature of NConf to ensure that no hosts / services end up without belonging to at least the admins group. If you wish to change this behavior, change the SUPERADMIN_GROUPS array within the main NConf configuration file nconf/config/nconf.php

nconf/help/troubleshooting.txt · Last modified: 31.01.2012 15:01 by agargiulo