I have Icinga2 master and several satellites connected to it. While checks run fine on satellites, I cannot make them execute on master (locally). Checks are stuck in pending state.
Icinga2 version: 2.12.0-1
icinga2 feature list, Enabled features: api checker debuglog gelf ido-mysql mainlog
icinga2 daemon -C shows no issues.
constants.conf:
const PluginDir = "/usr/lib64/nagios/plugins"
const ManubulonPluginDir = "/usr/lib64/nagios/plugins"
const PluginContribDir = "/usr/lib64/nagios/plugins"
const NodeName = "icinga2"
const ZoneName = "icinga2"
const TicketSalt = "***"
zones.conf:
object Endpoint "icinga2" {
}
object Endpoint "endpoint1" {
host ="172.19.37.64"
}
object Endpoint "endpoint2" {
host ="172.19.37.80"
}
object Zone "icinga2" {
endpoints = [ "icinga2" ]
}
object Zone "zone1" {
endpoints = ["endpoint1"]
parent = "icinga2"
}
object Zone "zone2" {
endpoints = ["endpoint2"]
parent = "icinga2"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Check:
curl --request GET \
--url https://icinga:5665/v1/objects/hosts/icinga2_icinga2 \
--header 'Authorization: Basic ***'
{
"results": [
{
"attrs": {
"__name": "icinga2_icinga2",
"acknowledgement": 0.0,
"acknowledgement_expiry": 0.0,
"acknowledgement_last_change": 0.0,
"action_url": "",
"active": true,
"address": "icinga2",
"address6": "",
"check_attempt": 1.0,
"check_command": "hostalive",
"check_interval": 300.0,
"check_period": "",
"check_timeout": "60",
"command_endpoint": "",
"display_name": "icinga2",
"downtime_depth": 0.0,
"enable_active_checks": true,
"enable_event_handler": false,
"enable_flapping": false,
"enable_notifications": true,
"enable_passive_checks": false,
"enable_perfdata": false,
"event_command": "",
"flapping": false,
"flapping_current": 0.0,
"flapping_last_change": 0.0,
"flapping_threshold": 0.0,
"flapping_threshold_high": 30.0,
"flapping_threshold_low": 25.0,
"force_next_check": true,
"force_next_notification": false,
"groups": [],
"ha_mode": 0.0,
"handled": false,
"icon_image": "",
"icon_image_alt": "",
"last_check": -1.0,
"last_check_result": null,
"last_hard_state": 1.0,
"last_hard_state_change": 1621000615.362542,
"last_reachable": true,
"last_state": 1.0,
"last_state_change": 1621000615.362542,
"last_state_down": 0.0,
"last_state_type": 0.0,
"last_state_unreachable": 0.0,
"last_state_up": 0.0,
"max_check_attempts": 3.0,
"name": "icinga2_icinga2",
"next_check": 1621270264.5529125,
"next_update": 1621270564.5529125,
"notes": "",
"notes_url": "",
"original_attributes": null,
"package": "_api",
"paused": false,
"previous_state_change": 1621000615.362542,
"problem": false,
"retry_interval": 60.0,
"severity": 16.0,
"source_location": {
"first_column": 0.0,
"first_line": 1.0,
"last_column": 28.0,
"last_line": 1.0,
"path": "/var/lib/icinga2/api/packages/_api/1b607576-fad4-4000-bded-5b39c9d8747e/conf.d/hosts/icinga2_icinga2.conf"
},
"state": 1.0,
"state_type": 0.0,
"templates": [
"icinga2_icinga2",
"generic-host"
],
"type": "Host",
"vars": {
"check_id": "11ebb1dc-27b2-73a0-f7ee-ac589e7a8ea8",
"id": "11ea651a-a577-ac20-f9a8-b4e9230a519a",
"notification_period": null,
"notification_triggers": "UP, DOWN",
"tag_id": null,
"tag_name": null
},
"version": 1621212234.214861,
"volatile": false,
"zone": "icinga2"
},
"joins": {},
"meta": {},
"name": "icinga2_icinga2",
"type": "Host"
}
]
}
I tried to force the check:
curl --request POST \
--url https://icinga:5665/v1/actions/reschedule-check \
--header 'Accept: application/json' \
--header 'Authorization: Basic ***' \
--data '{
"type": "Host",
"filter": "host.name==\"icinga2_icinga2\"",
"force": true,
"pretty": true
}'
{
"results": [
{
"code": 200.0,
"status": "Successfully rescheduled check for object 'icinga2_icinga2'."
}
]
}
I see next in debuglog:
[2021-05-17 16:25:30 +0000] information/HttpServerConnection: Request: POST /v1/actions/reschedule-check (from [192.168.129.52]:42142), user: root, agent: insomnia/2021.2.2).
[2021-05-17 16:25:30 +0000] debug/HttpUtility: Request body: '{
"type": "Host",
"filter": "host.name==\"icinga2_icinga2\"",
"force": true,
"pretty": true
}'
and then nothing related to this check.
The command looks ok (run as icinga user):
$ /usr/lib64/nagios/plugins/check_ping -4 -H 127.0.0.1 -c 5000,100% -w 3000,80%
PING OK - Packet loss = 0%, RTA = 0.17 ms|rta=0.166000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
This request
curl --request POST \
--url 'https://icinga:5665/v1/events?queue=debugchecks&types=CheckResult&match=(%22icinga2*%22%2Cevent.host)&=' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ***'
hangs forever.
What am I missing? Is there anything else I can check?