Update documentation.

Refs #5925
This commit is contained in:
Gunnar Beutner 2014-04-06 08:28:28 +02:00
parent ad42367999
commit 5c671eab15
4 changed files with 54 additions and 55 deletions

View File

@ -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`
dictionary.
apply Service "icinga" {
object Service "icinga" {
import "generic-service"
host_name = "localhost"
check_command = "icinga"
assign where host.name == "localhost"
}
apply Service "http" {
object Service "http" {
import "generic-service"
host_name = "localhost"
check_command = "http_ip"
assign where host.name == "localhost"
}
apply Service "ssh" {
object Service "ssh" {
import "generic-service"
host_name = "localhost"
check_command = "ssh"
assign where host.name == "localhost"
}
apply Service "load" {
object Service "load" {
import "generic-service"
host_name = "localhost"
check_command = "load"
assign where host.name == "localhost"
}
apply ScheduledDowntime "backup-downtime" to Service {
object ScheduledDowntime "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"
host_name = "localhost"
check_command = "processes"
assign where host.name == "localhost"
}
apply Service "users" {
object Service "users" {
import "generic-service"
host_name = "localhost"
check_command = "users"
assign where host.name == "localhost"
}
apply Service "disk" {
object Service "disk" {
import "generic-service"
host_name = "localhost"
check_command = "disk"
assign where host.name == "localhost"
}
The `apply` keyword can be used to dynamically create services for all hosts based
on rules.
The command objects `http_ip`, `ssh`, `load`, `processes`, `users`
and `disk` are all provided by the Icinga Template Library (short ITL) which
The command objects `icinga`, `http_ip`, `ssh`, `load`, `processes`, `users`
and `disk` are all provided by the Icinga Template Library (ITL) which
we enabled earlier by including the `itl/itl.conf` configuration file.

View 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.
> **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 group of services.
@ -214,6 +221,14 @@ Available state filters:
StateFilterCritical
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 user.
@ -368,6 +383,14 @@ Attributes:
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.
> **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
Specifies Icinga 2 logging to a file.

View File

@ -1,19 +1,5 @@
## <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
There is a detailed documentation for the Icinga IDOUtils 1.x
@ -62,18 +48,18 @@ New columns:
Table | Join |Description
--------------|-----------|----------------------------
hosts | | host config and status attributes, services counter
hostgroups | | hostgroup config, status attributes and host/service counters
hosts | &nbsp; | host config and status attributes, services counter
hostgroups | &nbsp; | hostgroup config, status attributes and host/service counters
services | hosts | service config and status attributes
servicegroups | | servicegroup config, status attributes and service counters
contacts | | contact config and status attributes
contactgroups | | contact config, members
commands | | command name and line
status | | programstatus, config and stats
servicegroups | &nbsp; | servicegroup config, status attributes and service counters
contacts | &nbsp; | contact config and status attributes
contactgroups | &nbsp; | contact config, members
commands | &nbsp; | command name and line
status | &nbsp; | programstatus, config and stats
comments | services | status attributes
downtimes | services | status attributes
timeperiods | | name and is inside flag
endpoints | | config and status attributes
timeperiods | &nbsp; | name and is inside flag
endpoints | &nbsp; | config and status 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
@ -125,9 +111,9 @@ Schema: "Stats: aggregatefunction aggregateattribute"
Aggregate Function | Description
-------------------|--------------
sum |
min |
max |
sum | | &nbsp;
min | | &nbsp;
max | | &nbsp;
avg | sum / count
std | standard deviation
suminv | sum (1 / value)

View File

@ -48,7 +48,6 @@ Dictionary::Ptr HostDbObject::GetConfigFields(void) const
fields->Set("address", CompatUtility::GetHostAddress(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_args", Empty);
fields->Set("eventhandler_command_object_id", host->GetEventCommand());