If I execute it on the agent:
$ curl -k -s -u xxx:xxx âhttps://agent1.tld:5665/objects/servicesâ
{
"results": []
}
If I execute the same check on the Master
$ curl -k -s -u xxx:xxx âhttps://master.tld:5665/objects/services?service=agent1.tld!diskâ
{
"results": [
{
"attrs": {
"__name": "agent1.tld!disk",
"acknowledgement": 0.0,
"acknowledgement_expiry": 0.0,
"action_url": "",
"active": true,
"check_attempt": 1.0,
"check_command": "disk",
"check_interval": 600.0,
"check_period": "",
"check_timeout": null,
"command_endpoint": "agent1.tld",
"display_name": "disk",
"downtime_depth": 0.0,
"enable_active_checks": true,
"enable_event_handler": true,
"enable_flapping": false,
"enable_notifications": true,
"enable_passive_checks": true,
"enable_perfdata": true,
"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": false,
"force_next_notification": false,
"groups": [],
"ha_mode": 0.0,
"handled": false,
"host_name": "agent1.tld",
"icon_image": "",
"icon_image_alt": "",
"last_check": 1573560339.284133,
"last_check_result": {
"active": true,
"check_source": "agent1.tld",
"command": [
"/usr/lib64/nagios/plugins/check_disk",
"-c",
"92%",
"-w",
"90%",
"-X",
"none",
"-X",
"tmpfs",
"-X",
"sysfs",
"-X",
"proc",
"-X",
"configfs",
"-X",
"devtmpfs",
"-X",
"devfs",
"-X",
"mtmfs",
"-X",
"tracefs",
"-X",
"cgroup",
"-X",
"fuse.gvfsd-fuse",
"-X",
"fuse.gvfs-fuse-daemon",
"-X",
"fdescfs",
"-X",
"overlay",
"-X",
"nsfs",
"-X",
"squashfs",
"-m",
"-p",
"/",
"-p",
"/opt",
"-p",
"/var"
],
"execution_end": 1573560339.284034,
"execution_start": 1573560339.276218,
"exit_status": 2.0,
"output": "DISK CRITICAL - free space: / 2414 MB (60.50% inode=97%); /opt 344 MB (69.37% inode=94%); /var 1871 MB (94.04% inode=100%);",
"performance_data": [
"/=1575MB;398;319;0;3990",
"/opt=152MB;49;39;0;496",
"/var=118MB;198;159;0;1990"
],
"schedule_end": 1573560339.284133,
"schedule_start": 1573560339.284133,
"state": 2.0,
"ttl": 0.0,
"type": "CheckResult",
"vars_after": {
"attempt": 1.0,
"reachable": true,
"state": 2.0,
"state_type": 1.0
},
"vars_before": {
"attempt": 1.0,
"reachable": true,
"state": 2.0,
"state_type": 1.0
}
},
"last_hard_state": 2.0,
"last_hard_state_change": 1573547559.134351,
"last_reachable": true,
"last_state": 2.0,
"last_state_change": 1573547381.753345,
"last_state_critical": 1573560339.285917,
"last_state_ok": 0.0,
"last_state_type": 1.0,
"last_state_unknown": 0.0,
"last_state_unreachable": 0.0,
"last_state_warning": 0.0,
"max_check_attempts": 5.0,
"name": "disk",
"next_check": 1573560639.199642,
"notes": "",
"notes_url": "",
"original_attributes": null,
"package": "_etc",
"paused": false,
"previous_state_change": 1573547381.753345,
"problem": true,
"retry_interval": 60.0,
"severity": 136.0,
"source_location": {
"first_column": 1.0,
"first_line": 18.0,
"last_column": 21.0,
"last_line": 18.0,
"path": "/etc/icinga2/zones.d/smn/agent1.tld.conf"
},
"state": 2.0,
"state_type": 1.0,
"templates": [
"disk",
"generic-service"
],
"type": "Service",
"vars": {
"disk_cfree": "92%",
"disk_partitions": [
"/",
"/opt",
"/var"
],
"disk_wfree": "90%"
},
"version": 0.0,
"volatile": false,
"zone": "smn"
},
"joins": {},
"meta": {},
"name": "agent1.tld!disk",
"type": "Service"
}
]
}