@@ -833,3 +833,231 @@ object CheckCommand "printer_health" {
833
833
vars.printer_health_hostname = "$check_address$"
834
834
vars.printer_health_mode = "supplies-status"
835
835
}
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