Like in the result below, just return for state entry the following line only.
"state_time": "2015-09-24 03:39:52",
"host_name": "127.0.0.1",
"service_description": "Load",
"state": "2",
Is is possible to change / add any new API config files to achieve this?
Thanks
Code: Select all
{
"statehistory": {
"recordcount": "2",
"stateentry": [
{
"instance_id": "1",
"state_time": "2015-09-24 03:39:52",
"object_id": "175",
"objecttype_id": "2",
"host_name": "127.0.0.1",
"service_description": "Load",
"state_change": "1",
"state": "2",
"state_type": "0",
"current_check_attempt": "1",
"max_check_attempts": "5",
"last_state": "0",
"last_hard_state": "0",
"output": "awfawfawf"
},
{
"instance_id": "1",
"state_time": "2015-09-24 03:39:48",
"object_id": "175",
"objecttype_id": "2",
"host_name": "127.0.0.1",
"service_description": "Load",
"state_change": "1",
"state": "0",
"state_type": "1",
"current_check_attempt": "5",
"max_check_attempts": "5",
"last_state": "3",
"last_hard_state": "3",
"output": "awfawfawf"
}
]
}
}