Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
W wiki
  • Project overview
    • Project overview
    • Details
    • Activity
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
Collapse sidebar
  • pub
  • wiki
  • Wiki
  • d2s_monitoring_spec

Last edited by Guido Voigt Apr 14, 2019
Page history

d2s_monitoring_spec

D2Sphere Monitoring Endpoint Spec

  • REST Call without Auth

URL

  • http(s)://host:9099/metric
  • http(s)://host:9099/health
  • http(s)://host:9099/info
  • http(s)://host:9099/prometheus

Examples on FALCOM Stage Server

  • http://stage.d2sphere.com:9099/metrics
  • http://stage.d2sphere.com:9099/health
  • http://stage.d2sphere.com:9099/info
  • http://stage.d2sphere.com:9099/prometheus

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,.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_s
  "nonheapinfo.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
}

default spring prometheus

# HELP jvm_gc_max_data_size_bytes Max size of old generation memory pool
# TYPE jvm_gc_max_data_size_bytes gauge
jvm_gc_max_data_size_bytes 5.269618688E9
# HELP process_files_max_files The maximum file descriptor count
# TYPE process_files_max_files gauge
process_files_max_files 1048576.0
# HELP jvm_threads_live_threads The current number of live threads including both daemon and non-daemon threads
# TYPE jvm_threads_live_threads gauge
jvm_threads_live_threads 41.0
# HELP jvm_buffer_total_capacity_bytes An estimate of the total capacity of the buffers in this pool
# TYPE jvm_buffer_total_capacity_bytes gauge
jvm_buffer_total_capacity_bytes{id="direct",} 86016.0
jvm_buffer_total_capacity_bytes{id="mapped",} 0.0
# HELP system_load_average_1m The sum of the number of runnable entities queued to available processors and the number of runnable entities running on the available processors averaged over a period of time
# TYPE system_load_average_1m gauge
system_load_average_1m 0.06
# HELP jvm_memory_committed_bytes The amount of memory in bytes that is committed for the Java virtual machine to use
# TYPE jvm_memory_committed_bytes gauge
jvm_memory_committed_bytes{area="heap",id="PS Survivor Space",} 2.4117248E7
jvm_memory_committed_bytes{area="heap",id="PS Old Gen",} 3.99507456E8
jvm_memory_committed_bytes{area="heap",id="PS Eden Space",} 1.065877504E9
jvm_memory_committed_bytes{area="nonheap",id="Metaspace",} 7.8249984E7
jvm_memory_committed_bytes{area="nonheap",id="Code Cache",} 3.3554432E7
jvm_memory_committed_bytes{area="nonheap",id="Compressed Class Space",} 1.0092544E7
# HELP jvm_threads_daemon_threads The current number of live daemon threads
# TYPE jvm_threads_daemon_threads gauge
jvm_threads_daemon_threads 24.0
# HELP tomcat_sessions_expired_sessions_total  
# TYPE tomcat_sessions_expired_sessions_total counter
tomcat_sessions_expired_sessions_total 0.0
# HELP tomcat_threads_busy_threads  
# TYPE tomcat_threads_busy_threads gauge
tomcat_threads_busy_threads{name="http-nio-9099",} 1.0
# HELP jvm_classes_loaded_classes The number of classes that are currently loaded in the Java virtual machine
# TYPE jvm_classes_loaded_classes gauge
jvm_classes_loaded_classes 14056.0
# HELP tomcat_threads_current_threads  
# TYPE tomcat_threads_current_threads gauge
tomcat_threads_current_threads{name="http-nio-9099",} 10.0
# HELP tomcat_global_error_total  
# TYPE tomcat_global_error_total counter
tomcat_global_error_total{name="http-nio-9099",} 0.0
# HELP tomcat_global_request_max_seconds  
# TYPE tomcat_global_request_max_seconds gauge
tomcat_global_request_max_seconds{name="http-nio-9099",} 0.23
# HELP system_cpu_count The number of processors available to the Java virtual machine
# TYPE system_cpu_count gauge
system_cpu_count 4.0
# HELP tomcat_global_sent_bytes_total  
# TYPE tomcat_global_sent_bytes_total counter
tomcat_global_sent_bytes_total{name="http-nio-9099",} 54280.0
# HELP jvm_buffer_count_buffers An estimate of the number of buffers in the pool
# TYPE jvm_buffer_count_buffers gauge
jvm_buffer_count_buffers{id="direct",} 12.0
jvm_buffer_count_buffers{id="mapped",} 0.0
# HELP jvm_memory_max_bytes The maximum amount of memory in bytes that can be used for memory management
# TYPE jvm_memory_max_bytes gauge
jvm_memory_max_bytes{area="heap",id="PS Survivor Space",} 2.4117248E7
jvm_memory_max_bytes{area="heap",id="PS Old Gen",} 5.269618688E9
jvm_memory_max_bytes{area="heap",id="PS Eden Space",} 2.577924096E9
jvm_memory_max_bytes{area="nonheap",id="Metaspace",} -1.0
jvm_memory_max_bytes{area="nonheap",id="Code Cache",} 2.5165824E8
jvm_memory_max_bytes{area="nonheap",id="Compressed Class Space",} 1.073741824E9
# HELP tomcat_global_request_seconds  
# TYPE tomcat_global_request_seconds summary
tomcat_global_request_seconds_count{name="http-nio-9099",} 115.0
tomcat_global_request_seconds_sum{name="http-nio-9099",} 2.876
# HELP basic_connections_active  
# TYPE basic_connections_active gauge
basic_connections_active 1.0
# HELP process_files_open_files The open file descriptor count
# TYPE process_files_open_files gauge
process_files_open_files 66.0
# HELP jvm_gc_memory_promoted_bytes_total Count of positive increases in the size of the old generation memory pool before GC to after GC
# TYPE jvm_gc_memory_promoted_bytes_total counter
jvm_gc_memory_promoted_bytes_total 2.08526E7
# HELP jvm_memory_used_bytes The amount of used memory
# TYPE jvm_memory_used_bytes gauge
jvm_memory_used_bytes{area="heap",id="PS Survivor Space",} 2.4109504E7
jvm_memory_used_bytes{area="heap",id="PS Old Gen",} 4.1398896E7
jvm_memory_used_bytes{area="heap",id="PS Eden Space",} 1.52446552E8
jvm_memory_used_bytes{area="nonheap",id="Metaspace",} 7.6147752E7
jvm_memory_used_bytes{area="nonheap",id="Code Cache",} 3.3291328E7
jvm_memory_used_bytes{area="nonheap",id="Compressed Class Space",} 9686304.0
# HELP tomcat_sessions_rejected_sessions_total  
# TYPE tomcat_sessions_rejected_sessions_total counter
tomcat_sessions_rejected_sessions_total 0.0
# HELP basic_connections_min  
# TYPE basic_connections_min gauge
basic_connections_min 0.0
# HELP tomcat_sessions_created_sessions_total  
# TYPE tomcat_sessions_created_sessions_total counter
tomcat_sessions_created_sessions_total 0.0
# HELP http_server_requests_seconds  
# TYPE http_server_requests_seconds summary
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/metrics",} 5.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/metrics",} 0.026266972
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/health",} 106.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/health",} 0.710860249
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/**/favicon.ico",} 1.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/**/favicon.ico",} 0.020285716
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/prometheus",} 3.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/prometheus",} 0.196464799
# HELP http_server_requests_seconds_max  
# TYPE http_server_requests_seconds_max gauge
http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/metrics",} 0.0
http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/health",} 0.005583137
http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/**/favicon.ico",} 0.020285716
http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/prometheus",} 0.169282986
# HELP jvm_classes_unloaded_classes_total The total number of classes unloaded since the Java virtual machine has started execution
# TYPE jvm_classes_unloaded_classes_total counter
jvm_classes_unloaded_classes_total 0.0
# HELP process_cpu_usage The "recent cpu usage" for the Java Virtual Machine process
# TYPE process_cpu_usage gauge
process_cpu_usage 0.0014784394250513346
# HELP system_cpu_usage The "recent cpu usage" for the whole system
# TYPE system_cpu_usage gauge
system_cpu_usage 0.030800821355236138
# HELP jvm_threads_states_threads The current number of threads having NEW state
# TYPE jvm_threads_states_threads gauge
jvm_threads_states_threads{state="runnable",} 11.0
jvm_threads_states_threads{state="blocked",} 0.0
jvm_threads_states_threads{state="waiting",} 17.0
jvm_threads_states_threads{state="timed-waiting",} 13.0
jvm_threads_states_threads{state="new",} 0.0
jvm_threads_states_threads{state="terminated",} 0.0
# HELP jvm_gc_pause_seconds Time spent in GC pause
# TYPE jvm_gc_pause_seconds summary
jvm_gc_pause_seconds_count{action="end of major GC",cause="Metadata GC Threshold",} 1.0
jvm_gc_pause_seconds_sum{action="end of major GC",cause="Metadata GC Threshold",} 0.342
jvm_gc_pause_seconds_count{action="end of minor GC",cause="Metadata GC Threshold",} 1.0
jvm_gc_pause_seconds_sum{action="end of minor GC",cause="Metadata GC Threshold",} 0.065
jvm_gc_pause_seconds_count{action="end of minor GC",cause="Allocation Failure",} 3.0
jvm_gc_pause_seconds_sum{action="end of minor GC",cause="Allocation Failure",} 0.127
# HELP jvm_gc_pause_seconds_max Time spent in GC pause
# TYPE jvm_gc_pause_seconds_max gauge
jvm_gc_pause_seconds_max{action="end of major GC",cause="Metadata GC Threshold",} 0.0
jvm_gc_pause_seconds_max{action="end of minor GC",cause="Metadata GC Threshold",} 0.0
jvm_gc_pause_seconds_max{action="end of minor GC",cause="Allocation Failure",} 0.0
# HELP process_start_time_seconds Start time of the process since unix epoch.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.555260104705E9
# HELP device_sessions Count of device sessions
# TYPE device_sessions gauge
device_sessions 3.0
# HELP jvm_buffer_memory_used_bytes An estimate of the memory that the Java virtual machine is using for this buffer pool
# TYPE jvm_buffer_memory_used_bytes gauge
jvm_buffer_memory_used_bytes{id="direct",} 86016.0
jvm_buffer_memory_used_bytes{id="mapped",} 0.0
# HELP tomcat_sessions_active_max_sessions  
# TYPE tomcat_sessions_active_max_sessions gauge
tomcat_sessions_active_max_sessions 0.0
# HELP tomcat_global_received_bytes_total  
# TYPE tomcat_global_received_bytes_total counter
tomcat_global_received_bytes_total{name="http-nio-9099",} 0.0
# HELP tomcat_sessions_alive_max_seconds  
# TYPE tomcat_sessions_alive_max_seconds gauge
tomcat_sessions_alive_max_seconds 0.0
# HELP process_uptime_seconds The uptime of the Java virtual machine
# TYPE process_uptime_seconds gauge
process_uptime_seconds 3175.179
# HELP jvm_gc_memory_allocated_bytes_total Incremented for an increase in the size of the young generation memory pool after one GC to before the next
# TYPE jvm_gc_memory_allocated_bytes_total counter
jvm_gc_memory_allocated_bytes_total 2.876962968E9
# HELP basic_connections_max  
# TYPE basic_connections_max gauge
basic_connections_max 8.0
# HELP jvm_threads_peak_threads The peak live thread count since the Java virtual machine started or peak was reset
# TYPE jvm_threads_peak_threads gauge
jvm_threads_peak_threads 45.0
# HELP tomcat_sessions_active_current_sessions  
# TYPE tomcat_sessions_active_current_sessions gauge
tomcat_sessions_active_current_sessions 0.0
# HELP logback_events_total Number of error level events that made it to the logs
# TYPE logback_events_total counter
logback_events_total{level="warn",} 437.0
logback_events_total{level="debug",} 12442.0
logback_events_total{level="error",} 4.0
logback_events_total{level="trace",} 0.0
logback_events_total{level="info",} 493.0
# HELP jvm_gc_live_data_size_bytes Size of old generation memory pool after a full GC
# TYPE jvm_gc_live_data_size_bytes gauge
jvm_gc_live_data_size_bytes 4.1382512E7
# HELP tomcat_threads_config_max_threads  
# TYPE tomcat_threads_config_max_threads gauge
tomcat_threads_config_max_threads{name="http-nio-9099",} 200.0
 

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());
    }
  }
}
Clone repository
  • AVL Filesystem
  • BOLERO40_GNSS_improvement
  • BOLERO40_improvement_of_the_GNSS_performance
  • NFC_commands,_event,_dynamic_variable
  • Promotion_Kit_Settings
  • Workbench Mac Installation Readme
  • avl_aes_key_handling
  • avl_ble
  • avl_blueid
  • avl_config_commented_1
  • avl_ecodrive
  • avl_feature_list
  • avl_frp_main
  • avl_fw_update
  • avl_premium_feature_cpc
View All Pages