Page 1 of 1

Update a lot of services check command.

Posted: Wed Feb 08, 2017 3:44 pm
by bennyboy
Hi,

I have 448 Service Check to update the check_command. I forgot to specify the unit.

I have change -u to -u M in the check_command. What is the best way to do that.

Thank you!!!

Re: Update a lot of services check command.

Posted: Wed Feb 08, 2017 3:49 pm
by rkennedy
Can you show us the full command definition, along with a sample service definition so that we can see where the variables are placed? You should be able to use the bulk modifications tool, but could vary depending on how things are setup.

Re: Update a lot of services check command.

Posted: Thu Feb 09, 2017 3:24 pm
by bennyboy
We plan to buy the enterprise edition to use bulk tool but for the moment I don't have that option.
I have to modify a lot of $ARG1$ and append the letter M to see the Unit in Bytes.

Before
-t 'token' -P 5693 -M memory/swap -u -w 50 -c 80
After
-t 'token' -P 5693 -M memory/swap -u M -w 50 -c 80

Full example of the service. All the other 448 are exactly the same.

Before

Code: Select all

define service {
        host_name                       hostname
        service_description             Swap Usage
        use                             xi_nonprod_ncpa_service
        check_command                   check_xi_ncpa!-t 'token' -P 5693 -M memory/swap -u -w 50 -c 80
        register                        1
        }
After

Code: Select all

define service {
        host_name                       hostname
        service_description             Swap Usage
        use                             xi_nonprod_ncpa_service
        check_command                   check_xi_ncpa!-t 'token' -P 5693 -M memory/swap -u M -w 50 -c 80
        register                        1
        }
Thank you!

Re: Update a lot of services check command.

Posted: Thu Feb 09, 2017 3:51 pm
by rkennedy
Have you used the enterprise trial that came with your license? For changing a lot of services at once, the bulk mod tool is really the only way to go, without adding / removing services in bulk.

In the future, it might be worth using templates / groups in order to standardize things across the board.

Re: Update a lot of services check command.

Posted: Wed Mar 01, 2017 1:58 pm
by tmcdonald
Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up?