Hi guys,
I’m having a bit of trouble creating a check towards our ActiveMQ instances.
To get to the point directly I’m trying to run a wrapper script that calls for check_json with an argument that doesn’t work on Icinga, but it works manually on the server.
The wrapper accepts the following command line: check_activemq_wrapper_checkJson.sh host1+host2 “:port/:port/path/to/count” “1:” “1:”
Program Version: 2.11.3-1
Director version: 1.7.2
This is how it’s set up in Director:
The preview looks like this:
object CheckCommand “check_activemq_json” {
import “plugin-check-command”
command = [ PluginDir + “/check_activemq_wrapper_checkJson.sh” ]
arguments += {
“(no key)” = {
description = “Provide arguments for the check.”
order = 1
required = true
skip_key = true
value = “$amq_json_args$”
}
}
}
The template for the service looks like this:
template Service “Check ActiveMQ json” {
check_command = “check_activemq_json”
max_check_attempts = “4”
check_interval = 5m
retry_interval = 1m
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
enable_event_handler = true
enable_flapping = true
enable_perfdata = true
try { // This setting is only available in Icinga >= 2.8.0
flapping_threshold_high = 20
} except { globals.directorWarnOnceForThresholds() }
try { // This setting is only available in Icinga >= 2.8.0
flapping_threshold_low = 5
} except { globals.directorWarnOnceForThresholds() }
}
The preview for the actual service check looks like this:
object Service “Check service activemq service.name consumercount” {
host_name = “ActiveMQ Queues”
import “Check ActiveMQ json”
vars.amq_json_args = "host1+host2 \":port/path/to/count\" \"1:\" \"1:\""
}
It responds that it tries to run on port 80, which is incorrect, another port is provided in the argument, but it won’t have it at all.
BR
Michael