Quantcast
Channel: Monitoring-Portal Feed
Viewing all articles
Browse latest Browse all 1338

ICINGA2: Servicegruppen- und Hostgruppen-Definition

$
0
0
Hallo zusammen,

ich bin gerade dabei von ICINGA1 zu ICINGA2 zu wechseln.

Da ich viel mit Host-/ und Service-Gruppen gearbeitet habe, habe ich mal eine Frage.

Ich nutze in ICINGA1 die folgende Konfiguration:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
###############################################################################
#
# ESX Service Base SERVICE GROUP DEFINITION
#
###############################################################################


###############################################################################
# Host- and Servicegroup Definition
###############################################################################

# Define Hostgroup
define hostgroup{
    	hostgroup_name              	srvgrp-esx-base
    	alias                       	Servicegroup for ESX Base Monitoring
    	register                    	0
    	}

# Define Servicegroup
define servicegroup{
    	servicegroup_name           	srvgrp-esx-base
    	alias                       	Servicegroup for ESX Base Monitoring
    	}




###############################################################################
# Service Definition
###############################################################################

# Define Services
define service{
    	use                         	esx-service,srv-pnp
    	hostgroup_name              	srvgrp-esx-base
    	servicegroups               	srvgrp-esx-base
    	service_description         	Check ESX CPU
    	process_perf_data           	1
    	check_command               	check_vmware_api!-u $_HOSTESX_USER$ -p $USER31$ -l CPU -s usage -w 70 -c 80
    	}



Dabei war mir immer wichtig, dass nur die Servicegruppe im Webfrontend angezeigt wird, jeoch die Hostgruppe, durch die Option resgister 0 ausgebelndet wird.
Ich habe dem Host dann später die Hostgruppe zugeordnet, damit dieser die Checks erhält.

Wie kann ich sowas in ICINGA2 machen?

Dabei bin ich derzeit bei der folgenden Defintionen, die mir aber die Hostgruppe und Serviegruppe im Frontend anzeigt:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Define the serviceproup for: exi-base
*/

// #############################################
// # Define the Hostgroupname
// #############################################
object HostGroup "srvgrp_esxi-base" {

// Define the Hostgroupname Display name
display_name = "Servicegroup ESXi Base"
}


// #############################################
// # Define the Servicegroupname
// #############################################
object ServiceGroup "srvgrp_esxi-base" {
  display_name = "Servicegroup ESXi Base"
}



// #############################################
// # Define the services
// #############################################

// Define a Service Commands
apply Service "Check ESXI CPU" {
  // Import Service Template
  import "generic-service"

  // Define the checkcommand
  check_command = "check_vmware_api"

  // Define the variables of the checkcommand
  vars = {
    	vmware_user = "esx_user"
    	vmware_pass = "passwort"
    	vmware_command = "CPU"
    	vmware_subcommand = "usage"
    	}

  // Define the servicegroup for this service
  groups = [ "srvgrp_esxi-base", ]

  // Assign this service to the defined hostgroup
  assign where "srvgrp_esxi-base" in host.groups
}


Wie kann ich die Konstellation von ICINGA1 in ICINGA2 übertragen, damit nur die Servicegruppe und nicht die Hostgruppe angezeigt wird?

Vielen Dank für eure Hilfe.

Viele Grüße
Matze

Viewing all articles
Browse latest Browse all 1338