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!
Result:
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)})();
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.
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"
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.
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 !
Good Job! It's work's perfectly.
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 |
---|---|
1669 | |
1082 | |
752 | |
446 | |
225 |
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.