Unconfigured Objects - automation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
harshalx
Posts: 8
Joined: Mon May 29, 2017 4:37 am

Unconfigured Objects - automation

Post by harshalx »

Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =6&t=45612

In the future, please create a new thread and link to the old one instead of adding on.


Did this feature ever get added to XI ?

I'm into a situation where we have federated monitoring in place where Nagios Core does the monitoring part and passes the passive check results to XI, which works like an aggregator and alerting tool for us.

We have an infrastructure of 100s of pods which pass check information to a central Nagios XI host. Each pod could have 200-300 hosts within it. I really cannot add each individual device manually by clicking the checkbox and then configure. Nor does the bulk "Hosts" checkbox at the top help when the unconfigured onjects run into 500+ devices.

Can I please request the following.

1. I see the entire concept of unconfigured objects a bit silly. This should be completely removed and the check results should be shown directly as normally configured objects.

2. If (1) cannot be done, then XI should provide a "Select All" checkbox which selects all the unconfigured objects and adds them in one go. This should have no limits to the # of objects that exist in that list.

3. Provide a rest url which takes in a single bulk request like http://nagiosxi/configure_objects?obj=all and configures all the objects in one go as normal objects.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unconfigured Objects - automation

Post by lmiltchev »

1. I see the entire concept of unconfigured objects a bit silly. This should be completely removed and the check results should be shown directly as normally configured objects.
In Nagios XI 5.5, we are adding the ability to auto-monitor unconfigured objects (passive checks) that arrive (TASK ID 2231). XI 5.5 should be released sometime in December, even though this is not "set in stone" - I don't have an exact ETA.
2. If (1) cannot be done, then XI should provide a "Select All" checkbox which selects all the unconfigured objects and adds them in one go. This should have no limits to the # of objects that exist in that list.
You can select the check-box on the top in order to select ALL objects. Then you can click on the "Configure" button, and add them with "one go".

Example:
example01.PNG
3. Provide a rest url which takes in a single bulk request like http://nagiosxi/configure_objects?obj=all and configures all the objects in one go as normal objects.
Can you elaborate on this? Give us some examples. Thank you!
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
harshalx
Posts: 8
Joined: Mon May 29, 2017 4:37 am

Re: Unconfigured Objects - automation

Post by harshalx »

You can select the check-box on the top in order to select ALL objects. Then you can click on the "Configure" button, and add them with "one go".
You have selected just 3 unconfigured objects in the example snapshot. Please select 500 objects and try to hit the "Configure" button. It will fail.
kyang

Re: Unconfigured Objects - automation

Post by kyang »

When you click configure, what's the error? Or does it just says a generic output of "fail"

If you selected a few at a time, would it work in general? Instead of all 500?
harshalx
Posts: 8
Joined: Mon May 29, 2017 4:37 am

Re: Unconfigured Objects - automation

Post by harshalx »

If I select few at a time it will work, but if you select 500+ here is what you get :
unconfobj1.png
I have already increased the /etc/php.ini limit to 100,000.
You do not have the required permissions to view the files attached to this post.
kyang

Re: Unconfigured Objects - automation

Post by kyang »

Did you restart apache after you edited that value in the /etc/php.ini file?

Code: Select all

service httpd restart
harshalx
Posts: 8
Joined: Mon May 29, 2017 4:37 am

Re: Unconfigured Objects - automation

Post by harshalx »

Of course. That goes without question.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unconfigured Objects - automation

Post by tmcdonald »

harshalx wrote:Of course. That goes without question.
There are very few things that go without question when you are trying to troubleshoot a problem. Making assumptions is the easiest way to miss a potential solution.

If you have set the limit to 100,000 and are trying to throw in 500 objects, then that is 200 bytes per object which could very well be too much. I did some testing, and came up with these rough numbers for overhead:
  • Host: ~150 bytes + (2 * length of host name)
  • Service: ~160 bytes + length of host name + length of service description
  • Total per single host with single service: ~310 + (3 * length of host name) + length of service description
I came to these numbers by adding in some PHP print_r() calls to the wizard during the final stage. print_r() will take whatever you pass it and print it to the terminal/screen in a friendly debug format, so I passed in the array of variables built up from the unconfigured objects list. It looks like this:

Code: Select all

Array
(
    [0] => Array
        (
            [type] => 1
            [use] => xiwizard_passive_host
            [host_name] => somehost4
            [address] => somehost4
            [icon_image] => passiveobject.png
            [statusmap_image] => passiveobject.png
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [1] => Array
        (
            [type] => 2
            [host_name] => somehost4
            [service_description] => someservice4
            [use] => xiwizard_passive_service
            [check_interval] => 1
            [retry_interval] => 1
            [max_check_attempts] => 1
            [is_volatile] => 0
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [2] => Array
        (
            [type] => 1
            [use] => xiwizard_passive_host
            [host_name] => somehost5
            [address] => somehost5
            [icon_image] => passiveobject.png
            [statusmap_image] => passiveobject.png
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [3] => Array
        (
            [type] => 2
            [host_name] => somehost5
            [service_description] => someservice5
            [use] => xiwizard_passive_service
            [check_interval] => 1
            [retry_interval] => 1
            [max_check_attempts] => 1
            [is_volatile] => 0
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [4] => Array
        (
            [type] => 1
            [use] => xiwizard_passive_host
            [host_name] => somehost2
            [address] => somehost2
            [icon_image] => passiveobject.png
            [statusmap_image] => passiveobject.png
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [5] => Array
        (
            [type] => 2
            [host_name] => somehost2
            [service_description] => someservice2
            [use] => xiwizard_passive_service
            [check_interval] => 1
            [retry_interval] => 1
            [max_check_attempts] => 1
            [is_volatile] => 0
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [6] => Array
        (
            [type] => 1
            [use] => xiwizard_passive_host
            [host_name] => somehost3
            [address] => somehost3
            [icon_image] => passiveobject.png
            [statusmap_image] => passiveobject.png
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [7] => Array
        (
            [type] => 2
            [host_name] => somehost3
            [service_description] => someservice3
            [use] => xiwizard_passive_service
            [check_interval] => 1
            [retry_interval] => 1
            [max_check_attempts] => 1
            [is_volatile] => 0
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [8] => Array
        (
            [type] => 1
            [use] => xiwizard_passive_host
            [host_name] => somehost
            [address] => somehost
            [icon_image] => passiveobject.png
            [statusmap_image] => passiveobject.png
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

    [9] => Array
        (
            [type] => 2
            [host_name] => somehost
            [service_description] => someservice
            [use] => xiwizard_passive_service
            [check_interval] => 1
            [retry_interval] => 1
            [max_check_attempts] => 1
            [is_volatile] => 0
            [stalking_options] => n
            [_xiwizard] => passiveobject
        )

)
I submitted 5 separate host and service checks named somehost (and service) through somehost5 (and service). I then counted the characters in each of the array sections to come up with a very rough count of the total bytes in use.

Judging by my math, and assuming your hostnames are about 15 characters (can hold a whole IP address) and your service descriptions are about 25 (number pulled from thin air) then with a limit of 100,000 bytes you should start to see issues after 100,000 / (310 + (3 * host) + service) = 100,000 / (310 + (3 * 15) + 25) = 100,000 / (310 + (45) + 25) = 100,000 / 380 = about 260 objects.

Conversely, if you want to handle 500 objects then you should aim for about 250,000 in your php.ini settings for good measure.
Former Nagios employee
Locked