Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Show NTP servers in FortiGate WebUI
Can auto-run when imported as Userscript.
Purely reads and shows monitoring data, not touching it.
If you use it, please write a comment or click the Kudo button.
Show status NTP server status in FortiGate's WebUI with just a click!
- Login to your FortiGate's WebUI and navigate to System > Settings
- Create a new bookmark in your web browser and copy the JavaScript code below into the URL field.
- Click the bookmark and enjoy viewing your NTP servers!
Result:
Copy & paste into a bookmark:
javascript:(async function(){const data=await fetch('/api/v2/monitor/system/ntp/status');const ntp=await data.json();const p=document.createElement('div');p.setAttribute("id","ntplist");let s="<p>NTP Status:<table style='padding:0;border-spacing:0;border-collapse:collapse'><tr><td style='border:1px solid #ddd;background:#ddd;padding:2px 5px 2px 5px'>NTP Server</td><td style='border:1px solid #ddd;background:#ddd;padding:2px 5px 2px 5px'>IP Address</td><td style='border:1px solid #ddd;background:#ddd;padding:2px 5px 2px 5px;text-align:center'>Version</td><td style='border:1px solid #ddd;background:#ddd;padding:2px 5px 2px 5px;text-align:center'>Reachable</td></tr>";for(const _ of ntp.results){s+="<tr><td style='border:1px solid #ddd;padding:2px 5px 2px 5px'>"+_.server+"</td><td style='border:1px solid #ddd;padding:2px 5px 2px 5px'>"+_.ip+"</td><td style='border:1px solid #ddd;padding:2px 5px 2px 5px;text-align:center'>"+_.version+"</td><td style='border:1px solid #ddd;padding:2px 5px 2px 5px;text-align:center'>"+_.reachable+"</td></tr>"}s=s.replace(/true/g,'<f-icon class="fa-accepted" title="Reachable" style="cursor:pointer"></f-icon>');s=s.replace(/false/g,'<f-icon class="fa-denied" title="Unreachable" style="cursor:pointer"></f-icon>');s=s.replace(/undefined/g,'-');p.innerHTML=s+"</table></p>";if(document.contains(document.getElementById("ntplist"))){document.getElementById("ntplist").remove();}document.getElementById("system-time-dlg").querySelector("section").getElementsByTagName('div')[4].after(p)})();
Labels:
- Labels:
-
FortiGate
7799
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should be available in the GUI, since the custom/manual buttons are available in. the gui but the tooltip just say "please do it in the cli"
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I thought so, too. That's why I created the tool to show the actual NTP servers and their status. I'll publish more tools soon.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Danny,
All your developed tools are exceptional and have significantly improved our operations.
This tool It's efficient and user-friendly.
Keep being creative !
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good Job! It's work's perfectly.
