Skip to content

Commit

Permalink
Update ITL for check_ssh
Browse files Browse the repository at this point in the history
Adds parameters for check_ssh (-r and -P) based on
nagios-plugins 2.3.3 / monitoring-plugins 2.3
Fixes #9922
  • Loading branch information
MarcusCaepio authored and oxzi committed Jan 8, 2025
1 parent c596371 commit a662cb1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
16 changes: 9 additions & 7 deletions doc/10-icinga-template-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -1480,13 +1480,15 @@ connects to an SSH server at a specified host and port.

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

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


### ssl <a id="plugin-check-command-ssl"></a>
Expand Down
8 changes: 8 additions & 0 deletions itl/command-plugins.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,14 @@ object CheckCommand "ssh" {
set_if = "$ssh_ipv6$"
description = "Use IPv6 connection"
}
"-r" = {
value = "$ssh_remote_version$"
description = "Alert if string doesn't match expected server version (ex: OpenSSH_3.9p1)"
}
"-P" = {
value = "$ssh_remote_protocol$"
description = "Alert if protocol doesn't match expected protocol version (ex: 2.0)"
}
}

vars.ssh_address = "$check_address$"
Expand Down

0 comments on commit a662cb1

Please sign in to comment.