Bulk Modification - Modifying Arguments

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Bulk Modification - Modifying Arguments

Post by bosecorp »

Hi

I am tried to modify one argument in multiple services checks using the bulk modification tool. When using the tool to modify 1 argument, the tools seem to modify the other arguments even if don't put a value in the arguments in the bulk modification tool. It seems to consistently modify all arguments regardless.

how can I modify just 1 argument?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Modification - Modifying Arguments

Post by lmiltchev »

Unfortunately, you cannot modify only one argument via the bulk mod tool. If you left the rest of the fields empty, nagios would "think" that you wanted to wipe them out (not use any arguments).

You could copy/paste the "original" arguments in the rest of the fields (the ones that you don't want to change), and modify only the one argument you need to.

Note: This won't be useful in all cases. For example, if you had a command, used in several services that you wanted to modify only one argument on, but the rest of the arguments were all different, you couldn't do it. Let's say, you have two dummy services, "dummy1" and "dummy2".

Code: Select all

define service {
    host_name                myhost
    service_description      dummy1    
    check_command            check_dummy!0!"apple"
    ...
}

define service {
    host_name                myhost
    service_description      dummy1    
    check_command            check_dummy!0!"orange"
    ...
}
You could use the bulk mod tool to change the first argument ("0"), to let's say "1", so that the services would return a "WARNING". If you left the second field blank, the bulk mod tool would remove "apple" and "orange". You could enter something in the second field, e.g. "pear", but then this would affect both services...

Code: Select all

define service {
    host_name                myhost
    service_description      dummy1    
    check_command            check_dummy!1!"pear"
    ...
}

define service {
    host_name                myhost
    service_description      dummy1    
    check_command            check_dummy!1!"pear"
    ...
}
Obviously, this is not ideal and cannot be used in all cases. Hope this makes sense. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Bulk Modification - Modifying Arguments

Post by bosecorp »

Yes, Make sense. Unfortunately in my case I wanted to modify only 1 ARG

thanks you can close the ticket
Locked