Update documentation

This commit is contained in:
Gunnar Beutner 2015-01-21 08:01:49 +01:00
parent 363f23b1d8
commit 981d645028
14 changed files with 3804 additions and 3116 deletions

View File

@ -141,7 +141,7 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
* Bug #7726: Windows wizard is missing --zone argument
* Bug #7730: Restart Icinga - Error Restoring program state from file '/var/lib/icinga2/icinga2.state'
* Bug #7735: 2.2.0 has out-of-date icinga2 man page
* Bug #7738: Systemd rpm scripts are run in wrong package
* Bug #7738: systemd rpm scripts are run in wrong package
* Bug #7740: /usr/sbin/icinga-prepare-dirs conflicts in the bin and common package
* Bug #7741: Icinga 2.2 misses the build requirement libyajl-devel for SUSE distributions
* Bug #7743: Icinga2 node add failed with unhandled exception
@ -173,7 +173,7 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
* `icinga2 object list` replaces `icinga2-list-objects` script #7251
* `icinga2 pki` replaces` icinga2-build-{ca,key}` scripts #7247
* `icinga2 repository` manages `/etc/icinga2/repository.d` which must be included in `icinga2.conf` #7255
* `icinga2 node` cli command provides node (master, satellite, agent) setup (wizard) and management functionality #7248
* `icinga2 node` CLI command provides node (master, satellite, agent) setup (wizard) and management functionality #7248
* `icinga2 daemon` for existing daemon arguments (`-c`, `-C`). Removed `-u` and `-g` parameters in favor of [init.conf](#init-conf).
* bash auto-completion & terminal colors #7396
* Configuration
@ -194,7 +194,7 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
* [PerfdataWriter](#writing-performance-data-files): Don't change perfdata, pass through from plugins #7268
* [GraphiteWriter](#graphite-carbon-cache-writer): Add warn/crit/min/max perfdata and downtime_depth stats values #7366 #6946
* Packages
* `python-icinga2` package dropped in favor of integrated cli commands #7245
* `python-icinga2` package dropped in favor of integrated CLI commands #7245
* Windows Installer for the agent parts #7243
> **Note**
@ -277,7 +277,7 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
* Bug #7373: Wrong usermod command for external command pipe setup
* Bug #7378: Commands are auto-completed when they shouldn't be
* Bug #7379: failed en/disable feature should return error
* Bug #7380: Debian package root permissions interfere with icinga2 cli commands as icinga user
* Bug #7380: Debian package root permissions interfere with icinga2 CLI commands as icinga user
* Bug #7392: Schema upgrade files are missing in /usr/share/icinga2-ido-{mysql,pgsql}
* Bug #7417: CMake warnings on OS X
* Bug #7428: Documentation: 1-about contribute links to non-existing report a bug howto
@ -327,14 +327,14 @@ Compiling from source is not recommended.
[Cluster](#distributed-monitoring-high-availability) model for distributed setups, load balancing
and High-Availability installations (or a combination of them). On-demand configuration
synchronisation between zones is available, but not mandatory (for example when config management
tools such as Puppet are used). Secured by SSL x509 certificates, supporting IPv4 and IPv6.
tools such as Puppet are used). Secured by TLS with certificates, supporting IPv4 and IPv6.
High Availability for DB IDO: Only active on the current zone master, failover happens automatically.
* Monitoring Remote Clients
Built on proven [cluster](#distributed-monitoring-high-availability) stack,
[Icinga 2 clients](#icinga2-remote-client-monitoring) can be installed acting as remote satellite or
agent. Secured communication by SSL x509 certificates, install them with [cli commands](#cli-commands),
agent. Secured communication by TLS with certificates, install them with [CLI commands](#cli-commands),
and configure them either locally with discovery on the master, or use them for executing checks and
event handlers remotely.
@ -355,7 +355,7 @@ That way you are not blind (anymore) during a configuration reload and benefit f
Enable only the [features](#cli-command-feature) which are currently disabled,
[list objects](#cli-command-object) generated from [apply rules](#using-apply) or
[generate SSL x509 certificates](#cli-command-pki) for remote clients or cluster setup.
[generate X.509 certificates](#cli-command-pki) for remote clients or cluster setup.
Start/stop the Icinga 2 [daemon](#cli-command-daemon) or validate your configuration,
[manage and install](#cli-command-node) remote clients and service discovery helped
with black- and whitelists.

1226
doc/10-object-types.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,792 @@
# <a id="icinga-template-library"></a> Icinga Template Library
## <a id="itl-overview"></a> Overview
The Icinga Template Library (ITL) implements standard templates and object
definitions for commonly used services.
By default the ITL is included in the `icinga2.conf` configuration file:
include <itl>
## <a id="itl-generic-templates"></a> Generic Templates
These templates are imported by the provided example configuration.
### <a id="itl-plugin-check-command"></a> plugin-check-command
Command template for check plugins executed by Icinga 2.
The `plugin-check-command` command does not support any vars.
### <a id="itl-plugin-notification-command"></a> plugin-notification-command
Command template for notification scripts executed by Icinga 2.
The `plugin-notification-command` command does not support any vars.
### <a id="itl-plugin-event-command"></a> plugin-event-command
Command template for event handler scripts executed by Icinga 2.
The `plugin-event-command` command does not support any vars.
## <a id="itl-check-commands"></a> Check Commands
These check commands are embedded into Icinga 2 and do not require any external
plugin scripts.
### <a id="itl-icinga"></a> icinga
Check command for the built-in `icinga` check. This check returns performance
data for the current Icinga instance.
The `icinga` check command does not support any vars.
### <a id="itl-icinga-cluster"></a> cluster
Check command for the built-in `cluster` check. This check returns performance
data for the current Icinga instance and connected endpoints.
The `cluster` check command does not support any vars.
### <a id="itl-icinga-cluster-zone"></a> cluster-zone
Check command for the built-in `cluster-zone` check.
Cluster Attributes:
Name | Description
-------------|---------------
cluster_zone | **Optional.** The zone name. Defaults to "$host.name$".
# <a id="plugin-check-commands"></a> Plugin Check Commands
## <a id="plugin-check-command-overview"></a> Overview
The Plugin Check Commands provides example configuration for plugin check commands
provided by the Monitoring Plugins project.
By default the Plugin Check Commands are included in the `icinga2.conf` configuration
file:
include <plugins>
The plugin check commands assume that there's a global constant named `PluginDir`
which contains the path of the plugins from the Monitoring Plugins project.
### <a id="plugin-check-command-ping4"></a> ping4
Check command object for the `check_ping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-ping6"></a> ping6
Check command object for the `check_ping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv6 address. Defaults to "$address6$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-hostalive"></a> hostalive
Check command object for the `check_ping` plugin with host check default values.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 3000.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 80.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 5000.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 100.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-fping4"></a> fping4
Check command object for the `check_fping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
fping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
fping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
fping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
fping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
fping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
fping_number | **Optional.** The number of packets to send. Defaults to 5.
fping_interval | **Optional.** The interval between packets in milli-seconds. Defaults to 500.
fping_bytes | **Optional.** The size of ICMP packet.
fping_target_timeout | **Optional.** The target timeout in milli-seconds.
fping_source_ip | **Optional.** The name or ip address of the source ip.
fping_source_interface | **Optional.** The source interface name.
### <a id="plugin-check-command-fping6"></a> fping6
Check command object for the `check_fping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
fping_address | **Optional.** The host's IPv6 address. Defaults to "$address6$".
fping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
fping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
fping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
fping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
fping_number | **Optional.** The number of packets to send. Defaults to 5.
fping_interval | **Optional.** The interval between packets in milli-seconds. Defaults to 500.
fping_bytes | **Optional.** The size of ICMP packet.
fping_target_timeout | **Optional.** The target timeout in milli-seconds.
fping_source_ip | **Optional.** The name or ip address of the source ip.
fping_source_interface | **Optional.** The source interface name.
### <a id="plugin-check-command-dummy"></a> dummy
Check command object for the `check_dummy` plugin.
Custom Attributes:
Name | Description
----------------|--------------
dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0.
dummy_text | **Optional.** Plugin output. Defaults to "Check was successful.".
### <a id="plugin-check-command-passive"></a> passive
Specialised check command object for passive checks executing the `check_dummy` plugin with appropriate default values.
Custom Attributes:
Name | Description
----------------|--------------
dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 3.
dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.".
### <a id="plugin-check-command-tcp"></a> tcp
Check command object for the `check_tcp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
tcp_address | **Optional.** The host's address. Defaults to "$address$".
tcp_port | **Required.** The port that should be checked.
### <a id="plugin-check-command-ssl"></a> ssl
Check command object for the `check_tcp` plugin, using ssl-related options.
Custom Attributes:
Name | Description
------------------------------|--------------
ssl_address | **Optional.** The host's address. Defaults to "$address$".
ssl_port | **Required.** The port that should be checked.
ssl_timeout | **Optional.** Timeout in seconds for the connect and handshake. The plugin default is 10 seconds.
ssl_cert_valid_days_warn | **Optional.** Warning threshold for days before the certificate will expire. When used, ssl_cert_valid_days_critical must also be set.
ssl_cert_valid_days_critical | **Optional.** Critical threshold for days before the certificate will expire. When used, ssl_cert_valid_days_warn must also be set.
### <a id="plugin-check-command-udp"></a> udp
Check command object for the `check_udp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
udp_address | **Optional.** The host's address. Defaults to "$address$".
udp_port | **Required.** The port that should be checked.
### <a id="plugin-check-command-http"></a> http
Check command object for the `check_http` plugin.
Custom Attributes:
Name | Description
-------------------------|--------------
http_address | **Optional.** The host's address. Defaults to "$address".
http_vhost | **Optional.** The virtual host that should be sent in the "Host" header.
http_uri | **Optional.** The request URI.
http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise.
http_ssl | **Optional.** Whether to use SSL. Defaults to false.
http_sni | **Optional.** Whether to use SNI. Defaults to false.
http_auth_pair | **Optional.** Add 'username:password' authorization pair.
http_proxy_auth_pair | **Optional.** Add 'username:password' authorization pair for proxy.
http_ignore_body | **Optional.** Don't download the body, just the headers.
http_linespan | **Optional.** Allow regex to span newline.
http_expect_body_regex | **Optional.** A regular expression which the body must match against. Incompatible with http_ignore_body.
http_expect_body_eregi | **Optional.** A case-insensitive expression which the body must match against. Incompatible with http_ignore_body.
http_invertregex | **Optional.** Changes behaviour of http_expect_body_regex and http_expect_body_eregi to return CRITICAL if found, OK if not.
http_warn_time | **Optional.** The warning threshold.
http_critical_time | **Optional.** The critical threshold.
http_expect | **Optional.** Comma-delimited list of strings, at least one of them is expected in the first (status) line of the server response. Default: HTTP/1.
http_certificate | **Optional.** Minimum number of days a certificate has to be valid. Port defaults to 443.
http_clientcert | **Optional.** Name of file contains the client certificate (PEM format).
http_privatekey | **Optional.** Name of file contains the private key (PEM format).
http_headerstring | **Optional.** String to expect in the response headers.
http_string | **Optional.** String to expect in the content.
http_post | **Optional.** URL encoded http POST data.
http_method | **Optional.** Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE).
http_maxage | **Optional.** Warn if document is more than seconds old.
http_contenttype | **Optional.** Specify Content-Type header when POSTing.
http_useragent | **Optional.** String to be sent in http header as User Agent.
http_header | **Optional.** Any other tags to be sent in http header.
http_extendedperfdata | **Optional.** Print additional perfdata. Defaults to "false".
http_onredirect | **Optional.** How to handle redirect pages. Possible values: "ok" (default), "warning", "critical", "follow", "sticky" (like follow but stick to address), "stickyport" (like sticky but also to port)
http_pagesize | **Optional.** Minimum page size required:Maximum page size required.
http_timeout | **Optional.** Seconds before connection times out.
### <a id="plugin-check-command-ftp"></a> ftp
Check command object for the `check_ftp` plugin.
Custom Attributes:
Name | Description
-------------------|--------------
ftp_address | **Optional.** The host's address. Defaults to "$address$".
### <a id="plugin-check-command-smtp"></a> smtp
Check command object for the `check_smtp` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
smtp_address | **Optional.** The host's address. Defaults to "$address$".
smtp_port | **Optional.** The port that should be checked. Defaults to 25.
smtp_mail_from | **Optional.** Test a MAIL FROM command with the given email address.
### <a id="plugin-check-command-ssmtp"></a> ssmtp
Check command object for the `check_ssmtp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ssmtp_address | **Required.** The host's address. Defaults to "$address$".
ssmtp_port | **Optional.** The port that should be checked. Defaults to 465.
ssmtp_mail_from | **Optional.** Test a MAIL FROM command with the given email address.
### <a id="plugin-check-command-imap"></a> imap
Check command object for the `check_imap` plugin.
Custom Attributes:
Name | Description
----------------|--------------
imap_address | **Optional.** The host's address. Defaults to "$address$".
imap_port | **Optional.** The port that should be checked. Defaults to 143.
### <a id="plugin-check-command-simap"></a> simap
Check command object for the `check_simap` plugin.
Custom Attributes:
Name | Description
----------------|--------------
simap_address | **Optional.** The host's address. Defaults to "$address$".
simap_port | **Optional.** The host's port.
### <a id="plugin-check-command-pop"></a> pop
Check command object for the `check_pop` plugin.
Custom Attributes:
Name | Description
----------------|--------------
pop_address | **Optional.** The host's address. Defaults to "$address$".
pop_port | **Optional.** The port that should be checked. Defaults to 110.
### <a id="plugin-check-command-spop"></a> spop
Check command object for the `check_spop` plugin.
Custom Attributes:
Name | Description
----------------|--------------
spop_address | **Optional.** The host's address. Defaults to "$address$".
spop_port | **Optional.** The host's port.
### <a id="plugin-check-command-ntp-time"></a> ntp_time
Check command object for the `check_ntp_time` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ntp_address | **Optional.** The host's address. Defaults to "$address$".
### <a id="plugin-check-command-ssh"></a> ssh
Check command object for the `check_ssh` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ssh_address | **Optional.** The host's address. Defaults to "$address$".
ssh_port | **Optional.** The port that should be checked. Defaults to 22.
ssh_timeout | **Optional.** Seconds before connection times out. Defaults to 10.
### <a id="plugin-check-command-disk"></a> disk
Check command object for the `check_disk` plugin.
Custom Attributes:
Name | Description
------------------------|------------------------
disk_wfree | **Optional.** The free space warning threshold in %. Defaults to 20.
disk_cfree | **Optional.** The free space critical threshold in %. Defaults to 10.
disk_inode_wfree | **Optional.** The free inode warning threshold.
disk_inode_cfree | **Optional.** The free inode critical threshold.
disk_partition | **Optional.** The partition. **Deprecated in 2.3.**
disk_partition_excluded | **Optional.** The excluded partition. **Deprecated in 2.3.**
disk_partitions | **Optional.** The partition(s). Multiple partitions must be defined as array.
disk_partitions_excluded | **Optional.** The excluded partition(s). Multiple partitions must be defined as array.
### <a id="plugin-check-command-users"></a> users
Check command object for the `check_users` plugin.
Custom Attributes:
Name | Description
----------------|--------------
users_wgreater | **Optional.** The user count warning threshold. Defaults to 20.
users_cgreater | **Optional.** The user count critical threshold. Defaults to 50.
### <a id="plugin-check-command-processes"></a> procs
Check command object for the `check_procs` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
procs_warning | **Optional.** The process count warning threshold. Defaults to 250.
procs_critical | **Optional.** The process count critical threshold. Defaults to 400.
procs_metric | **Optional.** Check thresholds against metric.
procs_timeout | **Optional.** Seconds before plugin times out.
procs_traditional | **Optional.** Filter own process the traditional way by PID instead of /proc/pid/exe. Defaults to "false".
procs_state | **Optional.** Only scan for processes that have one or more of the status flags you specify.
procs_ppid | **Optional.** Only scan for children of the parent process ID indicated.
procs_vsz | **Optional.** Only scan for processes with VSZ higher than indicated.
procs_rss | **Optional.** Only scan for processes with RSS higher than indicated.
procs_pcpu | **Optional.** Only scan for processes with PCPU higher than indicated.
procs_user | **Optional.** Only scan for processes with user name or ID indicated.
procs_argument | **Optional.** Only scan for processes with args that contain STRING.
procs_argument_regex | **Optional.** Only scan for processes with args that contain the regex STRING.
procs_command | **Optional.** Only scan for exact matches of COMMAND (without path).
procs_nokthreads | **Optional.** Only scan for non kernel threads. Defaults to "false".
### <a id="plugin-check-command-swap"></a> swap
Check command object for the `check_swap` plugin.
Custom Attributes:
Name | Description
----------------|--------------
swap_wfree | **Optional.** The free swap space warning threshold in %. Defaults to 50.
swap_cfree | **Optional.** The free swap space critical threshold in %. Defaults to 25.
### <a id="plugin-check-command-load"></a> load
Check command object for the `check_load` plugin.
Custom Attributes:
Name | Description
----------------|--------------
load_wload1 | **Optional.** The 1-minute warning threshold. Defaults to 5.
load_wload5 | **Optional.** The 5-minute warning threshold. Defaults to 4.
load_wload15 | **Optional.** The 15-minute warning threshold. Defaults to 3.
load_cload1 | **Optional.** The 1-minute critical threshold. Defaults to 10.
load_cload5 | **Optional.** The 5-minute critical threshold. Defaults to 6.
load_cload15 | **Optional.** The 15-minute critical threshold. Defaults to 4.
### <a id="plugin-check-command-snmp"></a> snmp
Check command object for the `check_snmp` plugin.
Custom Attributes:
Name | Description
--------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_oid | **Required.** The SNMP OID.
snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_string | **Optional.** Return OK state if the string matches exactly with the output value
snmp_ereg | **Optional.** Return OK state if extended regular expression REGEX matches with the output value
snmp_eregi | **Optional.** Return OK state if case-insensitive extended REGEX matches with the output value
snmp_label | **Optional.** Prefix label for output value
snmp_invert_search | **Optional.** Invert search result and return CRITICAL state if found
snmp_units | **Optional.** Units label(s) for output value (e.g., 'sec.').
snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 10 seconds.
### <a id="plugin-check-command-snmp"></a> snmpv3
Check command object for the `check_snmp` plugin, using SNMPv3 authentication and encryption options.
Custom Attributes:
Name | Description
------------------|--------------
snmpv3_address | **Optional.** The host's address. Defaults to "$address$".
snmpv3_user | **Required.** The username to log in with.
snmpv3_auth_alg | **Optional.** The authentication algorithm. Defaults to SHA.
snmpv3_auth_key | **Required.** The authentication key.
snmpv3_priv_alg | **Optional.** The encryption algorithm. Defaults to AES.
snmpv3_priv_key | **Required.** The encryption key.
snmpv3_oid | **Required.** The SNMP OID.
snmpv3_warn | **Optional.** The warning threshold.
snmpv3_crit | **Optional.** The critical threshold.
snmpv3_label | **Optional.** Prefix label for output value.
### <a id="plugin-check-command-snmp-uptime"></a> snmp-uptime
Check command object for the `check_snmp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_oid | **Optional.** The SNMP OID. Defaults to "1.3.6.1.2.1.1.3.0".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
### <a id="plugin-check-command-dns"></a> dns
Check command object for the `check_dns` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
dns_lookup | **Optional.** The hostname or IP to query the DNS for. Defaults to $host_name$.
dns_server | **Optional.** The DNS server to query. Defaults to the server configured in the OS.
dns_expected_answer | **Optional.** The answer to look for. A hostname must end with a dot. **Deprecated in 2.3.**
dns_expected_answers | **Optional.** The answer(s) to look for. A hostname must end with a dot. Multiple answers must be defined as array.
dns_authoritative | **Optional.** Expect the server to send an authoritative answer.
### <a id="plugin-check-command-dig"></a> dig
Check command object for the `check_dig` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
dig_server | **Optional.** The DNS server to query. Defaults to "127.0.0.1".
dig_lookup | **Optional.** The address that should be looked up.
### <a id="plugin-check-command-dhcp"></a> dhcp
Check command object for the `check_dhcp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
dhcp_serverip | **Optional.** The IP address of the DHCP server which we should get a response from.
dhcp_requestedip| **Optional.** The IP address which we should be offered by a DHCP server.
dhcp_timeout | **Optional.** The timeout in seconds.
dhcp_interface | **Optional.** The interface to use.
dhcp_mac | **Optional.** The MAC address to use in the DHCP request.
dhcp_unicast | **Optional.** Whether to use unicast requests. Defaults to false.
### <a id="plugin-check-command-nscp"></a> nscp
Check command object for the `check_nt` plugin.
Custom Attributes:
Name | Description
----------------|--------------
nscp_address | **Optional.** The host's address. Defaults to "$address$".
nscp_port | **Optional.** The NSClient++ port. Defaults to 12489.
nscp_password | **Optional.** The NSClient++ password.
nscp_variable | **Required.** The variable that should be checked.
nscp_params | **Optional.** Parameters for the query. Multiple parameters must be defined as array.
nscp_warn | **Optional.** The warning threshold.
nscp_crit | **Optional.** The critical threshold.
nscp_timeout | **Optional.** The query timeout in seconds.
### <a id="plugin-check-command-by-ssh"></a> by_ssh
Check command object for the `check_by_ssh` plugin.
Custom Attributes:
Name | Description
----------------|--------------
by_ssh_address | **Optional.** The host's address. Defaults to "$address$".
by_ssh_port | **Optional.** The SSH port. Defaults to 22.
by_ssh_command | **Optional.** The command that should be executed.
by_ssh_logname | **Optional.** The SSH username.
by_ssh_identity | **Optional.** The SSH identity.
by_ssh_quiet | **Optional.** Whether to suppress SSH warnings. Defaults to false.
by_ssh_warn | **Optional.** The warning threshold.
by_ssh_crit | **Optional.** The critical threshold.
by_ssh_timeout | **Optional.** The timeout in seconds.
### <a id="plugin-check-command-ups"></a> ups
Check command object for the `check_ups` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ups_address | **Optional.** The host's address. Defaults to "$address$".
ups_name | **Optional.** The UPS name. Defaults to `ups`.
### <a id="plugin-check-command-nrpe"></a> nrpe
Check command object for the `check_nrpe` plugin.
Custom Attributes:
Name | Description
----------------|--------------
nrpe_address | **Optional.** The host's address. Defaults to "$address$".
nrpe_port | **Optional.** The NRPE port. Defaults to 5668.
nrpe_command | **Optional.** The command that should be executed.
nrpe_no_ssl | **Optional.** Whether to disable SSL or not. Defaults to `false`.
nrpe_timeout_unknown | **Optional.** Whether to set timeouts to unknown instead of critical state. Defaults to `false`.
nrpe_timeout | **Optional.** The timeout in seconds.
nrpe_arguments | **Optional.** Arguments that should be passed to the command. Multiple arguments must be defined as array.
### <a id="plugin-check-command-apt"></a> apt
Check command for the `check_apt` plugin.
The `apt` check command does not support any vars.
### <a id="plugin-check-command-running-kernel"></a> running_kernel
Check command object for the `check_running_kernel` plugin
provided by the `nagios-plugins-contrib` package on Debian.
The `running_kernel` check command does not support any vars.
# <a id="snmp-manubulon-plugin-check-commands"></a> SNMP Manubulon Plugin Check Commands
## <a id="snmp-manubulon-plugin-check-commands-overview"></a> Overview
The `SNMP Manubulon Plugin Check Commands` provide example configuration for plugin check
commands provided by the [SNMP Manubulon project](http://nagios.manubulon.com/index_snmp.html).
The SNMP manubulon plugin check commands assume that the global constant named `ManubulonPluginDir`
is set to the path where the Manubublon SNMP plugins are installed.
You can enable these plugin check commands by adding the following the include directive in your
configuration [icinga2.conf](#icinga2-conf) file:
include <manubulon>
## Checks by Host Type
**N/A** : Not available for this type.
**SNMP** : Available for simple SNMP query.
**??** : Untested.
**Specific** : Script name for platform specific checks.
Host type | Interface | storage | load/cpu | mem | process | env | specific
------------------------|------------|----------|-----------|-----|----------|-----|-------------------------
Linux | Yes | Yes | Yes | Yes | Yes | No |
Windows | Yes | Yes | Yes | Yes | Yes | No | check_snmp_win.pl
Cisco router/switch | Yes | N/A | Yes | Yes | N/A | Yes |
HP router/switch | Yes | N/A | Yes | Yes | N/A | No |
Bluecoat proxy | Yes | SNMP | Yes | SNMP| No | Yes |
CheckPoint on SPLAT | Yes | Yes | Yes | Yes | Yes | No | check_snmp_cpfw.pl
CheckPoint on Nokia IP | Yes | Yes | Yes | No | ?? | No | check_snmp_vrrp.pl
Boostedge | Yes | Yes | Yes | Yes | ?? | No | check_snmp_boostedge.pl
AS400 | Yes | Yes | Yes | Yes | No | No |
NetsecureOne Netbox | Yes | Yes | Yes | ?? | Yes | No |
Radware Linkproof | Yes | N/A | SNMP | SNMP| No | No | check_snmp_linkproof_nhr <br> check_snmp_vrrp.pl
IronPort | Yes | SNMP | SNMP | SNMP| No | Yes |
Cisco CSS | Yes | ?? | Yes | Yes | No | ?? | check_snmp_css.pl
### <a id="plugin-check-command-snmp-load"></a> snmp-load
Check command object for the [check_snmp_load.pl](http://nagios.manubulon.com/snmp_load.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection.
snmp_v2 | **Optional.** SNMP version to 2c. Defaults to "false".
snmp_v3 | **Optional.** SNMP version to 3. Defaults to "false".
snmp_login | **Optional.** SNMP version 3 username. Defaults to "snmpuser".
snmp_password | **Required.** SNMP version 3 password. No value defined as default.
snmp_v3_use_privpass | **Optional.** Define to use SNMP version 3 priv password. Defaults to "false".
snmp_authprotocol | **Optional.** SNMP version 3 authentication protocol. Defaults to "md5,des".
snmp_privpass | **Required.** SNMP version 3 priv password. No value defined as default.
snmp_warn | **Optional.** The warning threshold. Change the `snmp_load_type` var to "netsl" for using 3 values.
snmp_crit | **Optional.** The critical threshold. Change the `snmp_load_type` var to "netsl" for using 3 values.
snmp_load_type | **Optional.** Load type. Defaults to "stand". Check all available types in the [snmp load](http://nagios.manubulon.com/snmp_load.html) documentation.
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds.
### <a id="plugin-check-command-snmp-memory"></a> snmp-memory
Check command object for the [check_snmp_mem.pl](http://nagios.manubulon.com/snmp_mem.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection.
snmp_v2 | **Optional.** SNMP version to 2c. Defaults to "false".
snmp_v3 | **Optional.** SNMP version to 3. Defaults to "false".
snmp_login | **Optional.** SNMP version 3 username. Defaults to "snmpuser".
snmp_password | **Required.** SNMP version 3 password. No value defined as default.
snmp_v3_use_privpass | **Optional.** Define to use SNMP version 3 priv password. Defaults to "false".
snmp_authprotocol | **Optional.** SNMP version 3 authentication protocol. Defaults to "md5,des".
snmp_privpass | **Required.** SNMP version 3 priv password. No value defined as default.
snmp_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds.
### <a id="plugin-check-command-snmp-storage"></a> snmp-storage
Check command object for the [check_snmp_storage.pl](http://nagios.manubulon.com/snmp_storage.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection.
snmp_v2 | **Optional.** SNMP version to 2c. Defaults to "false".
snmp_v3 | **Optional.** SNMP version to 3. Defaults to "false".
snmp_login | **Optional.** SNMP version 3 username. Defaults to "snmpuser".
snmp_password | **Required.** SNMP version 3 password. No value defined as default.
snmp_v3_use_privpass | **Optional.** Define to use SNMP version 3 priv password. Defaults to "false".
snmp_authprotocol | **Optional.** SNMP version 3 authentication protocol. Defaults to "md5,des".
snmp_privpass | **Required.** SNMP version 3 priv password. No value defined as default.
snmp_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_storage_name | **Optional.** Storage name. Default to regex "^/$$". More options available in the [snmp storage](http://nagios.manubulon.com/snmp_storage.html) documentation.
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds.
### <a id="plugin-check-command-snmp-interface"></a> snmp-interface
Check command object for the [check_snmp_int.pl](http://nagios.manubulon.com/snmp_int.html) plugin.
Custom Attributes:
Name | Description
----------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection.
snmp_v2 | **Optional.** SNMP version to 2c. Defaults to "false".
snmp_v3 | **Optional.** SNMP version to 3. Defaults to "false".
snmp_login | **Optional.** SNMP version 3 username. Defaults to "snmpuser".
snmp_password | **Required.** SNMP version 3 password. No value defined as default.
snmp_v3_use_privpass | **Optional.** Define to use SNMP version 3 priv password. Defaults to "false".
snmp_authprotocol | **Optional.** SNMP version 3 authentication protocol. Defaults to "md5,des".
snmp_privpass | **Required.** SNMP version 3 priv password. No value defined as default.
snmp_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_interface | **Optional.** Network interface name. Default to regex "eth0".
snmp_interface_perf | **Optional.** Check the input/ouput bandwidth of the interface. Defaults to "true".
snmp_interface_label | **Optional.** Add label before speed in output: in=, out=, errors-out=, etc...
snmp_interface_bits_bytes | **Optional.** Output performance data in bits/s or Bytes/s. **Depends** on snmp_interface_kbits set to "true". Defaults to "true".
snmp_interface_percent | **Optional.** Output performance data in % of max speed. Defaults to "false".
snmp_interface_kbits | **Optional.** Make the warning and critical levels in KBits/s. Defaults to "true".
snmp_interface_megabytes | **Optional.** Make the warning and critical levels in Mbps or MBps. **Depends** on snmp_interface_kbits set to "true". Defaults to "true".
snmp_interface_64bit | **Optional.** Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps. Defaults to "false".
snmp_interface_errors | **Optional.** Add error & discard to Perfparse output. Defaults to "true".
snmp_interface_noregexp | **Optional.** Do not use regexp to match interface name in description OID. Defaults to "false".
snmp_interface_delta | **Optional.** Delta time of perfcheck. Defaults to "300" (5 min).
snmp_warncrit_percent | **Optional.** Make the warning and critical levels in % of reported interface speed. If set **snmp_interface_megabytes** needs to be set to "false". Defaults to "false".
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds.
### <a id="plugin-check-command-snmp-process"></a> snmp-process
Check command object for the [check_snmp_process.pl](http://nagios.manubulon.com/snmp_process.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection.
snmp_v2 | **Optional.** SNMP version to 2c. Defaults to "false".
snmp_v3 | **Optional.** SNMP version to 3. Defaults to "false".
snmp_login | **Optional.** SNMP version 3 username. Defaults to "snmpuser".
snmp_password | **Required.** SNMP version 3 password. No value defined as default.
snmp_v3_use_privpass | **Optional.** Define to use SNMP version 3 priv password. Defaults to "false".
snmp_authprotocol | **Optional.** SNMP version 3 authentication protocol. Defaults to "md5,des".
snmp_privpass | **Required.** SNMP version 3 priv password. No value defined as default..
snmp_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_process_name | **Optional.** Name of the process (regexp). No trailing slash!. Defaults to ".*".
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds.

View File

@ -17,7 +17,7 @@ and distribution you are running.
Debian | [Upstream](https://packages.debian.org/sid/icinga2), [DebMon](http://debmon.org/packages/debmon-wheezy/icinga2), [Icinga Repository](http://packages.icinga.org/debian/)
Ubuntu | [Upstream](https://launchpad.net/ubuntu/+source/icinga2), [Icinga PPA](https://launchpad.net/~formorer/+archive/ubuntu/icinga), [Icinga Repository](http://packages.icinga.org/ubuntu/)
RHEL/CentOS | [Icinga Repository](http://packages.icinga.org/epel/)
OpenSUSE | [Icinga Repository](http://packages.icinga.org/openSUSE/), [Server Monitoring Repository](https://build.opensuse.org/package/show/server:monitoring/icinga2)
openSUSE | [Icinga Repository](http://packages.icinga.org/openSUSE/), [Server Monitoring Repository](https://build.opensuse.org/package/show/server:monitoring/icinga2)
SLES | [Icinga Repository](http://packages.icinga.org/SUSE/)
Gentoo | [Upstream](http://packages.gentoo.org/package/net-analyzer/icinga2)
FreeBSD | [Upstream](http://www.freshports.org/net-mgmt/icinga2)
@ -60,7 +60,7 @@ SLES:
# zypper ar http://packages.icinga.org/SUSE/ICINGA-release.repo
# zypper ref
OpenSUSE:
openSUSE:
# zypper ar http://packages.icinga.org/openSUSE/ICINGA-release.repo
# zypper ref
@ -83,17 +83,17 @@ RHEL/CentOS/Fedora:
# yum install icinga2
SLES/OpenSUSE:
SLES/openSUSE:
# zypper install icinga2
On RHEL/CentOS and SLES you will need to use `chkconfig` to enable the
`icinga2` service. You can manually start Icinga 2 using `service icinga2 start`.
On RHEL/CentOS and SLES you will need to use `chkconfig` and `service` to enable and start
the `icinga2` service:
# chkconfig icinga2 on
# service icinga2 start
RHEL/CentOS 7 use [Systemd](#systemd-service) with `systemctl {enable,start} icinga2`.
RHEL/CentOS 7 and Fedora use [systemd](#systemd-service):
# systemctl enable icinga2
# systemctl start icinga2
@ -1505,13 +1505,13 @@ By default the Icinga 2 daemon is running as `icinga` user and group
using the init script. Using Debian packages the user and group are set to `nagios`
for historical reasons.
### <a id="systemd-service"></a> Systemd Service
### <a id="systemd-service"></a> systemd Service
Modern distributions (Fedora, OpenSUSE, etc.) already use `Systemd` natively. Enterprise-grade
distributions such as RHEL7 changed to `Systemd` recently. Icinga 2 Packages will install the
Some distributions (e.g. Fedora and openSUSE) already use `systemd`. Other
distributions such as RHEL7 changed to `systemd` recently. Icinga 2 Packages will install the
service automatically.
The Icinga 2 `Systemd` service can be (re)started, reloaded, stopped and also queried for its current status.
The Icinga 2 `systemd` service can be (re)started, reloaded, stopped and also queried for its current status.
# systemctl status icinga2
icinga2.service - Icinga host/service/network monitoring system
@ -1532,7 +1532,7 @@ The Icinga 2 `Systemd` service can be (re)started, reloaded, stopped and also qu
Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 8 Dependency(s).
Jul 23 13:39:38 nbmif systemd[1]: Started Icinga host/service/network monitoring system.
`Systemd` supports the following command actions:
`systemd` supports the following command actions:
Command | Description
--------------------|------------------------
@ -1554,16 +1554,16 @@ If you're stuck with configuration errors, you can manually invoke the [configur
### <a id="cli-commands"></a> Icinga 2 CLI Commands
Icinga 2 ships its own integrated cli commands supporting bash-autocompletion.
Icinga 2 ships its own integrated CLI commands supporting bash-autocompletion.
These cli commands will allow you to use certain functionality
These CLI commands will allow you to use certain functionality
provided by and around the Icinga 2 daemon.
> **Note**
>
> The cli commands are available in Icinga 2 starting with *2.2*.
> The CLI commands are available in Icinga 2 starting with *2.2*.
Each cli command provides its own help and usage information, so please
Each CLI command provides its own help and usage information, so please
make sure to always run them withthe `--help` parameter.
Run `icinga2` without any arguments (or using `--help`) to get a list of
@ -1686,7 +1686,7 @@ added.
#### <a id="cli-command-daemon"></a> Cli command: Daemon
The cli command `daemon` provides the functionality to start/stop Icinga 2.
The CLI command `daemon` provides the functionality to start/stop Icinga 2.
Furthermore it provides the [configuration validation](#config-validation).
# icinga2 daemon --help
@ -1736,7 +1736,7 @@ is returned. More details in the [configuration validation](#config-validation)
#### <a id="cli-command-feature"></a> Cli command: Feature
The cli commands for `enable` and `disable` feature support bash auto-completion
The CLI commands for `enable` and `disable` feature support bash auto-completion
and will only suggest features for the corresponding context. Like disabling a
feature will only bring up all enabled features.
@ -1793,7 +1793,7 @@ nodes in a [remote monitoring ](#icinga2-remote-client-monitoring) or
#### <a id="cli-command-object"></a> Cli command: Object
The `object` cli command can be used to list all configuration objects and their
The `object` CLI command can be used to list all configuration objects and their
attributes. The command also shows where each of the attributes was modified.
That way you can also identify which objects have been created from your [apply rules](#apply).
@ -1827,7 +1827,7 @@ More information can be found in the [troubleshooting](#list-configuration-objec
#### <a id="cli-command-pki"></a> Cli command: Pki
Provides the cli commands to
Provides the CLI commands to
* generate a new local CA
* generate a new CSR or self-signed certificate
@ -1836,7 +1836,7 @@ Provides the cli commands to
* request a signed certificate from the master
* generate a new ticket for the client setup
This functionality is used by the [node setup/wizard](#cli-command-pki) cli commands too.
This functionality is used by the [node setup/wizard](#cli-command-pki) CLI commands too.
# icinga2 pki --help
icinga2 - The Icinga 2 network monitoring daemon (version: v2.1.1-299-gf695275)
@ -1877,7 +1877,7 @@ cleared after review.
> **Note**
>
> The cli command `repository` only supports basic configuration manipulation (add, remove)
> The CLI command `repository` only supports basic configuration manipulation (add, remove)
> and a limited set of objects required for the [remote client] integration. Future
> versions will support more options (set, etc.).
>
@ -1961,9 +1961,9 @@ Lists all configured variables (constants) in a similar fasion like [object list
Icinga 2 provides configuration files for some commonly used features. These
are installed in the `/etc/icinga2/features-available` directory and can be
enabled and disabled using the `icinga2 feature enable` and `icinga2 feature disable`
[cli commands](#cli-command-feature), respectively.
[CLI commands](#cli-command-feature), respectively.
The `icinga2 feature enable` cli command creates symlinks in the
The `icinga2 feature enable` CLI command creates symlinks in the
`/etc/icinga2/features-enabled` directory which is included by default
in the example configuration file.
@ -2012,8 +2012,8 @@ Validate the configuration with the init script option `checkconfig`:
> **Note**
>
> Using [Systemd](#systemd-service) you need to manually validate the configuration using
> the cli command below.
> Using [systemd](#systemd-service) you need to manually validate the configuration using
> the CLI command below.
Or manually passing the `-C` argument:
@ -2041,7 +2041,7 @@ Or manually passing the `-C` argument:
If you encouter errors during configuration validation, please make sure
to read the [troubleshooting](#troubleshooting) chapter.
You can also use the [cli command](#cli-command-object) `icinga2 object list`
You can also use the [CLI command](#cli-command-object) `icinga2 object list`
after validation passes to analyze object attributes, inheritance or created
objects by apply rules.
Find more on troubleshooting with `object list` in [this chapter](#list-configuration-objects).

View File

@ -37,12 +37,6 @@ Here is an example of a host object which defines two child services:
The example creates two services `ping4` and `http` which belong to the
host `my-server1`.
> **Note**
>
> When using [apply](#using-apply) rules, a service apply definition will
> implicitely create a relationship to each host by setting the `host_name`
> attribute.
It also specifies that the host should perform its own check using the `hostalive`
check command.
@ -254,7 +248,7 @@ dictionaries](#using-apply-for) for example provided by
> **Tip**
>
> Building configuration in that dynamic way requires detailed information
> of the generated objects. Use the `object list` [cli command](#cli-command-object)
> of the generated objects. Use the `object list` [CLI command](#cli-command-object)
> after successful [configuration validation](#config-validation).
@ -443,7 +437,7 @@ This can be achieved by wrapping them into the [string()](#function-calls) funct
> **Tip**
>
> Building configuration in that dynamic way requires detailed information
> of the generated objects. Use the `object list` [cli command](#cli-command-object)
> of the generated objects. Use the `object list` [CLI command](#cli-command-object)
> after successful [configuration validation](#config-validation).

View File

@ -7,7 +7,7 @@ Icinga 2 uses its own unique and secure communitication protol amongst instances
Be it an High-Availability cluster setup, distributed load-balanced setup or just a single
agent [monitoring a remote client](#icinga2-remote-client-monitoring).
All communication is secured by SSL x509, and fully supports IPv4 and IPv6.
All communication is secured by TLS with certificates, and fully supports IPv4 and IPv6.
If you are planning to use the native Icinga 2 cluster feature for distributed
monitoring and high-availability, please continue reading in
@ -82,7 +82,7 @@ Your master setup requires the following
* Enabled API feature, and a local Endpoint and Zone object configuration
* Firewall ACLs for the communication port (default 5665)
You can use the [cli command](#cli-command-node) `node wizard` for setting up a new node
You can use the [CLI command](#cli-command-node) `node wizard` for setting up a new node
on the master. The command must be run as root, all Icinga 2 specific files
will be updated to the icinga user the daemon is running as (certificate files
for example).
@ -148,7 +148,7 @@ The setup wizard does not automatically restart Icinga 2.
## <a id="icinga2-remote-monitoring-client"></a> Client Setup for Remote Monitoring
Icinga 2 can be installed on Linux/Unix and Windows. While
[Linux/Unix](#icinga2-remote-monitoring-client-linux) will be using the [cli command](#cli-command-node)
[Linux/Unix](#icinga2-remote-monitoring-client-linux) will be using the [CLI command](#cli-command-node)
`node wizard` for a guided setup, you will need to use the
graphical installer for Windows based client setup.
@ -213,7 +213,7 @@ are fulfilled, or that you're using [manual SSL certificate generation](#manual-
> You don't need any features (DB IDO, Livestatus) or user interfaces on the remote client.
> Install them only if you're planning to use them.
Once the package installation succeeded, use the `node wizard` cli command to install
Once the package installation succeeded, use the `node wizard` CLI command to install
a new Icinga 2 node as client setup.
You'll need the following configuration details:
@ -455,7 +455,7 @@ This is considered as independant satellite using a local scheduler, configurati
and the possibility to add Icinga 2 features on demand.
Local configured checks are transferred to the central master and helped
with discovery cli commands.
with discovery CLI commands.
Please follow the instructions closely in order to deploy your fully featured
client, or `agent` as others might call it.
@ -472,11 +472,11 @@ The following convention applies to remote clients:
The default setup routine will install a new host based on your FQDN in `repository.d/hosts` with all
services in separate configuration files a directory underneath.
The repository can be managed using the cli command `repository`.
The repository can be managed using the CLI command `repository`.
> **Note**
>
> The cli command `repository` only supports basic configuration manipulation (add, remove). Future
> The CLI command `repository` only supports basic configuration manipulation (add, remove). Future
> versions will support more options (set, etc.). Please check the Icinga 2 development roadmap
> for that.
@ -513,7 +513,7 @@ You can control that by calling the `node list` command:
#### <a id="icinga2-remote-monitoring-master-discovery-remove"></a> Remove Discovered Clients
If you don't require a connected agent, you can manually remove it and its discovered hosts and services
using the following cli command:
using the following CLI command:
# icinga2 node remove my-discovered-agent
@ -539,13 +539,13 @@ By default, the following additional configuration is generated:
> **Note**
>
> If there are existing hosts/services defined or modified, the cli command will not overwrite these (modified)
> If there are existing hosts/services defined or modified, the CLI command will not overwrite these (modified)
> configuration files.
>
> If hosts or services disappeared from the client discovery, it will remove the existing configuration objects
> from the config repository.
The `update-config` cli command will fail, if there are uncommitted changes for the
The `update-config` CLI command will fail, if there are uncommitted changes for the
configuration repository.
Please review these changes manually, or clear the commit and try again. This is a
safety hook to prevent unwanted manual changes to be committed by a updating the
@ -561,7 +561,7 @@ After updating the configuration repository, make sure to reload Icinga 2.
# service icinga2 reload
Using Systemd:
Using systemd:
# systemctl reload icinga2.service
@ -1011,7 +1011,7 @@ Before you start deploying, keep the following things in mind:
### <a id="manual-certificate-generation"></a> Manual SSL Certificate Generation
Icinga 2 ships [cli commands](#cli-command-pki) assisting with CA and node certificate creation
Icinga 2 ships [CLI commands](#cli-command-pki) assisting with CA and node certificate creation
for your Icinga 2 distributed setup.
> **Note**

View File

@ -54,7 +54,7 @@ list of popular community sites which host check plugins:
* [Icinga Wiki](https://wiki.icinga.org)
The recommended way of setting up these plugins is to copy them to a common directory
and create an extra global constant, e.g. `CustomPluginDir` in your [constants.conf](#constants-conf)
and create a new global constant, e.g. `CustomPluginDir` in your [constants.conf](#constants-conf)
configuration file:
# cp check_snmp_int.pl /opt/plugins

View File

@ -1,9 +1,5 @@
# <a id="troubleshooting"></a> Icinga 2 Troubleshooting
For a more verbose output of the Icinga 2 daemon increase the
`severity` attribute of the [logs](#logging) to `notice` or
`debug`.
## <a id="troubleshooting-information-required"></a> Which information is required
* Which distribution and version
@ -19,9 +15,12 @@ For a more verbose output of the Icinga 2 daemon increase the
Run Icinga 2 in the foreground with debugging enabled. Specify the console
log severity as an additional parameter argument to `-x`.
# /usr/sbin/icinga2 daemon -c /etc/icinga2/icinga2.conf -x notice
# /usr/sbin/icinga2 daemon -x notice
Additionally you can enable the debug log using
The log level can be one of `critical`, `warning`, `information`, `notice`
and `debug`.
Alternatively you can enable the debug log:
# icinga2 feature enable debuglog
# service icinga2 restart
@ -29,7 +28,7 @@ Additionally you can enable the debug log using
## <a id="list-configuration-objects"></a> List Configuration Objects
The `icinga2 object list` cli command can be used to list all configuration objects and their
The `icinga2 object list` CLI command can be used to list all configuration objects and their
attributes. The tool also shows where each of the attributes was modified.
That way you can also identify which objects have been created from your [apply rules](#apply).
@ -60,7 +59,7 @@ That way you can also identify which objects have been created from your [apply
[...]
You can filter by name or type too.
You can also filter by name and type:
# icinga2 object list --name *ssh* --type Service
Object 'localhost!ssh' of type 'Service':
@ -97,8 +96,8 @@ included using
include <itl>
include <plugins>
in [icinga2.conf](#icinga2-conf). These configurations will be overridden on upgrade, so please
send modifications as proposed patches upstream. The default include path is set to
in the [icinga2.conf](#icinga2-conf) configuration file. These configurations will be overridden
on upgrade, so please send modifications as proposed patches upstream. The default include path is set to
`LocalStateDir + "/share/icinga2/includes"`.
You should add your own command definitions to a new file in `conf.d/` called `commands.conf`
@ -235,27 +234,41 @@ The Icinga 2 packages provide a debug package which must be
installed separately for all involved binaries, like `icinga2-bin`
or `icinga2-ido-mysql`.
# yum install icinga2-debuginfo
# zypper install icinga2-bin-debuginfo icinga2-ido-mysql-debuginfo
Debian/Ubuntu:
# apt-get install icinga2-dbg
Furthermore, boost and gcc require their debug symbols installed as well.
RHEL/CentOS:
Compiled binaries require the `-DCMAKE_BUILD_TYPE=RelWithDebInfo` or
`-DCMAKE_BUILD_TYPE=Debug` cmake build flags.
# yum install icinga2-debuginfo
SLES/openSUSE:
# zypper install icinga2-bin-debuginfo icinga2-ido-mysql-debuginfo
Furthermore, you may also have to install debug symbols for Boost and your C library.
If you're building your own binaries you should use the `-DCMAKE_BUILD_TYPE=Debug` cmake
build flag for debug builds.
### <a id="development-debug-gdb"></a> GDB
Install gdb:
Debian/Ubuntu:
# apt-get install gdb
RHEL/CentOS/Fedora:
# yum install gdb
SLES/openSUSE:
# zypper install gdb
# apt-get install gdb
Install the `boost`, `python` and `icinga2` pretty printers. Absolute paths are required,
so please make sure to update the installation paths accordingly (`pwd`).

File diff suppressed because it is too large Load Diff

1205
doc/8-language-reference.md Normal file

File diff suppressed because it is too large Load Diff

500
doc/9-library-reference.md Normal file
View File

@ -0,0 +1,500 @@
# <a id="library-reference"></a> Library Reference
## <a id="global-functions"></a> Global functions
Function | Description
--------------------------------|-----------------------
regex(pattern, text) | Returns true if the regex pattern matches the text, false otherwise.
match(pattern, text) | Returns true if the wildcard pattern matches the text, false otherwise.
len(value) | Returns the length of the value, i.e. the number of elements for an array or dictionary, or the length of the string in bytes.
union(array, array, ...) | Returns an array containing all unique elements from the specified arrays.
intersection(array, array, ...) | Returns an array containing all unique elements which are common to all specified arrays.
keys(dict) | Returns an array containing the dictionary's keys.
string(value) | Converts the value to a string.
number(value) | Converts the value to a number.
bool(value) | Converts the value to a bool.
random() | Returns a random value between 0 and RAND_MAX (as defined in stdlib.h).
log(value) | Writes a message to the log. Non-string values are converted to a JSON string.
log(severity, facility, value) | Writes a message to the log. `severity` can be one of `LogDebug`, `LogNotice`, `LogInformation`, `LogWarning`, and `LogCritical`. Non-string values are converted to a JSON string.
exit(integer) | Terminates the application.
## <a id="math-object"></a> Math object
The global `Math` object can be used to access a number of mathematical constants
and functions.
### <a id="math-e"></a> Math.E
Euler's constant.
### <a id="math-ln2"></a> Math.LN2
Natural logarithm of 2.
### <a id="math-ln10"></a> Math.LN10
Natural logarithm of 10.
### <a id="math-log2e"></a> Math.LOG2E
Base 2 logarithm of E.
### <a id="math-pi"></a> Math.PI
The mathematical constant Pi.
### <a id="math-sqrt1_2"></a> Math.SQRT1_2
Square root of 1/2.
### <a id="math-sqrt2"></a> Math.SQRT2
Square root of 2.
### <a id="math-abs"></a> Math.abs
Signature:
function abs(x);
Returns the absolute value of `x`.
### <a id="math-acos"></a> Math.acos
Signature:
function acos(x);
Returns the arccosine of `x`.
### <a id="math-asin"></a> Math.asin
Signature:
function asin(x);
Returns the arcsine of `x`.
### <a id="math-atan"></a> Math.atan
Signature:
function atan(x);
Returns the arctangent of `x`.
### <a id="math-atan2"></a> Math.atan2
Signature:
function atan2(y, x);
Returns the arctangent of the quotient of `y` and `x`.
### <a id="math-ceil"></a> Math.ceil
Signature:
function ceil(x);
Returns the smallest integer value not less than `x`.
### <a id="math-cos"></a> Math.cos
Signature:
function cos(x);
Returns the cosine of `x`.
### <a id="math-exp"></a> Math.exp
Signature:
function exp(x);
Returns E raised to the `x`th power.
### <a id="math-floor"></a> Math.floor
Signature:
function floor(x);
Returns the largest integer value not greater than `x`.
### <a id="math-isinf"></a> Math.isinf
Signature:
function isinf(x);
Returns whether `x` is infinite.
### <a id="math-isnan"></a> Math.isnan
Signature:
function isnan(x);
Returns whether `x` is NaN (not-a-number).
### <a id="math-log"></a> Math.log
Signature:
function log(x);
Returns the natural logarithm of `x`.
### <a id="math-max"></a> Math.max
Signature:
function max(...);
Returns the largest argument. A variable number of arguments can be specified.
If no arguments are given -Infinity is returned.
### <a id="math-min"></a> Math.min
Signature:
function min(...);
Returns the smallest argument. A variable number of arguments can be specified.
If no arguments are given +Infinity is returned.
### <a id="math-pow"></a> Math.pow
Signature:
function pow(x, y);
Returns `x` raised to the `y`th power.
### <a id="math-random"></a> Math.random
Signature:
function random();
Returns a pseudo-random number between 0 and 1.
### <a id="math-round"></a> Math.round
Signature:
function round(x);
Returns `x` rounded to the nearest integer value.
### <a id="math-sign"></a> Math.sign
Signature:
function sign(x);
Returns -1 if `x` is negative, 1 if `x` is positive
and 0 if `x` is 0.
### <a id="math-sin"></a> Math.sin
Signature:
function sin(x);
Returns the sine of `x`.
### <a id="math-sqrt"></a> Math.sqrt
Signature:
function sqrt(x);
Returns the square root of `x`.
### <a id="math-tan"></a> Math.tan
Signature:
function tan(x);
Returns the tangent of `x`.
## <a id="number-type"></a> Number type
### <a id="number-to_string"></a> Number#to_string
Signature:
function to_string();
The `to_string` method returns a string representation of the number.
Example:
var example = 7
example.to_string() /* Returns "7" */
## <a id="boolean-type"></a> Boolean type
### <a id="boolean-to_string"></a> Boolean#to_string
Signature:
function to_string();
The `to_string` method returns a string representation of the boolean value.
Example:
var example = true
example.to_string() /* Returns "true" */
## <a id="string-type"></a> String type
### <a id="string-find"></a> String#find
Signature:
function find(str, start);
Returns the zero-based index at which the string `str` was found in the string. If the string
was not found -1 is returned. `start` specifies the zero-based index at which `find` should
start looking for the string (defaults to 0 when not specified).
Example:
"Hello World".find("World") /* Returns 6 */
### <a id="string-len"></a> String#len
Signature
function len();
Returns the length of the string in bytes. Note that depending on the encoding type of the string
this is not necessarily the number of characters.
Example:
"Hello World".len() /* Returns 11 */
### <a id="string-lower"></a> String#lower
Signature:
function lower();
Returns a copy of the string with all of its characters converted to lower-case.
Example:
"Hello World".lower() /* Returns "hello world" */
### <a id="string-upper"></a> String#upper
Signature:
function upper();
Returns a copy of the string with all of its characters converted to upper-case.
Example:
"Hello World".upper() /* Returns "HELLO WORLD" */
### <a id="string-replace"></a> String#replace
Signature:
function replace(search, replacement);
Returns a copy of the string with all occurences of the string specified in `search` replaced
with the string specified in `replacement`.
### <a id="string-split"></a> String#split
Signature:
function split(delimiters);
Splits a string into individual parts and returns them as an array. The `delimiters` argument
specifies the characters which should be used as delimiters between parts.
Example:
"x-7,y".split("-,") /* Returns [ "x", "7", "y" ] */
### <a id="string-substr"></a> String#substr
Signature:
function substr(start, len);
Returns a part of a string. The `start` argument specifies the zero-based index at which the part begins.
The optional `len` argument specifies the length of the part ("until the end of the string" if omitted).
Example:
"Hello World".substr(6) /* Returns "World" */
### <a id="string-to_string"></a> String#to_string
Signature:
function to_string();
Returns a copy of the string.
## <a id="array-type"></a> Array type
### <a id="array-add"></a> Array#add
Signature:
function add(value);
TODO
### <a id="array-clear"></a> Array#clear
Signature:
function clear();
TODO
### <a id="array-clone"></a> Array#clone
function clone();
TODO
### <a id="array-contains"></a> Array#contains
Signature:
function contains(value);
TODO
### <a id="array-len"></a> Array#len
Signature:
function len();
TODO
### <a id="array-remove"></a> Array#remove
Signature:
function remove(index);
TODO
### <a id="array-set"></a> Array#set
Signature:
function set(index, value);
TODO
### <a id="array-sort"></a> Array#sort
Signature:
function sort(less_cmp);
Returns a copy of the array where all items are sorted. The items are
compared using the `<` (less-than) operator. A custom comparator function
can be specified with the `less_cmp` argument.
## <a id="dictionary-type"></a> Dictionary type
### <a id="dictionary-clone"></a> Dictionary#clone
Signature:
function clone();
TODO
### <a id="dictionary-contains"></a> Dictionary#contains
Signature:
function contains(key);
TODO
### <a id="dictionary-len"></a> Dictionary#len
Signature:
function len();
TODO
### <a id="dictionary-remove"></a> Dictionary#remove
Signature:
function remove(key);
TODO
### <a id="dictionary-set"></a> Dictionary#set
Signature:
function set(key, value);
TODO
## <a id="scriptfunction-type"></a> ScriptFunction type
### <a id="scriptfunction-call"></a> ScriptFunction#call
Signature:
function call(thisArg, ...);
Invokes the function using an alternative `this` scope. The `thisArg` argument specifies the `this`
scope for the function. All other arguments are passed directly to the function.
Example:
function set_x(val) {
this.x = val
}
dict = {}
set_x.call(dict, 7) /* Invokes set_x using `dict` as `this` */
### <a id="scriptfunction-callv"></a> ScriptFunction#callv
Signature:
function call(thisArg, args);
Invokes the function using an alternative `this` scope. The `thisArg` argument specifies the `this`
scope for the function. The items in the `args` array are passed to the function as individual arguments.
Example:
function set_x(val) {
this.x = val
}
var dict = {}
var args = [ 7 ]
set_x.callv(dict, args) /* Invokes set_x using `dict` as `this` */

View File

@ -49,9 +49,9 @@ static double MathAtan(double x)
return std::atan(x);
}
static double MathAtan2(double x, double y)
static double MathAtan2(double y, double x)
{
return std::atan2(x, y);
return std::atan2(y, x);
}
static double MathCeil(double x)