Skip to content

Commit 26588f5

Browse files
authored
Merge pull request #8683 from BausPhi/feature/command-template-thola
Add ITL CheckCommands for Thola
2 parents 8af66ce + 0b27c2a commit 26588f5

File tree

2 files changed

+369
-0
lines changed

2 files changed

+369
-0
lines changed

doc/10-icinga-template-library.md

+141
Original file line numberDiff line numberDiff line change
@@ -3278,6 +3278,147 @@ printer_health_oids | **Optional.** A list of oids which are downloaded and wri
32783278
printer_health_offline | **Optional.** The maximum number of seconds since the last update of cache file before it is considered too old.
32793279
printer_health_multiline | **Optional.** Multiline output
32803280

3281+
#### Thola <a id="plugin-contrib-command-thola"></a>
3282+
3283+
The [Thola](https://thola.io) plugin
3284+
is a tool for monitoring network devices, that mainly uses SNMP.
3285+
3286+
To run these commands you need a server that is running the Thola API.
3287+
If you don't know how to do this, you can have a look at the plugin's
3288+
[documentation](https://docs.thola.io). Also, you have to
3289+
put the Thola-client binary into the `PluginContribDir`.
3290+
3291+
##### thola-cpu-load <a id="plugin-contrib-command-thola-cpu-load"></a>
3292+
3293+
Checks the CPU load of a network device.
3294+
3295+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3296+
3297+
Name | Description
3298+
-------------------------------|--------------------------------------------------------
3299+
thola_api_address | **Required.** Address of the Thola API to connect to
3300+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise.
3301+
thola_device_snmp_community | **Optional.** SNMP community of the device
3302+
thola_device_snmp_protocol | **Optional.** SNMP version to use
3303+
thola_cpu_load_critical | **Optional.** Critical threshold for the CPU load in %
3304+
thola_cpu_load_warning | **Optional.** Warning threshold for the CPU load in %
3305+
3306+
##### thola-interface-metrics <a id="plugin-contrib-command-thola-interface-metrics"></a>
3307+
3308+
Checks the interface metrics of a network device.
3309+
3310+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3311+
3312+
Name | Description
3313+
--------------------------------|-----------------------------------------------------
3314+
thola_api_address | **Required.** Address of the Thola API to connect to
3315+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise
3316+
thola_device_snmp_community | **Optional.** SNMP community of the device
3317+
3318+
##### thola-hardware-health <a id="plugin-contrib-command-thola-hardware-health"></a>
3319+
3320+
Checks the hardware health of a network device.
3321+
3322+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3323+
3324+
Name | Description
3325+
------------------------------|-----------------------------------------------------
3326+
thola_api_address | **Required.** Address of the Thola API to connect to
3327+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise
3328+
thola_device_snmp_community | **Optional.** SNMP community of the device
3329+
3330+
##### thola-identify <a id="plugin-contrib-command-thola-identify"></a>
3331+
3332+
Checks if a device can be identified by the given properties.
3333+
3334+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3335+
3336+
Name | Description
3337+
-----------------------------------|--------------------------------------------------------------------------------
3338+
thola_api_address | **Required.** Address of the Thola API to connect to
3339+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise
3340+
thola_device_snmp_community | **Optional.** SNMP community of the device
3341+
thola_identify_model | **Optional.** Model that is compared to the actual model of the device
3342+
thola_identify_os_version | **Optional.** OS-version that is compared to the actual OS-version of the device
3343+
thola_identify_vendor | **Optional.** Vendor that is compared to the actual vendor of the device
3344+
thola_identify_serial_number | **Optional.** Serial number that is compared to the actual serial number of the device
3345+
thola_identify_discover_retries | **Optional.** The number of discover retries before aborting
3346+
thola_identify_discover_timeouts | **Optional.** The number of discover timeouts before aborting
3347+
3348+
> **Note**:
3349+
>
3350+
> One of the variables `thola_identify_model`, `thola_identify_os_version`,
3351+
> `thola_identify_vendor` or `thola_identify_serial_number` must be set
3352+
3353+
##### thola-memory-usage <a id="plugin-contrib-command-thola-memory-usage"></a>
3354+
3355+
Checks the memory usage of a device.
3356+
3357+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3358+
3359+
Name | Description
3360+
-------------------------------|-----------------------------------------------------
3361+
thola_api_address | **Required.** Address of the Thola API to connect to
3362+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise
3363+
thola_device_snmp_community | **Optional.** SNMP community of the device
3364+
thola_memory_usage_critical | **Optional.** Critical threshold for the memory usage in %
3365+
thola_memory_usage_warning | **Optional.** Warning threshold for the memory usage in %
3366+
3367+
##### thola-sbc <a id="plugin-contrib-command-thola-sbc"></a>
3368+
3369+
Checks special metrics from sbc network devices.
3370+
3371+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3372+
3373+
Name | Description
3374+
-----------------------------------------|-----------------------------------------------------------
3375+
thola_api_address | **Required.** Address of the Thola API to connect to
3376+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise
3377+
thola_device_snmp_community | **Optional.** SNMP community of the device
3378+
thola_sbc_system_health_score_critical | **Optional.** Critical threshold for the health score in %
3379+
thola_sbc_system_health_score_warning | **Optional.** Warning threshold for the health score in %
3380+
3381+
##### thola-thola-server <a id="plugin-contrib-command-thola-thola-server"></a>
3382+
3383+
Checks if a Thola API is running on a given server.
3384+
3385+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3386+
3387+
Name | Description
3388+
--------------------|-----------------------------------------------------
3389+
thola_api_address | **Required.** Address of the Thola API to connect to
3390+
3391+
##### thola-ups <a id="plugin-contrib-command-thola-ups"></a>
3392+
3393+
Checks whether a UPS device has its main voltage applied.
3394+
3395+
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
3396+
3397+
Name | Description
3398+
--------------------------------------------|-----------------------------------------------------------------
3399+
thola_api_address | **Required.** Address of the Thola API to connect to
3400+
thola_device_address | **Required.** The host's address. Defaults to "$address$" if the host's address attribute is set, “$address6$” otherwise
3401+
thola_device_snmp_community | **Optional.** SNMP community of the device
3402+
thola_ups_batt_current_critical_max | **Optional.** High critical threshold for the battery current in Volt
3403+
thola_ups_batt_current_critical_min | **Optional.** Low critical threshold for the battery current in Volt
3404+
thola_ups_batt_current_warning_max | **Optional.** High warning threshold for the battery current in Volt
3405+
thola_ups_batt_current_warning_min | **Optional.** Low warning threshold for the battery current in Volt
3406+
thola_ups_batt_temperature_critical_max | **Optional.** High critical threshold for the battery temperature in degree celsius
3407+
thola_ups_batt_temperature_critical_min | **Optional.** Low critical threshold for the battery temperature in degree celsius
3408+
thola_ups_batt_temperature_warning_max | **Optional.** High warning threshold for the battery temperature in degree celsius
3409+
thola_ups_batt_temperature_warning_min | **Optional.** Low warning threshold for the battery temperature in degree celsius
3410+
thola_ups_current_load_critical_max | **Optional.** High critical threshold for the current load in percent
3411+
thola_ups_current_load_critical_min | **Optional.** Low critical threshold for the current load in percent
3412+
thola_ups_current_load_warning_max | **Optional.** High warning threshold for the current load in percent
3413+
thola_ups_current_load_warning_min | **Optional.** Low warning threshold for the current load in percent
3414+
thola_ups_rectifier_current_critical_max | **Optional.** High critical threshold for the current rectifier in Volt
3415+
thola_ups_rectifier_current_critical_min | **Optional.** Low critical threshold for the current rectifier in Volt
3416+
thola_ups_rectifier_current_warning_max | **Optional.** High warning threshold for the current rectifier in Volt
3417+
thola_ups_rectifier_current_warning_min | **Optional.** Low warning threshold for the current rectifier in Volt
3418+
thola_ups_system_voltage_critical_max | **Optional.** High critical threshold for the system voltage in Volt
3419+
thola_ups_system_voltage_critical_min | **Optional.** Low critical threshold for the system voltage in Volt
3420+
thola_ups_system_voltage_warning_max | **Optional.** High warning threshold for the system voltage in Volt
3421+
thola_ups_system_voltage_warning_min | **Optional.** Low warning threshold for the system voltage in Volt
32813422

32823423
### Network Services <a id="plugin-contrib-network-services"></a>
32833424

itl/plugins-contrib.d/network-components.conf

+228
Original file line numberDiff line numberDiff line change
@@ -833,3 +833,231 @@ object CheckCommand "printer_health" {
833833
vars.printer_health_hostname = "$check_address$"
834834
vars.printer_health_mode = "supplies-status"
835835
}
836+
837+
template CheckCommand "generic-thola-check-command" {
838+
command = [ PluginContribDir + "/thola-client", "check" ]
839+
840+
arguments = {
841+
"--target-api" = {
842+
required = true
843+
value = "$thola_api_address$"
844+
description = "Address of the thola API"
845+
}
846+
}
847+
}
848+
849+
template CheckCommand "generic-thola-device-check-command" {
850+
import "generic-thola-check-command"
851+
import "ipv4-or-ipv6"
852+
853+
arguments += {
854+
"thola_device_address" = {
855+
order = 0
856+
required = true
857+
skip_key = true
858+
value = "$thola_device_address$"
859+
description = "IP address of target device"
860+
}
861+
"--snmp-community" = {
862+
value = "$thola_device_snmp_community$"
863+
description = "SNMP Community of target device"
864+
}
865+
"--snmp-version" = {
866+
value = "$thola_device_snmp_protocol$"
867+
description = "SNMP Version of target device"
868+
}
869+
}
870+
871+
vars.thola_device_address = "$check_address$"
872+
}
873+
874+
object CheckCommand "thola-cpu-load" {
875+
import "generic-thola-device-check-command"
876+
877+
command += [ "cpu-load" ]
878+
879+
arguments += {
880+
"--critical" = {
881+
value = "$thola_cpu_load_critical$"
882+
description = "Critical threshold for the CPU load in %"
883+
}
884+
"--warning" = {
885+
value = "$thola_cpu_load_warning$"
886+
description = "Warning threshold for the CPU load in %"
887+
}
888+
}
889+
}
890+
891+
object CheckCommand "thola-interface-metrics" {
892+
import "generic-thola-device-check-command"
893+
894+
command += [ "interface-metrics" ]
895+
}
896+
897+
object CheckCommand "thola-hardware-health" {
898+
import "generic-thola-device-check-command"
899+
900+
command += [ "hardware-health" ]
901+
}
902+
903+
object CheckCommand "thola-identify" {
904+
import "generic-thola-device-check-command"
905+
906+
command += [ "identify" ]
907+
908+
arguments += {
909+
"--model" = {
910+
value = "$thola_identify_model$"
911+
description = "Model that is compared to the actual model of the device"
912+
}
913+
"--os-version" = {
914+
value = "$thola_identify_os_version$"
915+
description = "OS-version that is compared to the actual OS-version of the device"
916+
}
917+
"--vendor" = {
918+
value = "$thola_identify_vendor$"
919+
description = "Vendor that is compared to the actual vendor of the device"
920+
}
921+
"--serial-number" = {
922+
value = "$thola_identify_serial_number$"
923+
description = "Serial number that is compared to the actual serial number of the device"
924+
}
925+
"--snmp-discover-retries" = {
926+
value = "$thola_identify_discover_retries$"
927+
description = "Number of discover retries"
928+
}
929+
"--snmp-discover-timeout" = {
930+
value = "$thola_identify_discover_timeouts$"
931+
description = "Number of discover timeouts"
932+
}
933+
}
934+
}
935+
936+
object CheckCommand "thola-memory-usage" {
937+
import "generic-thola-device-check-command"
938+
939+
command += [ "memory-usage" ]
940+
941+
arguments += {
942+
"--critical" = {
943+
value = "$thola_memory_usage_critical$"
944+
description = "Critical threshold for the memory usage in %"
945+
}
946+
"--warning" = {
947+
value = "$thola_memory_usage_warning$"
948+
description = "Warning threshold for the memory usage in %"
949+
}
950+
}
951+
}
952+
953+
object CheckCommand "thola-sbc" {
954+
import "generic-thola-device-check-command"
955+
956+
command += [ "sbc" ]
957+
958+
arguments += {
959+
"--system-health-score-critical" = {
960+
value = "$thola_sbc_system_health_score_critical$"
961+
description = "Critical threshold for the health score in %"
962+
}
963+
"--system-health-score-warning" = {
964+
value = "$thola_sbc_system_health_score_warning$"
965+
description = "Warning threshold for the health score in %"
966+
}
967+
}
968+
}
969+
970+
object CheckCommand "thola-thola-server" {
971+
import "generic-thola-check-command"
972+
973+
command += [ "thola-server" ]
974+
}
975+
976+
object CheckCommand "thola-ups" {
977+
import "generic-thola-device-check-command"
978+
979+
command += [ "ups" ]
980+
981+
arguments += {
982+
"--batt-current-critical-max" = {
983+
value = "$thola_ups_batt_current_critical_max$"
984+
description = "High critical threshold for the battery current in Volt"
985+
}
986+
"--batt-current-critical-min" = {
987+
value = "$thola_ups_batt_current_critical_min$"
988+
description = "Low critical threshold for the battery current in Volt"
989+
}
990+
"--batt-current-warning-max" = {
991+
value = "$thola_ups_batt_current_warning_max$"
992+
description = "High warning threshold for the battery current in Volt"
993+
}
994+
"--batt-current-warning-min" = {
995+
value = "$thola_ups_batt_current_warning_min$"
996+
description = "Low warning threshold for the battery current in Volt"
997+
}
998+
"--batt-temperature-critical-max" = {
999+
value = "$thola_ups_batt_temperature_critical_max$"
1000+
description = "High critical threshold for the battery temperature in degree celsius"
1001+
}
1002+
"--batt-temperature-critical-min" = {
1003+
value = "$thola_ups_batt_temperature_critical_min$"
1004+
description = "Low critical threshold for the battery temperature in degree celsius"
1005+
}
1006+
"--batt-temperature-warning-max" = {
1007+
value = "$thola_ups_batt_temperature_warning_max$"
1008+
description = "High warning threshold for the battery temperature in degree celsius"
1009+
}
1010+
"--batt-temperature-warning-min" = {
1011+
value = "$thola_ups_batt_temperature_warning_min$"
1012+
description = "Low warning threshold for the battery temperature in degree celsius"
1013+
}
1014+
"--current-load-critical-max" = {
1015+
value = "$thola_ups_current_load_critical_max$"
1016+
description = "High critical threshold for the current load in %"
1017+
}
1018+
"--current-load-critical-min" = {
1019+
value = "$thola_ups_current_load_critical_min$"
1020+
description = "Low critical threshold for the current load in %"
1021+
}
1022+
"--current-load-warning-max" = {
1023+
value = "$thola_ups_current_load_warning_max$"
1024+
description = "High warning threshold for the current load in %"
1025+
}
1026+
"--current-load-warning-min" = {
1027+
value = "$thola_ups_current_load_warning_min$"
1028+
description = "Low warning threshold for the current load in %"
1029+
}
1030+
"--rectifier-current-critical-max" = {
1031+
value = "$thola_ups_rectifier_current_critical_max$"
1032+
description = "High critical threshold for the current rectifier in Volt"
1033+
}
1034+
"--rectifier-current-critical-min" = {
1035+
value = "$thola_ups_rectifier_current_critical_min$"
1036+
description = "Low critical threshold for the current rectifier in Volt"
1037+
}
1038+
"--rectifier-current-warning-max" = {
1039+
value = "$thola_ups_rectifier_current_warning_max$"
1040+
description = "High warning threshold for the current rectifier in Volt"
1041+
}
1042+
"--rectifier-current-warning-min" = {
1043+
value = "$thola_ups_rectifier_current_warning_min$"
1044+
description = "Low warning threshold for the current rectifier in Volt"
1045+
}
1046+
"--system-voltage-critical-max" = {
1047+
value = "$thola_ups_system_voltage_critical_max$"
1048+
description = "High critical threshold for the system voltage in Volt"
1049+
}
1050+
"--system-voltage-critical-min" = {
1051+
value = "$thola_ups_system_voltage_critical_min$"
1052+
description = "Low critical threshold for the system voltage in Volt"
1053+
}
1054+
"--system-voltage-warning-max" = {
1055+
value = "$thola_ups_system_voltage_warning_max$"
1056+
description = "High warning threshold for the system voltage in Volt"
1057+
}
1058+
"--system-voltage-warning-min" = {
1059+
value = "$thola_ups_system_voltage_warning_min$"
1060+
description = "Low warning threshold for the system voltage in Volt"
1061+
}
1062+
}
1063+
}

0 commit comments

Comments
 (0)