mirror of https://github.com/Icinga/icinga2.git
parent
ad42367999
commit
5c671eab15
|
@ -151,71 +151,62 @@ for all services which belong to this host. Most of the templates in the Icinga
|
||||||
Template Library require an `address` custom attribute defined in the `vars`
|
Template Library require an `address` custom attribute defined in the `vars`
|
||||||
dictionary.
|
dictionary.
|
||||||
|
|
||||||
apply Service "icinga" {
|
object Service "icinga" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "icinga"
|
check_command = "icinga"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "http" {
|
object Service "http" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "http_ip"
|
check_command = "http_ip"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "ssh" {
|
object Service "ssh" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "ssh"
|
check_command = "ssh"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "load" {
|
object Service "load" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "load"
|
check_command = "load"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply ScheduledDowntime "backup-downtime" to Service {
|
object ScheduledDowntime "backup-downtime" {
|
||||||
import "backup-downtime"
|
import "backup-downtime"
|
||||||
|
|
||||||
assign where host.name == "localhost" && service.short_name == "load"
|
host_name = "localhost"
|
||||||
|
service_name = "load"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "processes" {
|
object Service "processes" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "processes"
|
check_command = "processes"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "users" {
|
object Service "users" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "users"
|
check_command = "users"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "disk" {
|
object Service "disk" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
||||||
|
host_name = "localhost"
|
||||||
check_command = "disk"
|
check_command = "disk"
|
||||||
|
|
||||||
assign where host.name == "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
The `apply` keyword can be used to dynamically create services for all hosts based
|
The command objects `icinga`, `http_ip`, `ssh`, `load`, `processes`, `users`
|
||||||
on rules.
|
and `disk` are all provided by the Icinga Template Library (ITL) which
|
||||||
|
|
||||||
The command objects `http_ip`, `ssh`, `load`, `processes`, `users`
|
|
||||||
and `disk` are all provided by the Icinga Template Library (short ITL) which
|
|
||||||
we enabled earlier by including the `itl/itl.conf` configuration file.
|
we enabled earlier by including the `itl/itl.conf` configuration file.
|
||||||
|
|
|
@ -95,6 +95,13 @@ Attributes:
|
||||||
|
|
||||||
In addition to these attributes you can also use any of the attributes which are also valid for `Host` objects.
|
In addition to these attributes you can also use any of the attributes which are also valid for `Host` objects.
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> Service objects have composite names, i.e. their names are based
|
||||||
|
> on the host_name attribute and the name you specified. This means
|
||||||
|
> you can define more than one object with the same (short) name
|
||||||
|
> as long as the `host_name` attribute has a different value.
|
||||||
|
|
||||||
### <a id="objecttype-servicegroup"></a> ServiceGroup
|
### <a id="objecttype-servicegroup"></a> ServiceGroup
|
||||||
|
|
||||||
A group of services.
|
A group of services.
|
||||||
|
@ -214,6 +221,14 @@ Available state filters:
|
||||||
StateFilterCritical
|
StateFilterCritical
|
||||||
StateFilterUnknown
|
StateFilterUnknown
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> Dependency objects have composite names, i.e. their names are based
|
||||||
|
> on the `child_host_name` and `child_service_name` attributes and the
|
||||||
|
> name you specified. This means you can define more than one object
|
||||||
|
> with the same (short) name as long as one of the `child_host_name` and
|
||||||
|
> `child_service_name` attributes has a different value.
|
||||||
|
|
||||||
### <a id="objecttype-user"></a> User
|
### <a id="objecttype-user"></a> User
|
||||||
|
|
||||||
A user.
|
A user.
|
||||||
|
@ -368,6 +383,14 @@ Attributes:
|
||||||
duration |**Optional.** How long the downtime lasts. Only has an effect for flexible (non-fixed) downtimes.
|
duration |**Optional.** How long the downtime lasts. Only has an effect for flexible (non-fixed) downtimes.
|
||||||
ranges |**Required.** A dictionary containing information which days and durations apply to this timeperiod.
|
ranges |**Required.** A dictionary containing information which days and durations apply to this timeperiod.
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> ScheduledDowntime objects have composite names, i.e. their names are based
|
||||||
|
> on the `host_name` and `service_name` attributes and the
|
||||||
|
> name you specified. This means you can define more than one object
|
||||||
|
> with the same (short) name as long as one of the `host_name` and
|
||||||
|
> `service_name` attributes has a different value.
|
||||||
|
|
||||||
### <a id="objecttype-filelogger"></a> FileLogger
|
### <a id="objecttype-filelogger"></a> FileLogger
|
||||||
|
|
||||||
Specifies Icinga 2 logging to a file.
|
Specifies Icinga 2 logging to a file.
|
||||||
|
|
|
@ -1,19 +1,5 @@
|
||||||
|
|
||||||
## <a id="schemas"></a> Schemas
|
## <a id="schemas"></a> Schemas
|
||||||
|
|
||||||
### <a id="schema-status-dat"></a> Status Data
|
|
||||||
|
|
||||||
Changes require newest Icinga Classic UI releases.
|
|
||||||
|
|
||||||
Object | Key
|
|
||||||
------------|--------------
|
|
||||||
hoststatus | check_service
|
|
||||||
|
|
||||||
> **Note**
|
|
||||||
>
|
|
||||||
> Command definitions get custom variables from 'vars' dictionary.
|
|
||||||
> Programstatus object gets custom variables from 'IcingaVars' constant.
|
|
||||||
|
|
||||||
### <a id="schema-db-ido"></a> DB IDO
|
### <a id="schema-db-ido"></a> DB IDO
|
||||||
|
|
||||||
There is a detailed documentation for the Icinga IDOUtils 1.x
|
There is a detailed documentation for the Icinga IDOUtils 1.x
|
||||||
|
@ -62,18 +48,18 @@ New columns:
|
||||||
|
|
||||||
Table | Join |Description
|
Table | Join |Description
|
||||||
--------------|-----------|----------------------------
|
--------------|-----------|----------------------------
|
||||||
hosts | | host config and status attributes, services counter
|
hosts | | host config and status attributes, services counter
|
||||||
hostgroups | | hostgroup config, status attributes and host/service counters
|
hostgroups | | hostgroup config, status attributes and host/service counters
|
||||||
services | hosts | service config and status attributes
|
services | hosts | service config and status attributes
|
||||||
servicegroups | | servicegroup config, status attributes and service counters
|
servicegroups | | servicegroup config, status attributes and service counters
|
||||||
contacts | | contact config and status attributes
|
contacts | | contact config and status attributes
|
||||||
contactgroups | | contact config, members
|
contactgroups | | contact config, members
|
||||||
commands | | command name and line
|
commands | | command name and line
|
||||||
status | | programstatus, config and stats
|
status | | programstatus, config and stats
|
||||||
comments | services | status attributes
|
comments | services | status attributes
|
||||||
downtimes | services | status attributes
|
downtimes | services | status attributes
|
||||||
timeperiods | | name and is inside flag
|
timeperiods | | name and is inside flag
|
||||||
endpoints | | config and status attributes
|
endpoints | | config and status attributes
|
||||||
log | services, hosts, contacts, commands | parses [compatlog](#objecttype-compatlogger) and shows log attributes
|
log | services, hosts, contacts, commands | parses [compatlog](#objecttype-compatlogger) and shows log attributes
|
||||||
statehist | hosts, services | parses [compatlog](#objecttype-compatlogger) and aggregates state change attributes
|
statehist | hosts, services | parses [compatlog](#objecttype-compatlogger) and aggregates state change attributes
|
||||||
|
|
||||||
|
@ -125,9 +111,9 @@ Schema: "Stats: aggregatefunction aggregateattribute"
|
||||||
|
|
||||||
Aggregate Function | Description
|
Aggregate Function | Description
|
||||||
-------------------|--------------
|
-------------------|--------------
|
||||||
sum |
|
sum | |
|
||||||
min |
|
min | |
|
||||||
max |
|
max | |
|
||||||
avg | sum / count
|
avg | sum / count
|
||||||
std | standard deviation
|
std | standard deviation
|
||||||
suminv | sum (1 / value)
|
suminv | sum (1 / value)
|
||||||
|
|
|
@ -48,7 +48,6 @@ Dictionary::Ptr HostDbObject::GetConfigFields(void) const
|
||||||
fields->Set("address", CompatUtility::GetHostAddress(host));
|
fields->Set("address", CompatUtility::GetHostAddress(host));
|
||||||
fields->Set("address6", CompatUtility::GetHostAddress6(host));
|
fields->Set("address6", CompatUtility::GetHostAddress6(host));
|
||||||
|
|
||||||
fields->Set("check_service_object_id", host);
|
|
||||||
fields->Set("check_command_object_id", host->GetCheckCommand());
|
fields->Set("check_command_object_id", host->GetCheckCommand());
|
||||||
fields->Set("check_command_args", Empty);
|
fields->Set("check_command_args", Empty);
|
||||||
fields->Set("eventhandler_command_object_id", host->GetEventCommand());
|
fields->Set("eventhandler_command_object_id", host->GetEventCommand());
|
||||||
|
|
Loading…
Reference in New Issue