Icinga 2.2.4
BIt of a strange issue...
I have a custom probe that returns perfdata from a service check.
When looking at the debug logs, the command is executed no problem, and
when run by itself returns the proper output (using the pipe operator to
separate command output from perfdata):
OK|hithere
The output field of icinga_servicechecks is filled in by the first value in
the returned string. However, the perfdata is not flowing through to the
query.
Am I returning perfdata correctly in my probe, using the pipe operator?
I've tested explicitly setting 'enabled_perfdata' for the services with no
effect (as this is default true anyways).
Configuration is:
object Host "Test" {
display_name = "Site Test"
address = "testsite.com"
check_command = "dummy"
max_check_attempts = 1
vars.network_device_id = 12346
}
object Service "Gather_Stats" {
host_name = "Test"
check_command = "gather_stats"
check_interval = 5m
retry_interval = 1m
max_check_attempts = 15
vars.network_interface_id = 523
}
object CheckCommand "gather_stats" {
import "plugin-check-command"
command = "/usr/local/bin/gather_stats.sh $host.address$"
}
Debug output:
[2015-02-16 18:18:48 -0500] notice/Process: PID 3852 ('sh' '-c'
'/usr/local/bin/agilink_gather_stats.php 'site.com'') terminated with exit
code 0
[2015-02-16 18:18:48 -0500] debug/DbEvents: add service check history for
'Test!Gather_Stats'
[2015-02-16 18:18:48 -0500] debug/DbObject: Updating object vars for
'Test!Gather_Stats'
[2015-02-16 18:18:48 -0500] debug/DbObject: object customvar key:
'network_interface_id' value: '523' overridden: 0
[2015-02-16 18:18:48 -0500] debug/IdoPgsqlConnection: Query: INSERT INTO
icinga_servicechecks (check_type, command_line, command_object_id,
current_check_attempt, end_time, end_time_usec, endpoint_object_id,
execution_time, instance_id, latency, long_output, max_check_attempts,
output, perfdata, return_code, service_object_id, start_time,
start_time_usec, state, state_type) VALUES (E'0',
E'/usr/local/bin/gather_stats.sh ''site.com''', 3, E'1',
TO_TIMESTAMP(1424128729), E'527137', 1, E'1.1923069953918457', 1, E'0',
E'', E'15', E'OK', E'', E'0', 74, TO_TIMESTAMP(1424128728), E'334830',
E'0', E'1')
[2015-02-16 18:18:48 -0500] debug/DbObject: Endpoint node: '
tor-monitor-dev1.colonynetworks.com' status update for 'Test!Gather_Stats'
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users