Nagios XI Rest API
Posted: Thu Sep 28, 2017 1:38 pm
Hi,
I don't find option for managing hostgroup member. (Add, remove, update). There a way to do it ?
I also want to know if it's possible to show only the field I need in the response ?
I find a section about Building Limited Queries in the documentation but I don't find a way to limit the field.
Example :
Query right now :
I need only
Thank you!
I don't find option for managing hostgroup member. (Add, remove, update). There a way to do it ?
I also want to know if it's possible to show only the field I need in the response ?
I find a section about Building Limited Queries in the documentation but I don't find a way to limit the field.
Example :
Query right now :
Code: Select all
{
"hoststatuslist": {
"recordcount": "12",
"hoststatus": [
{
"@attributes": {
"id": "401"
},
"instance_id": "1",
"host_id": "202",
"name": "tset",
"display_name": "tset",
"address": "127.0.53.53",
"alias": "tset",
"status_update_time": "2015-09-24 02:05:51",
"status_text": "OK - 127.0.53.53: rta 0.021ms, lost 0%",
"status_text_long": "",
"current_state": "0",
"icon_image": "server.png",
"icon_image_alt": "",
"performance_data": "rta=0.021ms;3000.000;5000.000;0; pl=0%;80;100;; rtmax=0.060ms;;;; rtmin=0.011ms;;;;",
"should_be_scheduled": "1",
"check_type": "0",
"last_state_change": "2015-09-22 12:11:41",
"last_hard_state_change": "2015-09-22 12:11:41",
"last_hard_state": "0",
"last_time_up": "2015-09-24 02:05:51",
"last_time_down": "1969-12-31 18:00:00",
"last_time_unreachable": "1969-12-31 18:00:00",
"last_notification": "1969-12-31 18:00:00",
"next_notification": "1969-12-31 18:00:00",
"no_more_notifications": "0",
"acknowledgement_type": "0",
"current_notification_number": "0",
"event_handler_enabled": "1",
"process_performance_data": "1",
"obsess_over_host": "1",
"modified_host_attributes": "0",
"event_handler": "",
"check_command": "check_xi_host_ping!3000.0!80%!5000.0!100%",
"normal_check_interval": "40",
"retry_check_interval": "5",
"check_timeperiod_id": "128",
"has_been_checked": "1",
"current_check_attempt": "1",
"max_check_attempts": "4",
"last_check": "2015-09-24 02:05:51",
"next_check": "2015-09-24 02:45:51",
"state_type": "1",
"notifications_enabled": "0",
"problem_acknowledged": "0",
"passive_checks_enabled": "1",
"active_checks_enabled": "1",
"flap_detection_enabled": "1",
"is_flapping": "0",
"percent_state_change": "0",
"latency": "0",
"execution_time": "0.00226",
"scheduled_downtime_depth": "0"
}
]
}
}Code: Select all
{
"hoststatuslist": {
"recordcount": "12",
"hoststatus": [
{
"@attributes": {
"id": "401"
},
"host_id": "202",
"name": "tset",
"address": "127.0.53.53",
"current_state": "0",
}
]
}
}