Nagios Business Process AddOns - Frequently Asked Questions (FAQ)

Installing

Question 1.1:
Why do I get the message "Nagios is not running on this machine at the moment"?
Question 1.2:
I get a completely white page. What's wrong?
Question 1.3:
The page "Business Process View" works, but "Busines Impact Analysis" does not. Why?
Question 1.4:
Some text elements are displayed very tiny when using the Business Process AddOns with Icinga classic web GUI. How can I get them bigger?

Running

Question 2.1:
How can I get statistics concerning my Business Processes?
How can I get alerts, if a whole Business Process is in WARNING or CRITICAL state?
Question 2.2:
My Business Process has status "unknown". Why?
Question 2.3:
Performance Tuning: I want to run this AddOn with minimal configuration of NDO. What is the right value for event_broker_options or data_processing_options?
Question 2.4:
Where are my processes?
I did define multiple business processes in a hierarchy. The names and descriptions of the top level processes are displayed in the start page, but these of the sub level processes are never displayed.
Question 2.5:
My new process does not work!
I just did define some new services in Nagios and with them a new Business Process. But this one does not work - even nagios-bp-consistency-check.pl complains. All other Business Processes work! What's wrong?
Question 2.6:
Error Message: Formula is mixing up different operators. This is not defined.
I did define a Business Process like
loadbalancers_HTTP = srv1;HTTP | srv2;HTTP | srv3;HTTP & clusterip;PING
This does not work. nagios-bp-consistency-check.pl gives the error message above. But I need formulas with different operators!
Question 2.7:
Most of the components in my Business Process are in the state CRITICAL, but the state of the Business Process is OK. I would expect at least a WARNING
Question 2.8:
I want to define a Business Process with two services. If both of them are WARNING, the Busines Process should be CRITICAL. Which formula to use?


Answers

Installing

Question 1.1:
Why do I get the message "Nagios is not running on this machine at the moment"?

Answer: The AddOn uses the command defined in Nagios' cgi.cfg under nagios_check_command to see, if Nagios is running. Make sure You did define a command which indicates the status of Nagios and return 0 if everything is ok. Make sure the user Your webserver is running with is allowed to execute this command and is able to find the binary in its path or You gave a full qualified path of the command.
Question 1.2:
I get a completely white page if I click the link for Nagios Business Process AddOn. What's wrong?

Answer: This can have different reasons.
Make sure Perl and the Perl-Modul CGI::Simple are installed. Also see the other requirements named in INSTALL.
Make sure the Business Process AddOn can find all its perl modules. (see INSTALL)
There is a script to check if the connection to NDO is ok, please execute
  bin/nagios-bp-check-ndo-connection.pl
Run it under the user Your webserver runs with. On success it prints out a list of all the services Your NDO knows together with status information and the last plugin output.
On error You should get an error message that probably will be very helpful for locating the problem.
Next thing is to try to execute the cgi on a shell:
Change to the sbin directory located in Your install directory and type
  ./nagios-bp.cgi
This should normally print out some HTML code, but if something does not work some error message. This message can help You to find the error.
If all this is correct and You still get the white page, look at the error message in Your webserver's error log.
If You have problems interpreting a error message, post it to the users mailinglist.
Question 1.3:
The page "Business Process View" works, but "Business Impact" does not. Why?

Answer: The most common reason is: Business Impact Analysis uses HTTP sessions. The session information is stored in a directory. Look at:
  etc/settings.cfg
and find the line defining NAGIOSBP_VAR. In the directory named there, You should find a directory called nagios_bp.sessions
Make sure that this directory is writeable for the user Your webserver is running under.
Question 1.4:
Some text elements are displayed very tiny when using the Business Process AddOns with Icinga classic web GUI. How can I get them bigger?

Answer: As Nagios Business Process AddOns use the stylesheets of Nagios or Icinga the web GUI has the look and feel of Nagios when installed with Nagios and the look and feel of Icinga when installed with Icinga. In very little details they differ.
So when using Icinga with the classic web GUI it is recommended to insert the following line
#nbp_foot_version, #nbp_foot_language, .nbp_text_small, .nbp_text_tiny { font-size:100%; }
into
share/stylesheets/user.css

[Back to the top]

Running

Question 2.1:
How can I get statistics concerning my Business Processes?
How can I get alerts, if a whole Business Process is in WARNING or CRITICAL state?

Answer: see README section "Business Process representation as Nagios services"
If You completed this steps, every Business Process is represented as a Nagios service. With this You can do everything, what You can do with a normal Nagios service, e. g. get all the statistics and reports, do alerts, ...
Question 2.2:
My Business Process has status "unknown". Why?

Answer: In most cases there are errors in nagios-bp.conf (typing mistakes, syntax errors)
There is a script that can help You find the most common errors. Run:
  bin/nagios-bp-consistency-check.pl
If Your nagios-bp.conf file is not in the default path or has another name, give its name as argument
  bin/nagios-bp-consistency-check.pl <file>
If this script returns ok, You should check if the connection to Your NDO is ok by using nagios-bp-check-ndo-connection.pl, see Question 1.2.
Next thing is to check if Nagios writes actual information into NDO.

