Modify statehistory.php
Posted: Thu Jun 18, 2020 3:17 pm
I'm trying to modify the statehistory.php (/usr/local/nagiosxi/html/reports) so that when we invoke the API (https://HOSTNAME/nagiosxi/api/v1/object ... *&pretty=0) the Host and Service groups are also displayed.
Currently, we see everything but:
{
"instance_id": "1",
"state_time": "2020-06-18 15:26:46",
"object_id": "2200",
"objecttype_id": "2",
"host_name": "HOSTNAME",
"service_description": "CPU Usage",
"state_change": "1",
"state": "0",
"state_type": "0",
"current_check_attempt": "2",
"max_check_attempts": "15",
"last_state": "2",
"last_hard_state": "0",
"output": "OK: Percent was 9.35 %"
}
I need the host and service groups displayed as this is how we determine which team incidents should be routed to.
Thanks in advance.
Currently, we see everything but:
{
"instance_id": "1",
"state_time": "2020-06-18 15:26:46",
"object_id": "2200",
"objecttype_id": "2",
"host_name": "HOSTNAME",
"service_description": "CPU Usage",
"state_change": "1",
"state": "0",
"state_type": "0",
"current_check_attempt": "2",
"max_check_attempts": "15",
"last_state": "2",
"last_hard_state": "0",
"output": "OK: Percent was 9.35 %"
}
I need the host and service groups displayed as this is how we determine which team incidents should be routed to.
Thanks in advance.