Page 1 of 2

Bulk Modification Add Service

Posted: Tue Feb 21, 2017 9:19 am
by fpernet
Hi All,

NagiosXI 5.4.2 - Bulk Modification Tool 2.1.1

We have implemented a special SNMP test for one server. We want to add this service to many other hosts.
We used the bulk modification tool. It worked but in the CCM these new services appear with no "Config Name" (so very difficult / impossible to manage).
It seems that the bulk modification tool is unable to create the config name based on the host name or other, in such case ...

Can somebody confirm that this is a real limitation or if i made a mistake.
If it is a limitation, is there any goal to solve it (if possible) ?

Thx everybody

Re: Bulk Modification Add Service

Posted: Tue Feb 21, 2017 10:23 am
by gormank
Not the answer you're looking for, but why not create a hostgroup w/ all the hosts for this service, then add the hostgroup to the service? Do that and you don't need the bulk modifications.

Re: Bulk Modification Add Service

Posted: Tue Feb 21, 2017 1:10 pm
by dwhitfield
Aside from @gormank's suggestion, can you send a screenshot of the place where you see no "Config Name" (or blank or whatever it is you see). The names show up properly for me on the Service Detail/Service Status page.

Also, can you provide the "special SNMP test" for us to see and any configs where it appears? Perhaps there is some character we aren't escaping properly.

Re: Bulk Modification Add Service

Posted: Wed Feb 22, 2017 4:20 am
by fpernet
Hi all,

thanks for your help...

@gormank : thx, that could be a good workaround...

@dwhitfield: you can find screenshot requested here attached
1 - the detail of the snmp test (through check_hp plugin)
2 - the test with bulk (only one host) to add a service
3 - the result in the CCM

I did also notice another problem with the Bulk Modif tool. When i want to change a command parameter, it says that if i want to change only some parameters, i do not need to specify the command name. Nevertheless, it i do not specify the command name, then the command name is empty and i cannot apply the config.

thx

Re: Bulk Modification Add Service

Posted: Wed Feb 22, 2017 5:32 pm
by mcapra
Let's say I make a dummy service under localhost like this:
2017_02_22_16_21_25_CCM_Nagios_XI.png
And I want to use the bulk modifications tool to add it to a few other hosts:
2017_02_22_16_22_21_Bulk_Modifications_Tool_Nagios_XI.png
I add 10 or so hosts that I would like to duplicate this check to, and select the dummy check as the "Template" and save the changes:
2017_02_22_16_23_10_Nagios_XI_Bulk_Modifications_Tool_Nagios_XI.png
Afterwards, in the Core Config Manager, the checks I distributed to my 10 new hosts are using the host I added it to as the config name:
2017_02_22_16_24_16_CCM_Nagios_XI.png
This all seems to be working as intended when I run through it on the latest version of Nagios XI (5.4.2) using the latest version of the bulk modifications tool (2.1.1). Could you tell us (via PM or post) if there's any specific hosts you are trying to add the service to that produce this behavior?

Re: Bulk Modification Add Service

Posted: Wed Feb 22, 2017 10:28 pm
by gormank
If I can piggyback for a minute, I'm wondering if my mental picture is right or wrong. This is purely a rhetorical question for the OP.
I have various services. For each, no hosts are involved. I attach hosts to hostgroups and hostgroups to services. When I add a host to a hostgroup, its monitored automagically. Is this wrong?
(My opinion is) the bulk mod feature is a workaround for feature creep or user demand in XI. Fix the process/design, and the endlessly unmanageable bulk mod feature isn't needed. Read a bit of Ncore docs and you'll see the structure.

Using templates and hostgroups, I can change most anything, such as whether a host is monitored, monitoring interval for all hosts, or whatever in a minute, in one place--the host/service template. Adding or removing a host is as close as adding/removing a host from for example all_linux/all_windows hostgroups. All using CCM (or import) by defining hostgroups and templates in CCM.

The point is less duplication of info is good. Anything common needs to be in a host/service template or hoststgroups, not hosts attached to host/service. If you define something in one place, as Nagios is designed, there's no need for bulk modifications.

Code: Select all

# ls -1 /usr/local/nagios/etc/services
CPU_Unix_Load.cfg
CPU_Unix_Queue.cfg
CPU_Win_Load.cfg
CPU_Win_Queue.cfg
DB_Log_Cache_Hit_Ratio_np_RadiusAE.cfg
...
# grep -v ^# /usr/local/nagios/etc/services/CPU_Unix_Load.cfg

Code: Select all

define service {
        service_description             CPU_Unix_Load
        use                             1VZW_default_service
        hostgroup_name                  1VZW_Linux_Physical,1VZW_Linux_Virtual
        display_name                    CPU Load
        check_command                   check_nrpe!check_cpuload2!-a '50 20'!-a '50 20' ! -a '99 98'!/usr/bin/sar -P ALL|grep all|grep -v Average|tail -1!!!
        notification_options            w,c,
        notifications_enabled           1
        _xiwizard                       linux-server
        register                        1
        }
Note that the CPU_Unix_Load service is applied to hostgroup_name defines hostgroups.

Re: Bulk Modification Add Service

Posted: Thu Feb 23, 2017 11:21 am
by mcapra
Thanks for the insights @gormank!

@fpernet let us know if you have additional questions regarding this topic.

Re: Bulk Modification Add Service

Posted: Fri Feb 24, 2017 5:22 am
by fpernet
Hi,

Well, thanks to all.
Ok, this can be a workaround, once again. I can understand what @gormank says, but that's the way it is for this special test. No hostgroup is and will be associated with these hosts. Hostgroups in my customer, are used to classify hosts for team monitoring purposes.
AFAIK the bulk modification should be able to do what i want, right ?

My main question is more to know if the NagiosXI 5.4.2 with Bulk Modification Tool 2.1.1 should be able to do that. If yes, then either this version is buggy or i've got another problem somewhere (remember my previous post, i've got another trouble "I did also notice another problem with the Bulk Modif tool. When i want to change a command parameter, it says that if i want to change only some parameters, i do not need to specify the command name. Nevertheless, it i do not specify the command name, then the command name is empty and i cannot apply the config.").

Thx

Re: Bulk Modification Add Service

Posted: Fri Feb 24, 2017 3:17 pm
by mcapra
I couldn't encounter any issues with bulk-adding a specific service to specific hosts. My configs were created with appropriate config names for each host. I'm not saying this isn't some sort of bug you're encountering, only that I haven't been able to reproduce it so far.

Would it be possible for you to PM a system profile for investigation? From the Nagios XI GUI, you can gather a profile via Admin -> System Profile -> Download Profile.

Re: Bulk Modification Add Service

Posted: Tue Apr 11, 2017 8:28 am
by fpernet
Just for reference.
This problem has been solved with the Customer Support and a new Bulk Modification Tool php version.
Guess it has been included in the new release.
Thx