Add 'disk_smb' Plugin CheckCommand definition

fixes #9254
This commit is contained in:
Michael Friedrich 2015-05-12 14:45:10 +02:00
parent 01729087e9
commit 364a0888a5
2 changed files with 83 additions and 15 deletions

View File

@ -183,6 +183,27 @@ disk_timeout | **Optional.** Seconds before connection times out (defa
disk_units | **Optional.** Choose bytes, kB, MB, GB, TB (default: MB).
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
@ -839,7 +860,7 @@ users_cgreater | **Optional.** The user count critical threshold. Defaults to 5
To allow a basic monitoring of Windows clients Icinga 2 comes with a set of Windows only plugins. While trying to mirror the functionalities of their linux cousins from the monitoring-plugins package, the differences between Windows and Linux are too big to be able use the same CheckCommands for both systems.
A check-commands-windows.conf comes with Icinga 2, it asumes that the Windows Plugins are installed in the PluginDir set in your constants.conf. To enable them the following include directive is needed in you icinga2.conf:
include <windows-plugins>
One of the differences between the Windows plugins and their linux counterparts is that they consistently do not require thresholds to run, functioning like dummies without.
@ -859,7 +880,7 @@ Threshold | Meaning
## <a id="windows-plugins-disk-windows"></a>disk-windows
Check command object for the `check_disk.exe` plugin.
Check command object for the `check_disk.exe` plugin.
Aggregates the free disk space of all volumes and mount points it can find, or the ones defined in `disk_win_path`. Ignores removable storage like fash drives and discs (CD, DVD etc.).
Custom attributes:
@ -874,7 +895,7 @@ disk\_win\_unit | **Optional**. Use this unit to display disk space, thresholds
## <a id="windows-plugins-load-windows"></a>load-windows
Check command object for the `check_load.exe` plugin.
Check command object for the `check_load.exe` plugin.
This plugin collects the inverse of the performance counter `\Processor(_Total)\% Idle Time` two times, with a wait time of one second between the collection. To change this wait time use [`perfmon-windows`](7-icinga-template-library.md#windows-plugins-load-windows).
Custom attributes:
@ -887,7 +908,7 @@ load\_win\_crit | **Optional**. The critical threshold.
## <a id="windows-plugins-memory-windows"></a>memory-windows
Check command object for the `check_memory.exe` plugin.
Check command object for the `check_memory.exe` plugin.
The memory collection is instant.
Custom attributes:
@ -901,7 +922,7 @@ memory\_win\_unit | **Optional**. The unit to display the received value in, thr
## <a id="windows-plugins-network-windows"></a>network-windows
Check command object for the `check_network.exe` plugin.
Check command object for the `check_network.exe` plugin.
Collects the total Bytes inbount and outbound for all interfaces in one second, to itemise interfaces or use a different collection interval use [`perfmon-windows`](7-icinga-template-library.md#windows-plugins-load-windows).
Custom attributes:
@ -914,7 +935,7 @@ network\_win\_crit | **Optional**. The critical threshold.
## <a id="windows-plugins-permon-windows"></a>perfmon-windows
Check command object for the `check_perfmon.exe` plugin.
Check command object for the `check_perfmon.exe` plugin.
This plugins allows to collect data from a Performance Counter. After the first data collection a second one is done after `perfmon_win_wait` milliseconds. When you know `perfmon_win_counter` only requires one set of data to provide valid data you can set `perfmon_win_wait` to `0`.
To recieve a list of possible Performance Counter Objects run `check_perfmon.exe --print-objects` and to view an objects instances and counters run `check_perfmon.exe --print-object-info -P "name of object"`
@ -932,7 +953,7 @@ perfmon\_win\_type | **Optional**. Format in which to expect perfomance value
## <a id="windows-plugins-ping-windows"></a>ping-windows
Check command object for the `check_ping.exe` plugin.
Check command object for the `check_ping.exe` plugin.
ping-windows should automaticly detect whether `ping_win_address` is an IPv4 or IPv6 address, if not use ping4-windows and ping6-windows. Also note that check\_ping.exe waits at least `ping_win_timeout` milliseconds between the pings.
Custom attributes:
@ -948,7 +969,7 @@ ping\_win\_timeout | **Optional**. The timeout in milliseconds. Default: 1000
## <a id="windows-plugins-procs-windows"></a>procs-windows
Check command object for `check_procs.exe` plugin.
Check command object for `check_procs.exe` plugin.
When useing `procs_win_user` this plugins needs adminstratice privileges to access the processes of other users, to just enumerate them no additional privileges are required.
Custom attributes:
@ -962,7 +983,7 @@ procs\_win\_user | **Optional**. Count this useres processes.
## <a id="windows-plugins-service-windows"></a>service-windows
Check command object for `check_service.exe` plugin.
Check command object for `check_service.exe` plugin.
This checks thresholds work different since the binary decision whether a service is running or not does not allow for three states. As a default `check_service.exe` will return CRITICAL when `service_win_service` is not running, the `service_win_warn` flag changes this to WARNING.
Custom attributes:
@ -975,7 +996,7 @@ service\_win\_service | **Required**. The critical threshold.
## <a id="windows-plugins-swap-windows"></a>swap-windows
Check command object for `check_swap.exe` plugin.
Check command object for `check_swap.exe` plugin.
The data collection is instant.
Custom attributes:
@ -990,7 +1011,7 @@ swap\_win\_unit | **Optional**. The unit to display the received value in, thres
## <a id="windows-plugins-update-windows"></a>update-windows
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:
@ -1003,7 +1024,7 @@ update\_win\_reboot | Set to treat 'may need update' as 'definitely needs update
## <a id="windows-plugins-uptime-windows"></a>uptime-windows
Check command opject for `check_uptime.exe` plugin.
Check command opject for `check_uptime.exe` plugin.
Uses GetTickCount64 to get the uptime, so boot time is not included.
Custom attributes:
@ -1017,7 +1038,7 @@ uptime\_win\_unit | **Optional**. The unit to display the received value in, thr
## <a id="windows-plugins-users-windows"></a>users-windows
Check command object for `check_users.exe` plugin.
Check command object for `check_users.exe` plugin.
Custom attributes:
@ -1035,7 +1056,7 @@ You can enable these check commands by adding the following the include directiv
[icinga2.conf](5-configuring-icinga-2.md#icinga2-conf) configuration file:
include <nscp>
You can also optionally specify an alternative installation directory for NSClient++ by adding
the NscpPath constant in your [constants.conf](5-configuring-icinga-2.md#constants-conf) configuration
file:
@ -3536,4 +3557,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_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.

View File

@ -775,6 +775,54 @@ object CheckCommand "disk" {
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" {
import "plugin-check-command"