forked from hummypkg/webif
Add heartbeat to API
This commit is contained in:
parent
8da619ded7
commit
7293ae2c87
17
webif/html/api/heartbeat.jim
Executable file
17
webif/html/api/heartbeat.jim
Executable file
@ -0,0 +1,17 @@
|
||||
#!/mod/bin/jimsh
|
||||
source /mod/webif/lib/setup
|
||||
require system.class
|
||||
package require json
|
||||
|
||||
httpheader {application/json}
|
||||
|
||||
set time [clock milliseconds]
|
||||
|
||||
catch {
|
||||
lappend vars \
|
||||
isotime [system isotime $time] \
|
||||
timestamp $time \
|
||||
uptime [system uptime]
|
||||
|
||||
puts [json::encode $vars obj]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user