Skip to content

Commit 9bc9d14

Browse files
authored
Merge pull request #10283 from Icinga/itl-check_ssh-remote-pr9923
Update ITL for check_ssh
2 parents d4b0e08 + a662cb1 commit 9bc9d14

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

doc/10-icinga-template-library.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,13 +1480,15 @@ connects to an SSH server at a specified host and port.
14801480

14811481
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
14821482

1483-
Name | Description
1484-
----------------|--------------
1485-
ssh_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
1486-
ssh_port | **Optional.** The port that should be checked. Defaults to 22.
1487-
ssh_timeout | **Optional.** Seconds before connection times out. Defaults to 10.
1488-
ssh_ipv4 | **Optional.** Use IPv4 connection. Defaults to false.
1489-
ssh_ipv6 | **Optional.** Use IPv6 connection. Defaults to false.
1483+
Name | Description
1484+
--------------------|--------------
1485+
ssh_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
1486+
ssh_port | **Optional.** The port that should be checked. Defaults to 22.
1487+
ssh_timeout | **Optional.** Seconds before connection times out. Defaults to 10.
1488+
ssh_ipv4 | **Optional.** Use IPv4 connection. Defaults to false.
1489+
ssh_ipv6 | **Optional.** Use IPv6 connection. Defaults to false.
1490+
ssh_remote_version | **Optional.** Alert if string doesn't match expected server version (ex: OpenSSH_3.9p1).
1491+
ssh_remote_protocol | **Optional.** Alert if protocol doesn't match expected protocol version (ex: 2.0).
14901492

14911493

14921494
### ssl <a id="plugin-check-command-ssl"></a>

itl/command-plugins.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,14 @@ object CheckCommand "ssh" {
15501550
set_if = "$ssh_ipv6$"
15511551
description = "Use IPv6 connection"
15521552
}
1553+
"-r" = {
1554+
value = "$ssh_remote_version$"
1555+
description = "Alert if string doesn't match expected server version (ex: OpenSSH_3.9p1)"
1556+
}
1557+
"-P" = {
1558+
value = "$ssh_remote_protocol$"
1559+
description = "Alert if protocol doesn't match expected protocol version (ex: 2.0)"
1560+
}
15531561
}
15541562

15551563
vars.ssh_address = "$check_address$"

0 commit comments

Comments
 (0)