I've copied and modified/renamed the "Windows Server" wizard to use only NRPE for the checks, along with various other changes like adding a prompt for host alias. I now need to be able to create one particular service that is inactive by default. The reason for this is that I want the service config to already be there for each host in case it needs to be activated at some point (it's actually only inactive on single-CPU VMs). For each service, I'm familiar with the "type", "host_name", "service_description", "use", "check_command", and "_xiwizard" attributes. Could you help me get the right syntax so the service is inactive when it is added by the wizard? I know this is done by default for copies of services via the CCM but I didn't have any luck trying to wade through all that source code to figure it out. Thanks!
Code: Select all
$objs[] = array(
"type" => OBJECTTYPE_SERVICE,
"host_name" => $hostname,
"service_description" => "CPU Usage - Total",
"use" => "xiwizard_nrpe_service",
"check_command" => 'check_nrpe!check_cpu!-a filter="core eq str(total)" warn="load gt ' . $serviceargs["cpu_warning"] . '" crit="load gt ' . $serviceargs["cpu_critical"] . '" time=5m time=10m time=15m show-all',
"_xiwizard" => $wizard_name,
);
-Greg