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.
Modify statehistory.php
Re: Modify statehistory.php
We do not recommend that you modify the source code as when you upgrade it will be overwritten and you'll be required to re-implement your changes in the new code.
We can submit a feature request on your behalf if you'd like but we stop short of supporting the customization of the source code to prevent issues with the product/upgrades.
We do offer paid custom development, if that's something you're interested in you can contact [email protected] to get more information/a quote.
Thank you!
We can submit a feature request on your behalf if you'd like but we stop short of supporting the customization of the source code to prevent issues with the product/upgrades.
We do offer paid custom development, if that's something you're interested in you can contact [email protected] to get more information/a quote.
Thank you!