custom wizard hostgroups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

custom wizard hostgroups

Post by iivanyi »

Hello,

I've created a wizard based on the linux-server wizard, and I'm trying to figure out how to set the default contacts and hostgroups to be ones I specify.

I believe I need to look at the templates sub-dir, but I'm unsure what I need to do here.

Would someone be able to point me in the right direction?

Regards
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: custom wizard hostgroups

Post by abrist »

The wizard should use a template. You should find many "use" vars in the different arrays for the services in the php. For example:

Code: Select all

  if(!host_exists($hostname)){
        $objs[]=array(
              "type" => OBJECTTYPE_HOST,
              "use" => "xiwizard_linuxserver_host",
              "host_name" => $hostname,
              "address" => $hostaddress,
              "icon_image" => $icon,
              "statusmap_image" => $icon,
              "_xiwizard" => $wizard_name,
         );
  }
The important part is:

Code: Select all

   "use" => "xiwizard_linuxserver_host",
As it defines the template for the object to use: "xiwizard_linuxserver_host"
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked