D2Sphere Monitoring Endpoint Spec
- REST Call without Auth
Device Server
needed Values:
-
devices Server specific
- state OK : [true,false]
- number registred devices : [number(long)]
- number activated devices : [number(long)]
- number online devices : [number(long)]
- number critical devices : [number(long)]
-
OS specific
- CPU core total : [number]
- RAM total : [number MB]
- RAM free : [number MB]
- RAM used : [number MB]
- HDD total : [number MB]
- HDD free : [number MB]
- HDD used : [number MB]
- LOAD total : [number MB]
- LOADfree : [number MB]
- LOAD used : [number MB]
GUI
needed Values:
-
devices Server specific
- state OK : [true,false]
- number registred users : [number(long)]
- number activated users : [number(long)]
- number online users : [number(long)]
- number registred domains : [number(long)]
-
OS specific
- CPU core total : [number]
- RAM total : [number MB]
- RAM free : [number MB]
- RAM used : [number MB]
- HDD total : [number MB]
- HDD free : [number MB]
- HDD used : [number MB]
- LOAD total : [number MB]
- LOADfree : [number MB]
- LOAD used : [number MB]
API
needed Values:
-
devices Server specific
- state OK : [true,false]
- number calls p second? : [number(long)]
- number call last 1h : [number(long)]
- number error last 1h : [number(long)]
-
OS specific
- CPU core total : [number]
- RAM total : [number MB]
- RAM free : [number MB]
- RAM used : [number MB]
- HDD total : [number MB]
- HDD free : [number MB]
- HDD used : [number MB]
- LOAD total : [number MB]
- LOADfree : [number MB]
- LOAD used : [number MB]
default spring info
{
"build": {
"version": "2.5.0-SNAPSHOT",
"artifact": "deviceserver-app",
"name": "deviceserver-app",
"encoding": {
"source": "UTF-8",
"reporting": "UTF-8"
},
"group": "de.falcom",
"time": 1518642432000
}
}
default spring health
{
"status": "UP",
"diskSpace": {
"status": "UP",
"total": 1000240963584,
"free": 719870590976,
"threshold": 10485760
},
"db": {
"status": "UP",
"database": "MySQL",
"hello": 1
}
}
default spring metrics
{
"mem": 662325,
"mem.free": 540768,
"processors": 8,
"instance.uptime": 21942,
"uptime": 27551,
"systemload.average": 3.2353515625,
"heap.committed": 598528,
"heap.init": 262144,
"heap.used": 57759,
"heap": 3728384,
"nonheap.committed": 65304,
"nonheap.init": 2496,
"nonheap.used": 63797,
"nonheap": 0,
"threads.peak": 46,
"threads.daemon": 35,
"threads.totalStarted": 67,
"threads": 40,
"classes": 9057,
"classes.loaded": 9057,
"classes.unloaded": 0,
"gc.ps_scavenge.count": 11,
"gc.ps_scavenge.time": 125,
"gc.ps_marksweep.count": 2,
"gc.ps_marksweep.time": 118,
"httpsessions.max": -1,
"httpsessions.active": 0,
"datasource.primary.active": 1,
"datasource.primary.usage": 0.125,
"gauge.response.metrics": 82,
"gauge.response.star-star.favicon.ico": 10,
"counter.status.200.star-star.favicon.ico": 1,
"counter.status.200.metrics": 1
}
snippets
das gibts alles via JVM console:
VM Summary
Connection name:
pid: 10456 sun.tools.jconsole.JConsole
Virtual Machine:
Java HotSpot(TM) 64-Bit Server VM version 25.162-b12
Vendor:
Oracle Corporation
Name:
10456@dev_gvoigt
Uptime:
1 minute
Process CPU time:
22,187 seconds
JIT compiler:
HotSpot 64-Bit Tiered Compilers
Total compile time:
11,816 seconds
Live threads:
37
Peak:
38
Daemon threads:
31
Total threads started:
46
Current classes loaded:
3.938
Total classes loaded:
3.938
Total classes unloaded:
0
Current heap size:
22.426 kbytes
Maximum heap size:
4.651.520 kbytes
Committed memory:
36.352 kbytes
Pending finalization:
0 objects
Garbage collector:
Name = 'PS MarkSweep', Collections = 3, Total time spent = 0,138 seconds
Garbage collector:
Name = 'PS Scavenge', Collections = 18, Total time spent = 0,046 seconds
Operating System:
Windows 10 10.0
Architecture:
amd64
Number of processors:
8
Committed virtual memory:
436.776 kbytes
Total physical memory:
20.927.500 kbytes
Free physical memory:
13.581.720 kbytes
Total swap space:
24.073.228 kbytes
Free swap space:
15.259.860 kbytes
VM arguments:
-Dapplication.home=D:\tools\java\jdk_x64 -Xms8m -Djconsole.showOutputViewer
Class path:
D:\tools\java\jdk_x64/lib/jconsole.jar;D:\tools\java\jdk_x64/lib/tools.jar;D:\tools\java\jdk_x64/classes
Library path:
D:\tools\java\jdk_x64\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\tools\develop\cygwin\usr\local\bin;D:\tools\develop\cygwin\bin;D:\tools\net\conEmu\ConEmu\Scripts;D:\tools\net\conEmu;D:\tools\net\conEmu\ConEmu;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Docker\Docker\resources\bin;D:\tools\develop\python\Scripts;D:\tools\develop\python;C:\Program Files (x86)\Business Objects\Common\3.5\bin\NOTES;C:\Program Files (x86)\Business Objects\Common\3.5\bin\NOTES\DATA;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Security Innovation\SI TSS\bin;D:\tools\electronic\AltiumDesigner\System;D:\tools\office\MiKTeX\miktex\bin\x64;D:\tools\office\LyX\PERL\BIN;D:\tools\develop\p4merge\DVCS;D:\tools\develop\UltraCompare;D:\tools\net\OpenVPN\bin;D:\tools\crypt\GnuPG\pub;D:\tools\develop\UltraEdit;D:\tools\develop\UltraCompare;D:\tools\crypt\GnuPG\bin;D:\tools\java\jdk_x64\bin;D:\tools\java\jdk_x64\jre\bin;D:\tools\develop\cygwin\bin;E:\.sugar\bin\bash;E:\.sugar\bin\win64;D:\tools\java\winrun4j\bin;D:\tools\java\maven\bin;D:\tools\android\sdk\platform-tools;D:\tools\develop\p4merge;D:\tools\net\nmap;C:\Users\sugar\AppData\Local\Microsoft\WindowsApps;D:\tools\develop\cygwin\lib\lapack;.
Boot class path:
D:\tools\java\jdk_x64\jre\lib\resources.jar;D:\tools\java\jdk_x64\jre\lib\rt.jar;D:\tools\java\jdk_x64\jre\lib\sunrsasign.jar;D:\tools\java\jdk_x64\jre\lib\jsse.jar;D:\tools\java\jdk_x64\jre\lib\jce.jar;D:\tools\java\jdk_x64\jre\lib\charsets.jar;D:\tools\java\jdk_x64\jre\lib\jfr.jar;D:\tools\java\jdk_x64\jre\classes
public class Main {
public static void main(String[] args) {
/* Total number of processors or cores available to the JVM */
System.out.println("Available processors (cores): " +
Runtime.getRuntime().availableProcessors());
/* Total amount of free memory available to the JVM */
System.out.println("Free memory (bytes): " +
Runtime.getRuntime().freeMemory());
/* This will return Long.MAX_VALUE if there is no preset limit */
long maxMemory = Runtime.getRuntime().maxMemory();
/* Maximum amount of memory the JVM will attempt to use */
System.out.println("Maximum memory (bytes): " +
(maxMemory == Long.MAX_VALUE ? "no limit" : maxMemory));
/* Total memory currently available to the JVM */
System.out.println("Total memory available to JVM (bytes): " +
Runtime.getRuntime().totalMemory());
/* Get a list of all filesystem roots on this system */
File[] roots = File.listRoots();
/* For each filesystem root, print some info */
for (File root : roots) {
System.out.println("File system root: " + root.getAbsolutePath());
System.out.println("Total space (bytes): " + root.getTotalSpace());
System.out.println("Free space (bytes): " + root.getFreeSpace());
System.out.println("Usable space (bytes): " + root.getUsableSpace());
}
}
}