Newbie wants to modify a monitoring wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
wyoder
Posts: 50
Joined: Mon Dec 29, 2014 3:21 pm
Location: Raleigh, NC
Contact:

Newbie wants to modify a monitoring wizard

Post by wyoder »

We are building a raft of new Linux hosts. We've scripted the remote installation of the linux-nrpe-agent.tar.gz package, so that it's easy to connect to these new nodes from our Nagios server.

To configure each new node, we use the 'Linux Server' monitoring wizard, which works pretty well, but we want to change some of its default settings, such as the acceptable number of processes. Currently, I have to manually change that setting and some others, one-by-one, for each new node. Is there an easy way to modify the default values used by that wizard?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Newbie wants to modify a monitoring wizard

Post by tmcdonald »

Which defaults specifically do you want to change? Our wizards use a sort of framework, so some things are configurable within the wizard but others take their settings from the framework.
Former Nagios employee
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Newbie wants to modify a monitoring wizard

Post by jdalrymple »

You can create your own custom wizard and import it if you're comfortable with some low-level web development bits:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

I would discourage changing the Linux Monitoring Wizard in place and rather creating your own wizard by downloading a copy and modifying it then importing your new one. Be sure when you modify your own that you uniquely identify it so that you don't overwrite the existing wizard.

http://exchange.nagios.org/directory/Ad ... rd/details
wyoder
Posts: 50
Joined: Mon Dec 29, 2014 3:21 pm
Location: Raleigh, NC
Contact:

Re: Newbie wants to modify a monitoring wizard

Post by wyoder »

Thanks for your comments and suggestions--download a wizard, copy, and modify the copy. I'll see if the "number of processes" setting is modifiable.

--Bill
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Newbie wants to modify a monitoring wizard

Post by jdalrymple »

I think what you want to change should be very trivial - if you've got good system backups it's probably even safe to modify it in place. Seek out the array "serviceargs_default" in the file linux-server.inc.php:

Code: Select all

           if (!is_array($serviceargs)) {
                $serviceargs_default = array(

                    "memory_warning" => 80,
                    "memory_critical" => 90,

                    "load_warning" => "15,10,5",
                    "load_critical" => "30,20,10",

                    "cpustats_warning" => 85,
                    "cpustats_critical" => 95,

                    "openfiles_warning" => 30,
                    "openfiles_critical" => 50,

                    "swap_warning" => 50,
                    "swap_critical" => 80,

                    "users_warning" => 5,
                    "users_critical" => 10,

                    "procs_warning" => 150,
                    "procs_critical" => 250,

                    "processstate" => array(),
                    "servicestate" => array(),
                    "counter" => array()
Change the 150 and/or 250 to values that fit your needs better. I tested this - it works fine.

If you have a test system verify that it works as expected in your environment. Also be aware it's likely that this value could get reverted back to its original state in an upgrade.

If this solves your issue - is it OK to lock this topic?

Thanks
wyoder
Posts: 50
Joined: Mon Dec 29, 2014 3:21 pm
Location: Raleigh, NC
Contact:

Re: Newbie wants to modify a monitoring wizard

Post by wyoder »

Yes, this response answers our questions.

Please close/lock at your convenience.

--Bill Yoder
Locked