Add 'disk_smb' Plugin CheckCommand definition

fixes #9254
This commit is contained in:
Michael Friedrich 2015-05-12 14:45:10 +02:00
parent 669317f169
commit 0baf27805f
2 changed files with 84 additions and 16 deletions

View File

@ -172,6 +172,27 @@ disk_timeout | **Optional.** Seconds before connection times out (defa
disk_units | **Optional.** Choose bytes, kB, MB, GB, TB (default: MB). disk_units | **Optional.** Choose bytes, kB, MB, GB, TB (default: MB).
disk_exclude_type | **Optional.** Ignore all filesystems of indicated type (may be repeated). disk_exclude_type | **Optional.** Ignore all filesystems of indicated type (may be repeated).
## <a id="plugin-check-command-disk-smb"></a> disk_smb
Check command object for the `check_disk_smb` plugin.
> **Note**
>
> `disk_smb_wused` and `disk_smb_cused` require the percent sign. If omitted, disk units can be used.
Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
Name | Description
------------------------|------------------------
disk_smb_hostname | **Required.** NetBIOS name of the server.
disk_smb_share | **Required.** Share name being queried.
disk_smb_workgroup | **Optional.** Workgroup or Domain used (defaults to 'WORKGROUP' if omitted).
disk_smb_address | **Optional.** IP address of the host (only necessary if host belongs to another network).
disk_smb_username | **Optional.** Username for server log-in (defaults to 'guest' if omitted).
disk_smb_password | **Optional.** Password for server log-in (defaults to an empty password if omitted).
disk_smb_wused | **Optional.** The used space warning threshold. Defaults to "85%". If the percent sign is omitted, use optional disk units.
disk_smb_cused | **Optional.** The used space critical threshold. Defaults to "95%". If the percent sign is omitted, use optional disk units.
disk_smb_port | **Optional.** Connection port, e.g. `139` or `445`. Defaults to `smbclient` default if omitted.
## <a id="plugin-check-command-dns"></a> dns ## <a id="plugin-check-command-dns"></a> dns
@ -963,7 +984,7 @@ swap\_win\_unit | **Optional**. The unit to display the received value in, thres
## <a id="windows-plugins-update-windows"></a>update-windows ## <a id="windows-plugins-update-windows"></a>update-windows
Check command object for `check_update.exe`plugin. Check command object for `check_update.exe` plugin.
Querying Microsoft for Windows updates can take multiple seconds to minutes. An update is treated as important when it has the WSUS flag for SecurityUpdates or CriticalUpdates. Querying Microsoft for Windows updates can take multiple seconds to minutes. An update is treated as important when it has the WSUS flag for SecurityUpdates or CriticalUpdates.
Custom attributes: Custom attributes:
@ -3478,4 +3499,3 @@ vmware_username | **Optional.** The username to connect to Host or vCent
vmware_password | **Optional.** The username's password. No value defined as default. vmware_password | **Optional.** The username's password. No value defined as default.
vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined <br> **Autentication file content:** <br> username=vmuser <br> password=p@ssw0rd vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined <br> **Autentication file content:** <br> username=vmuser <br> password=p@ssw0rd
vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\<br\>** for the GUI. No value defined as default. vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\<br\>** for the GUI. No value defined as default.

View File

@ -775,6 +775,54 @@ object CheckCommand "disk" {
vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"] vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"]
} }
object CheckCommand "disk_smb" {
import "plugin-check-command"
command = [ PluginDir + "/check_disk_smb" ]
arguments = {
"-H" = {
value = "$disk_smb_hostname$"
description = "NetBIOS name of the server."
}
"-s" = {
value = "$disk_smb_share$"
description = "Share name to be tested."
}
"-W" = {
value = "$disk_smb_workgroup$"
description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
}
"-a" = {
value = "$disk_smb_address$"
description = "IP-address of HOST (only necessary if HOST is in another network)."
}
"-u" = {
value = "$disk_smb_username$"
description = "Username to log in to server. (Defaults to 'guest' if omitted)."
}
"-p" = {
value = "$disk_smb_password$"
description = "Password to log in to server. (Defaults to an empty password if omitted)."
}
"-w" = {
value = "$disk_smb_wused$"
description = "Percent of used space at which a warning will be generated (Default: 85%)."
}
"-c" = {
value = "$disk_smb_cused$"
description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
}
"-P" = {
value = "$disk_smb_port$"
description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
}
}
vars.disk_smb_wused = "85%"
vars.disk_smb_cused = "95%"
}
object CheckCommand "users" { object CheckCommand "users" {
import "plugin-check-command" import "plugin-check-command"