Having a bit of an issue with creating a specific service check

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.


Do you know check_activeMQ? We are using it and it works like a charm.

I’m aware of that check, but I’m not aware if it’s possible for us to use.

We have two instances which are active and passive. Is there any good way to handle that scenario?

I think @KevinHonka can answer your question.

I’m totally up to using that check for our ActiveMQ monitoring because our intention with switching to Icinga was from the very beginning to have as much as possible without this kind of special solutions.

With that said, there is a “complexity” in our monitoring that we have a master and a slave in our ActiveMQ enviroment which makes it a bit trickier until I know how to handle the situation.

Luckily I got the home-made checks to work yesterday. But nobody would be happier than me if I could find a better practice with existing checks.