InfluxDB is an open-source time series database used by Datasentinel to store collected metrics and manage data retention.
Data is organized into time series, each of which contains a set of data points that are timestamped.
Usually, no management tasks are necessary with the InfluxDB backend database. However, if you require information about InfluxDB, here are some useful tips:
Datasentinel store metrics in the database ds-data with a default retention policy of 14 days (named ds-data)
Data is stored in daily shards, located in the directory/datasentinel/data/influxdb/data.
Additionally, the database employs series files found in the directory /datasentinel/data/influxdb/data/ds-data/_series, which facilitate the mapping of time series data to corresponding shards.
A complete installation embeds an InfluxDB database (Version 1.7.6) but you can use your own Influxdb database on a separate server.
Please contact support@datasentinel.io if you plan to use your own database.
Database Size
Here are some OS commands to check the size of an InfluxDB database.
InfluxDB is configured to manage its data storage and retention by dividing metrics into daily shards. A new directory is created each day.
The database ds-data stores its metrics in the directory /datasentinel/data/influxdb/data/ds-data/.
To see the size used by the retention policies, use the following command:
du-sh/datasentinel/data/influxdb/data/ds-data/*
The subdirectory ds-data corresponds to the default retention policy and holds the stored metrics.
# HELP go_gc_duration_seconds A summary of the GC invocation durations.# TYPE go_gc_duration_seconds summarygo_gc_duration_seconds{quantile="0"} 6.0455e-05go_gc_duration_seconds{quantile="0.25"} 0.000173879go_gc_duration_seconds{quantile="0.5"} 0.000244642go_gc_duration_seconds{quantile="0.75"} 0.000370561go_gc_duration_seconds{quantile="1"} 0.003673301go_gc_duration_seconds_sum 0.066770784go_gc_duration_seconds_count 170# HELP go_goroutines Number of goroutines that currently exist.# TYPE go_goroutines gaugego_goroutines 32# HELP go_info Information about the Go environment.# TYPE go_info gaugego_info{version="go1.11"} 1# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.# TYPE go_memstats_alloc_bytes gaugego_memstats_alloc_bytes 2.102922224e+09# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.# TYPE go_memstats_alloc_bytes_total countergo_memstats_alloc_bytes_total 1.1651334704e+10# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.# TYPE go_memstats_buck_hash_sys_bytes gaugego_memstats_buck_hash_sys_bytes 1.667387e+06# HELP go_memstats_frees_total Total number of frees.# TYPE go_memstats_frees_total countergo_memstats_frees_total 7.9725592e+07# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.
# TYPE go_memstats_gc_cpu_fraction gaugego_memstats_gc_cpu_fraction 0.1066384218405857# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.# TYPE go_memstats_gc_sys_bytes gaugego_memstats_gc_sys_bytes 9.3151232e+07# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.# TYPE go_memstats_heap_alloc_bytes gaugego_memstats_heap_alloc_bytes 2.102922224e+09# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.# TYPE go_memstats_heap_idle_bytes gaugego_memstats_heap_idle_bytes 1.05316352e+08# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.# TYPE go_memstats_heap_inuse_bytes gaugego_memstats_heap_inuse_bytes 2.309423104e+09# HELP go_memstats_heap_objects Number of allocated objects.# TYPE go_memstats_heap_objects gaugego_memstats_heap_objects 9.898008e+06# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.# TYPE go_memstats_heap_released_bytes gaugego_memstats_heap_released_bytes 0# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.# TYPE go_memstats_heap_sys_bytes gaugego_memstats_heap_sys_bytes 2.414739456e+09# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.# TYPE go_memstats_last_gc_time_seconds gaugego_memstats_last_gc_time_seconds 1.67353162333638e+09# HELP go_memstats_lookups_total Total number of pointer lookups.# TYPE go_memstats_lookups_total countergo_memstats_lookups_total 0# HELP go_memstats_mallocs_total Total number of mallocs.# TYPE go_memstats_mallocs_total countergo_memstats_mallocs_total 8.96236e+07# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.# TYPE go_memstats_mcache_inuse_bytes gaugego_memstats_mcache_inuse_bytes 6912# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.# TYPE go_memstats_mcache_sys_bytes gaugego_memstats_mcache_sys_bytes 16384# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.# TYPE go_memstats_mspan_inuse_bytes gaugego_memstats_mspan_inuse_bytes 2.9181872e+07# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.# TYPE go_memstats_mspan_sys_bytes gaugego_memstats_mspan_sys_bytes 3.4471936e+07# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.# TYPE go_memstats_next_gc_bytes gaugego_memstats_next_gc_bytes 2.527974448e+09# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.# TYPE go_memstats_other_sys_bytes gaugego_memstats_other_sys_bytes 4.479293e+06# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.# TYPE go_memstats_stack_inuse_bytes gaugego_memstats_stack_inuse_bytes 1.179648e+06# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.# TYPE go_memstats_stack_sys_bytes gaugego_memstats_stack_sys_bytes 1.179648e+06# HELP go_memstats_sys_bytes Number of bytes obtained from system.# TYPE go_memstats_sys_bytes gaugego_memstats_sys_bytes 2.549705336e+09# HELP go_threads Number of OS threads created.# TYPE go_threads gaugego_threads 15# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.# TYPE process_cpu_seconds_total counterprocess_cpu_seconds_total 67.81# HELP process_max_fds Maximum number of open file descriptors.# TYPE process_max_fds gaugeprocess_max_fds 65536# HELP process_open_fds Number of open file descriptors.# TYPE process_open_fds gaugeprocess_open_fds 3505# HELP process_resident_memory_bytes Resident memory size in bytes.# TYPE process_resident_memory_bytes gaugeprocess_resident_memory_bytes 3.342630912e+09# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.# TYPE process_start_time_seconds gaugeprocess_start_time_seconds 1.6735316038e+09# HELP process_virtual_memory_bytes Virtual memory size in bytes.# TYPE process_virtual_memory_bytes gaugeprocess_virtual_memory_bytes 9.414549504e+09