I'm searching the API documents to find the uptime field or system boot time we would like to include in one of our tools for monitoring. I see both values displayed on the System Information tab (system boot time visible by hovering over Uptime field) on the main page but cannot find any reference in the API documents for either of these values.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
There doesn't seem to be a call that directly outputs the uptime, but if you do a GET request for /api/v2/monitor/web-ui/state , the JSON output will contain two keys:
"snapshot_utc_time" = current time as of running the request (UTC)
"utc_last_reboot" = time of last (re)boot (UTC)
You can either subtract the two, or subtract "utc_last_reboot" from current UTC time to get the uptime.
Thanks @pminarik for the quick reply on this, will work for what we need to do!
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1662 | |
1077 | |
752 | |
446 | |
220 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.