Page 1 of 1

Newbie wants to modify a monitoring wizard

Posted: Wed Mar 04, 2015 8:05 am
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?

Re: Newbie wants to modify a monitoring wizard

Posted: Wed Mar 04, 2015 10:14 am
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.

Re: Newbie wants to modify a monitoring wizard

Posted: Wed Mar 04, 2015 10:19 am
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

Re: Newbie wants to modify a monitoring wizard

Posted: Mon Mar 09, 2015 8:30 am
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

Re: Newbie wants to modify a monitoring wizard

Posted: Mon Mar 09, 2015 9:06 am
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

Re: Newbie wants to modify a monitoring wizard

Posted: Tue May 31, 2016 7:58 am
by wyoder
Yes, this response answers our questions.

Please close/lock at your convenience.

--Bill Yoder