If using with a NDO database:
Especially check with a SQL client, if the tables objects, servicestatus and hoststatus get actual entries.
Also make sure, all the parameters in etc/ndo_db_readonly.cfg (versions up to 0.9.2) or etc/ndo.cfg (versions 0.9.3 and higher) are correct and You can - using a SQL client - connect to the database with the username and password from this file. Also check if the user can do SELECT on the Nagios tables.

If using with ndo2fs:
Check if the parameters You did enter in etc/ndo.cfg are correct. Especially see the parameter ndofs_basedir there.
Look if this directory has subdirectory VOLATILE/<instance>/HOSTS/. This directory should have subdirectories for all Your hosts and they again should have a subdirectory for each service. If not, Your setup of ndo2fs is not correct or ndo2fs is writing information to a different directory.
Make sure the user Your webserver is running under is able to read everything in ndofs_basedir and all it's subdirectories.
Question 2.3:
Performance Tuning: I want to run this AddOn with minimal configuration of NDO. What is the right value for event_broker_options or data_processing_options?

Answer: The value is 1 + 4096 + 8192 + 262144 + 2097152 = 2371585 (NDOMOD_PROCESS_PROCESS_DATA + NDOMOD_PROCESS_HOST_STATUS_DATA + NDOMOD_PROCESS_SERVICE_STATUS_DATA + NDOMOD_PROCESS_OBJECT_CONFIG_DATA + NDOMOD_PROCESS_RETENTION_DATA)
You can set it as event_broker_options in nagios.cfg, than it is used for all Your event brokers
or as data_processing_options in ndomod.cfg, if You want to use it only for NDO
(Mark Eisenblaetter - mark.eisenblaetter(at)gmail.com)
Question 2.4:
Where are my processes?
I did define multiple business processes in a hierarchy. The names and descriptions of the top level processes are displayed in the start page, but these of the sub level processes are never displayed.

Answer: Try klicking the little tree icon near Your process.
Question 2.5:
My new process does not work!
I just did define some new services in Nagios and with them a new Business Process. But this one does not work - even nagios-bp-consistency-check.pl complains. All other Business Processes work! What's wrong?

Answer: The behavior of nagios-bp-consistency-check.pl has changed in version 0.9.2: It now takes it's status information from NDO. This means You must give Nagios the chance to write this information into NDO.
If You did define a host or service in Nagios, than You have to reload Nagios, wait a minute and after this, You can use it in a Business Process.
Question 2.6:
Error Message: Formula is mixing up different operators. This is not defined.
I did define a Business Process like
loadbalancers_HTTP = srv1;HTTP | srv2;HTTP | srv3;HTTP & clusterip;PING
This does not work. nagios-bp-consistency-check.pl gives the error message above. But I need formulas with different operators!

Answer: You are right, that does not work! But: It works as designed and as described in the documentation.
This has a simple reason: How should the software know, if You did mean
loadbalancers_HTTP = (srv1;HTTP | srv2;HTTP | srv3;HTTP) & clusterip;PING
or e. g.
loadbalancers_HTTP = srv1;HTTP | srv2;HTTP | (srv3;HTTP & clusterip;PING)
For this reason formulas mixing up different operators are not defined. Brackets are'nt also. Assuming the first of both lines above is what You did mean, You should instead define:
servers_HTTP = srv1;HTTP | srv2;HTTP | srv3;HTTP
loadbalancers_HTTP = servers_HTTP & clusterip;PING
This means You simply split it up into two formulas and You have what You did want!
Question 2.7:
Most of the components in my Business Process are in the state CRITICAL, but the state of the Business Process is OK. I would expect at least a WARNING

Answer: It depends on how You did define Your Business Process. Probably it works as designed!
For example if You defined:
dns_service = srv1;DNS | srv2;DNS | srv3;DNS | srv4;DNS
and 3 of Your DNS services are CRITICAL, one is OK than the Business Process is still OK, because You did define it this way. (The formula above just says: If at least one of them is working, the whole application is working. So OK is the correct result. See README)
If this is not what You would like, You should have a look at check_cluster. This plugin comes with the official Nagios Plugins and with it You can setup a cluster service which e. g. turns to WARNING if at least two of Your DNS services are in a non OK state.
Of course You can integrate this cluster check (for our example we call it "DNS Cluster Check") into Your Business Process:
dns_servers = srv1;DNS | srv2;DNS | srv3;DNS | srv4;DNS
dns_service = dns_servers & service_cluster;DNS Cluster Check
Now Your Business Process dns_service turns to WARNING if at least two of Your DNS Servers fail and to CRITICAL if all of them fail.

Another example is You have 4 Application Servers. You know You must have at least two of them running because of load. In this case a formula like
<bp_name> = <min_num> of: <host>;<service> + <host>;<service> [+ <host>;<service>]+
would be the right one for You. See README for details.
Question 2.8:
I want to define a Business Process with two services. If both of them are WARNING, the Busines Process should be CRITICAL. Which formula to use?

Answer: This is a feature Nagios itself already has. Use check_cluster for this. Of course You can use a service defined with check_cluster in a Business Process too.
(You might want to have a look at Question 2.7 too.)

[Back to the top]


Thanks to Björn Becker (Bjoern.Becker(at)berendsen.de)
for gathering information for this FAQ

This project is powered by Apache and Nagios and hosted by netways.de

This page was last updated
Saturday 03.01.2015, 22:06 CET