JSON api start/ent
Posted: Tue Oct 01, 2019 2:47 pm
I'm looking to do a custom "Availability Report" using the JSON query api.
For the life of me I can't figure out the "start/end" time.
I'm happy to read docs and figure this out, but I have not found ANY documentation on how the (new and awesome APIs actaully work) which is a surprise considering how well documented CORE is.
+ the APIs are awesome.
Any help is much appreciated!
Here are details:
https://MyHost/nagios/jsonquery.html
CGI: Archive Json
Query: availability
Availability Object Type: hosts
Hostname: MyHost
Service Desc: PING
Start Time: ???
End Time: ???
When I enter:
Start: 1
End Time: -30
"host": {
"name": "MyHost",
"time_up": 1569920418, <-- How do I translate this into something meaningful?
"time_down": 38115,
"time_unreachable": 0,
"scheduled_time_up": 0,
"scheduled_time_down": 0,
"scheduled_time_unreachable": 0,
"time_indeterminate_nodata": 0,
"time_indeterminate_notrunning": 0
}
}
}
For the life of me I can't figure out the "start/end" time.
I'm happy to read docs and figure this out, but I have not found ANY documentation on how the (new and awesome APIs actaully work) which is a surprise considering how well documented CORE is.
+ the APIs are awesome.
Any help is much appreciated!
Here are details:
https://MyHost/nagios/jsonquery.html
CGI: Archive Json
Query: availability
Availability Object Type: hosts
Hostname: MyHost
Service Desc: PING
Start Time: ???
End Time: ???
When I enter:
Start: 1
End Time: -30
"host": {
"name": "MyHost",
"time_up": 1569920418, <-- How do I translate this into something meaningful?
"time_down": 38115,
"time_unreachable": 0,
"scheduled_time_up": 0,
"scheduled_time_down": 0,
"scheduled_time_unreachable": 0,
"time_indeterminate_nodata": 0,
"time_indeterminate_notrunning": 0
}
}
}