成功最有效的方法就是向有经验的人学习!

VictoriaMetrics启动参数说明

启动参数、命令行参数
Environment variables
可以通过环境变量设置参数:

必须设置-envflag.enable
参数名中的每个.必须由_代替(例如-insert.maxQueueDuration <duration>将转换为insert_maxQueueDuration=<duration>
对于重复参数,用,作为分隔符将不同的值合并为一个值(例如-storageNode <nodeA> -storageNode <nodeB>将转换为storageNode=<nodeA>,<nodeB>
可以使用-envflag.prefix为环境变量设置前缀。例如,如果-envflag.prefix=VM_,那么env vars必须以VM_开头
vmstorage

./vmstorage-prod --help

# 处理大型合并时所用的最大cpu核数
-bigMergeConcurrency int
    The maximum number of CPU cores to use for big merges. Default value is used if set to 0

# 如果时序数据之间的时间差比该配置小,则剔除。当多个Prometheus同时写入一个VictoriaMetric时,这对减少开销很有帮助。当设置为0时,不生效。
-dedup.minScrapeInterval duration
    Remove superflouos samples from time series if they are located closer to each other than this duration. This may be useful for reducing overhead when multiple identically configured Prometheus instances write data to the same VictoriaMetrics. Deduplication is disabled if the -dedup.minScrapeInterval is 0

# 是否拒绝已配置的-retentionPeriod(数据保留时长)之外的查询。 设置后,/api/v1/query_range对于-retentionPeriod以外的'from'值的查询,将返回'503 Service Unavailable'错误。 当多个具有不同数据保留时长的数据源隐藏在query-tee后面时,该项可能很有用
-denyQueriesOutsideRetention
    Whether to deny queries outside of the configured -retentionPeriod. When set, then /api/v1/query_range would return '503 Service Unavailable' error for queries with 'from' value outside -retentionPeriod. This may be useful when multiple data sources with distinct retentions are hidden behind query-tee

# 是否监听和使用ipv6,默认只使用ipv4
-enableTCP6
    Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP is used

# 是否读取命令行以外的环境变量的参数,命令行参数的等级高于环境变量参数。若未设置时,只读取命令行参数。
-envflag.enable
    Whether to enable reading flags from environment variables additionally to command line. Command line flag values have priority over values from environment vars. Flags are read only from command line if this flag isn't set

# 环境变量的前缀,如果设置了-envflag.enable
-envflag.prefix string
    Prefix for environment variables if -envflag.enable is set

# 没有新数据插入之后,在完成每月分区的最终合并之前的延迟。完成最终合并后,通常会降低查询速度和磁盘空间使用率。最终合并的延迟过短可能会导致磁盘IO使用率和CPU使用率增加(默认为30秒)
-finalMergeDelay duration
    The delay before starting final merge for per-month partition after no new data is ingested into it. Query speed and disk space usage is usually reduced after the final merge is complete. Too low delay for final merge may result in increased disk IO usage and CPU usage (default 30s)

# 授权字符串,必须以查询字符串的形式传递给/internal/force_flush 接口
-forceFlushAuthKey string
    authKey, which must be passed in query string to /internal/force_flush pages

# 授权字符串,必须以查询字符串的形式传递给/internal/force_merge 接口
-forceMergeAuthKey string
    authKey, which must be passed in query string to /internal/force_merge pages

# 是否使用pread()代替mmap()读取数据文件。默认情况下,mmap()用于64位架构,而pread()用于32位架构,因为它们无法读取内存中大于2^32字节的数据文件。mmap()通常比pread()更快地读取小数据块。
-fs.disableMmap
    Whether to use pread() instead of mmap() for reading data files. By default mmap() is used for 64-bit arches and pread() is used for 32-bit arches, since they cannot read data files bigger than 2^32 bytes in memory. mmap() is usually faster for reading small data chunks than pread()

# 外部http请求在超过该值后,将被关闭。这可能有助于在负载均衡器后面的服务集群之间分配传入负载。请注意,实际超时可能会增加多达10%,以防止出现惊群效应(默认为2m0s)
-http.connTimeout duration
    Incoming http connections are closed after the configured timeout. This may help spreading incoming load among a cluster of services behind load balancer. Note that the real timeout may be bigger by up to 10% as a protection from Thundering herd problem (default 2m0s)

#禁用HTTP响应压缩以节省CPU资源。默认情况下启用压缩以节省网络带宽
-http.disableResponseCompression
    Disable compression of HTTP responses for saving CPU resources. By default compression is enabled to save network bandwidth

# 空闲http请求超时时间
-http.idleConnTimeout duration
    Timeout for incoming idle http connections (default 1m0s)

# HTTP server正常关闭的最大持续时间。高负载服务器可能需要增加值才能正常关闭(默认为7秒)
-http.maxGracefulShutdownDuration duration
    The maximum duration for graceful shutdown of HTTP server. Highly loaded server may require increased value for graceful shutdown (default 7s)

# http url代理前缀。此项在nginx等代理时有用
-http.pathPrefix string
    An optional prefix to add to all the paths handled by http server. For example, if '-http.pathPrefix=/foo/bar' is set, then all the http requests will be handled on '/foo/bar/*' paths. This may be useful for proxied requests. See https://www.robustperception.io/using-external-urls-and-proxies-with-prometheus

# HTTP server 关闭之前的可选延迟。在此交易期间,http server 为/health 接口返回了non-OK响应,因此负载均衡器可以将新请求路由到其他server上
-http.shutdownDelay duration
    Optional delay before http server shutdown. During this dealy the servier returns non-OK responses from /health page, so load balancers can route new requests to other servers

# http 监控地址
-httpListenAddr string
    Address to listen for http connections (default ":8482")

# 是否禁用在日志中写入时间戳
-loggerDisableTimestamps
    Whether to disable writing timestamps in logs

# 每秒错误日志数量的限制。 如果每秒发出的错误数量超过给定的数量,那么剩余的错误将被抑制。零值禁用速率限制(默认值为10)
-loggerErrorsPerSecondLimit int
    Per-second limit on the number of ERROR messages. If more than the given number of errors are emitted per second, then the remaining errors are suppressed. Zero value disables the rate limit (default 10)

# 日志格式
-loggerFormat string
    Format for logs. Possible values: default, json (default "default")

# 日志等级
-loggerLevel string
    Minimum level of errors to log. Possible values: INFO, WARN, ERROR, FATAL, PANIC (default "INFO")

# 日志输出
-loggerOutput string
    Output for the logs. Supported values: stderr, stdout (default "stderr")

# VictoriaMetrics可用的缓存大小,如果设置为非0值,将覆盖-memory.allowedPercent参数。值太低可能会增加高速缓存未命中率,这通常会导致更高的CPU和磁盘IO使用率。值太高可能会从OS页面缓存中驱逐过多数据,这将导致更高的磁盘IO使用率。
支持以下值的可选后缀:KB,MB,GB,KiB,MiB,GiB(默认0)
-memory.allowedBytes value
    Allowed size of system memory VictoriaMetrics caches may occupy. This option overrides -memory.allowedPercent if set to non-zero value. Too low value may increase cache miss rate, which usually results in higher CPU and disk IO usage. Too high value may evict too much data from OS page cache, which will result in higher disk IO usage
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 0)

# VictoriaMetrics可用的缓存占用系统内存的百分比。默认60% 
-memory.allowedPercent float
    Allowed percent of system memory VictoriaMetrics caches may occupy. See also -memory.allowedBytes. Too low value may increase cache miss rate, which usually results in higher CPU and disk IO usage. Too high value may evict too much data from OS page cache, which will result in higher disk IO usage (default 60)

# 每个值要存储的精度位数。较低的精度位以精度损失为代价提高了数据压缩比(默认为64)
-precisionBits int
    The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64)

# 数据保留时长,时间戳在该值之外的数据将被自动删除。
支持以下可选后缀:h(小时),d(天),w(周),y(年)。如果未设置后缀,则持续时间以月为单位(默认为1)
-retentionPeriod value
    Data with timestamps outside the retentionPeriod is automatically deleted
    The following optional suffixes are supported: h (hour), d (day), w (week), y (year). If suffix isn't set, then the duration is counted in months (default 1)

# 禁用RPC流量压缩。 这样可以减少CPU使用率,但会占用更高的网络带宽
-rpc.disableCompression
    Disable compression of RPC traffic. This reduces CPU usage at the cost of higher network bandwidth usage

# 每次搜索返回的最大标签建数量
-search.maxTagKeys int
    The maximum number of tag keys returned per search (default 100000)

# 从/metrics/find 返回的标签值后缀的最大数量(默认为100000)
-search.maxTagValueSuffixesPerSearch int
    The maximum number of tag value suffixes returned from /metrics/find (default 100000)

# 每次搜索返回的标签值的最大数量(默认为100000)
-search.maxTagValues int
    The maximum number of tag values returned per search (default 100000)

# 每次搜索扫描可以支持的独立事件序列的最大数量
-search.maxUniqueTimeseries int
    The maximum number of unique time series each search can scan (default 300000)

# 用于小型合并的最大CPU内核数。如果设置为0,则使用默认值
-smallMergeConcurrency int
    The maximum number of CPU cores to use for small merges. Default value is used if set to 0

# authKey,必须以查询字符串的形式传递给/snapshot* 接口
-snapshotAuthKey string
    authKey, which must be passed in query string to /snapshot* pages

# 数据存储路径
-storageDataPath string
    Path to storage data (default "vmstorage-data")

# 是否启动tls
-tls
    Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
    Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs, since RSA certs are slow
-tlsKeyFile string
    Path to file with TLS key. Used only if -tls is set
-version
    Show VictoriaMetrics version
-vminsertAddr string
    TCP address to accept connections from vminsert services (default ":8400")
-vmselectAddr string
    TCP address to accept connections from vmselect services (default ":8401")

vminsert

./vminsert-prod --help
vminsert-20201116-190946-tags-v1.47.0-cluster-0-ga00df790b
Usage of ./vminsert-prod:

# 导入csv数据时的时间戳间隔。最小时间间隔为1ms,使用较高的时间间隔(如1s)可以有效降低磁盘占用
-csvTrimTimestamp duration
    Trim timestamps when importing csv data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms)
-enableTCP6
    Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP is used
-envflag.enable
    Whether to enable reading flags from environment variables additionally to command line. Command line flag values have priority over values from environment vars. Flags are read only from command line if this flag isn't set
-envflag.prefix string
    Prefix for environment variables if -envflag.enable is set
-fs.disableMmap
    Whether to use pread() instead of mmap() for reading data files. By default mmap() is used for 64-bit arches and pread() is used for 32-bit arches, since they cannot read data files bigger than 2^32 bytes in memory. mmap() is usually faster for reading small data chunks than pread()

# 监听Graphite数据的tcp和udp地址,为空则不监听
-graphiteListenAddr string
    TCP and UDP address to listen for Graphite plaintext data. Usually :2003 must be set. Doesn't work if empty

# Graphite数据时间戳间隔时间
-graphiteTrimTimestamp duration
    Trim timestamps for Graphite data to this duration. Minimum practical duration is 1s. Higher duration (i.e. 1m) may be used for reducing disk space usage for timestamp data (default 1s)
-http.connTimeout duration
    Incoming http connections are closed after the configured timeout. This may help spreading incoming load among a cluster of services behind load balancer. Note that the real timeout may be bigger by up to 10% as a protection from Thundering herd problem (default 2m0s)
-http.disableResponseCompression
    Disable compression of HTTP responses for saving CPU resources. By default compression is enabled to save network bandwidth
-http.idleConnTimeout duration
    Timeout for incoming idle http connections (default 1m0s)
-http.maxGracefulShutdownDuration duration
    The maximum duration for graceful shutdown of HTTP server. Highly loaded server may require increased value for graceful shutdown (default 7s)
-http.pathPrefix string
    An optional prefix to add to all the paths handled by http server. For example, if '-http.pathPrefix=/foo/bar' is set, then all the http requests will be handled on '/foo/bar/*' paths. This may be useful for proxied requests. See https://www.robustperception.io/using-external-urls-and-proxies-with-prometheus
-http.shutdownDelay duration
    Optional delay before http server shutdown. During this dealy the servier returns non-OK responses from /health page, so load balancers can route new requests to other servers
-httpListenAddr string
    Address to listen for http connections (default ":8480")

# /api/v1/import 接口接收的最大数据长度,可以通过max_rows_per_line url参数修改
-import.maxLineLen max_rows_per_line
    The maximum length in bytes of a single line accepted by /api/v1/import; the line length can be limited with max_rows_per_line query arg passed to /api/v1/export
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 104857600)

# 单次解析influx数据的最大长度
-influx.maxLineSize value
    The maximum size in bytes for a single Influx line during parsing
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 262144)

# influx地址
-influxListenAddr http://<vminsert>:8480/insert/<accountID>/influx/write
    TCP and UDP address to listen for Influx line protocol data. Usually :8189 must be set. Doesn't work if empty. This flag isn't needed when ingesting data over HTTP - just send it to http://<vminsert>:8480/insert/<accountID>/influx/write

# 插入influx时的metric名称分隔符
-influxMeasurementFieldSeparator string
    Separator for '{measurement}{separator}{field_name}' metric name when inserted via Influx line protocol (default "_")

# 使用field_name 最为metric名称,忽略measurement 和 -influxMeasurementFieldSeparator
-influxSkipMeasurement
    Uses '{field_name}' as a metric name while ignoring '{measurement}' and '-influxMeasurementFieldSeparator'

# 如果Influx行仅包含一个字段,请使用“ {measurement}”而不是“ {measurement} {separator} {field_name}”作为模板名称
-influxSkipSingleField
    Uses '{measurement}' instead of '{measurement}{separator}{field_name}' for metic name if Influx line contains only a single field
-influxTrimTimestamp duration
    Trim timestamps for Influx line protocol data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms)

# 因为-maxConcurrentInserts 导致的插入队列最大等待时间
-insert.maxQueueDuration duration
    The maximum duration for waiting in the queue for insert requests due to -maxConcurrentInserts (default 1m0s)
-loggerDisableTimestamps
    Whether to disable writing timestamps in logs
-loggerErrorsPerSecondLimit int
    Per-second limit on the number of ERROR messages. If more than the given number of errors are emitted per second, then the remaining errors are suppressed. Zero value disables the rate limit (default 10)
-loggerFormat string
    Format for logs. Possible values: default, json (default "default")
-loggerLevel string
    Minimum level of errors to log. Possible values: INFO, WARN, ERROR, FATAL, PANIC (default "INFO")
-loggerOutput string
    Output for the logs. Supported values: stderr, stdout (default "stderr")

# 最大并发插入数,默认值在大多数情况下都是最优解,因为他最大程度的减少了并发开销。和-insert.maxQueueDuration配合使用
-maxConcurrentInserts int
    The maximum number of concurrent inserts. Default value should work for most cases, since it minimizes the overhead for concurrent inserts. This option is tigthly coupled with -insert.maxQueueDuration (default 8)

# 单个Prometheus remote_write API请求的最大长度
-maxInsertRequestSize value
    The maximum size in bytes of a single Prometheus remote_write API request
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 33554432)

# 每个时序数据能够接受的最大label数量
-maxLabelsPerTimeseries int
    The maximum number of labels accepted per time series. Superflouos labels are dropped (default 30)
-memory.allowedBytes value
    Allowed size of system memory VictoriaMetrics caches may occupy. This option overrides -memory.allowedPercent if set to non-zero value. Too low value may increase cache miss rate, which usually results in higher CPU and disk IO usage. Too high value may evict too much data from OS page cache, which will result in higher disk IO usage
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 0)
-memory.allowedPercent float
    Allowed percent of system memory VictoriaMetrics caches may occupy. See also -memory.allowedBytes. Too low value may increase cache miss rate, which usually results in higher CPU and disk IO usage. Too high value may evict too much data from OS page cache, which will result in higher disk IO usage (default 60)
-opentsdbHTTPListenAddr string
    TCP address to listen for OpentTSDB HTTP put requests. Usually :4242 must be set. Doesn't work if empty
-opentsdbListenAddr string
    TCP and UDP address to listen for OpentTSDB metrics. Telnet put messages and HTTP /api/put messages are simultaneously served on TCP port. Usually :4242 must be set. Doesn't work if empty
-opentsdbTrimTimestamp duration
    Trim timestamps for OpenTSDB 'telnet put' data to this duration. Minimum practical duration is 1s. Higher duration (i.e. 1m) may be used for reducing disk space usage for timestamp data (default 1s)
-opentsdbhttp.maxInsertRequestSize value
    The maximum size of OpenTSDB HTTP put request
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 33554432)
-opentsdbhttpTrimTimestamp duration
    Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms)

# 标签重置的配置文件路径
-relabelConfig string
    Optional path to a file with relabeling rules, which are applied to all the ingested metrics. See https://victoriametrics.github.io/#relabeling for details

# 副本数,即在-storageNode要复制多少个副本。当-replicationFactor>1时,vmselect必须以-dedup.minScrapeInterval=1ms运行,以进行重复数据的删除。~~vmselect的-dedup.minScrapeInterval 可以大一些~~
-replicationFactor int
    Replication factor for the ingested data, i.e. how many copies to make among distinct -storageNode instances. Note that vmselect must run with -dedup.minScrapeInterval=1ms for data de-duplication when replicationFactor is greater than 1. Higher values for -dedup.minScrapeInterval at vmselect is OK (default 1)
-rpc.disableCompression
    Disable compression of RPC traffic. This reduces CPU usage at the cost of higher network bandwidth usage

# vmstorage节点列表
-storageNode array
    Address of vmstorage nodes; usage: -storageNode=vmstorage-host1:8400 -storageNode=vmstorage-host2:8400
    Supports array of values separated by comma or specified via multiple flags.
-tls
    Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
    Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs, since RSA certs are slow
-tlsKeyFile string
    Path to file with TLS key. Used only if -tls is set
-version
    Show VictoriaMetrics version

vmselect

./vmselect-prod --help
vmselect-20201116-190952-tags-v1.47.0-cluster-0-ga00df790b
Usage of ./vmselect-prod:

# 缓存文件的存储地址,如果不配置则不启用缓存
-cacheDataPath string
    Path to directory for cache files. Cache isn't saved if empty

# 如果同一个metric的两条数据时间差小于该值,则作为重复数据删除。如果为0则不启用去重;
-dedup.minScrapeInterval duration
    Remove superflouos samples from time series if they are located closer to each other than this duration. This may be useful for reducing overhead when multiple identically configured Prometheus instances write data to the same VictoriaMetrics. Deduplication is disabled if the -dedup.minScrapeInterval is 0
-enableTCP6
    Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP is used
-envflag.enable
    Whether to enable reading flags from environment variables additionally to command line. Command line flag values have priority over values from environment vars. Flags are read only from command line if this flag isn't set
-envflag.prefix string
    Prefix for environment variables if -envflag.enable is set
-fs.disableMmap
    Whether to use pread() instead of mmap() for reading data files. By default mmap() is used for 64-bit arches and pread() is used for 32-bit arches, since they cannot read data files bigger than 2^32 bytes in memory. mmap() is usually faster for reading small data chunks than pread()
-http.connTimeout duration
    Incoming http connections are closed after the configured timeout. This may help spreading incoming load among a cluster of services behind load balancer. Note that the real timeout may be bigger by up to 10% as a protection from Thundering herd problem (default 2m0s)
-http.disableResponseCompression
    Disable compression of HTTP responses for saving CPU resources. By default compression is enabled to save network bandwidth
-http.idleConnTimeout duration
    Timeout for incoming idle http connections (default 1m0s)
-http.maxGracefulShutdownDuration duration
    The maximum duration for graceful shutdown of HTTP server. Highly loaded server may require increased value for graceful shutdown (default 7s)
-http.pathPrefix string
    An optional prefix to add to all the paths handled by http server. For example, if '-http.pathPrefix=/foo/bar' is set, then all the http requests will be handled on '/foo/bar/*' paths. This may be useful for proxied requests. See https://www.robustperception.io/using-external-urls-and-proxies-with-prometheus
-http.shutdownDelay duration
    Optional delay before http server shutdown. During this dealy the servier returns non-OK responses from /health page, so load balancers can route new requests to other servers
-httpListenAddr string
    Address to listen for http connections (default ":8481")
-loggerDisableTimestamps
    Whether to disable writing timestamps in logs
-loggerErrorsPerSecondLimit int
    Per-second limit on the number of ERROR messages. If more than the given number of errors are emitted per second, then the remaining errors are suppressed. Zero value disables the rate limit (default 10)
-loggerFormat string
    Format for logs. Possible values: default, json (default "default")
-loggerLevel string
    Minimum level of errors to log. Possible values: INFO, WARN, ERROR, FATAL, PANIC (default "INFO")
-loggerOutput string
    Output for the logs. Supported values: stderr, stdout (default "stderr")
-memory.allowedBytes value
    Allowed size of system memory VictoriaMetrics caches may occupy. This option overrides -memory.allowedPercent if set to non-zero value. Too low value may increase cache miss rate, which usually results in higher CPU and disk IO usage. Too high value may evict too much data from OS page cache, which will result in higher disk IO usage
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 0)
-memory.allowedPercent float
    Allowed percent of system memory VictoriaMetrics caches may occupy. See also -memory.allowedBytes. Too low value may increase cache miss rate, which usually results in higher CPU and disk IO usage. Too high value may evict too much data from OS page cache, which will result in higher disk IO usage (default 60)

# 当前时间和响应数据的最大差值,只查询原始数据,不适用缓存。如果发现数据源和VictoriaMetrics之间的时间同步存在问题,请增加此值。
-search.cacheTimestampOffset duration
    The maximum duration since the current time for response data, which is always queried from the original raw data, without using the response cache. Increase this value if you see gaps in responses due to time synchronization issues between VictoriaMetrics and data sources (default 5m0s)

# 如果部分-storageNode实例无法执行查询时,是否拒绝部分响应。此项在保证一致性的时候牺牲了可用性
-search.denyPartialResponse
    Whether to deny partial responses if a part of -storageNode instances fail to perform queries; this trades availability over consistency; see also -search.maxQueryDuration and -search.storageTimeout

# 禁止返回数据缓存。此项在数据回填时候很有用
-search.disableCache
    Whether to disable response caching. This may be useful during data backfilling

-search.latencyOffset duration
    The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s)

# 在日志中记录超过此时间的查询。0则禁用慢查询日志
-search.logSlowQueryDuration duration
    Log queries with execution time exceeding this value. Zero disables slow query logging (default 5s)

# 查询搜索的并发数,不应该很大,因为单个搜索有可能让所有cpu饱和。
-search.maxConcurrentRequests int
    The maximum number of concurrent search requests. It shouldn't be high, since a single request can saturate all the CPU cores. See also -search.maxQueueDuration (default 4)

# /api/v1/export 导出接口的最大持续时间
-search.maxExportDuration duration
    The maximum duration for /api/v1/export call (default 720h0m0s)

# 
-search.maxLookback duration
    Synonim to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons

# 一个请求中单个时间序列的最大点数
-search.maxPointsPerTimeseries int
    The maximum points per a single timeseries returned from the search (default 30000)

# 查询执行的最大持续时间
-search.maxQueryDuration duration
    The maximum duration for query execution; see also -search.storageTimeout (default 30s)

# 查询语句长度的最大字节数
-search.maxQueryLen value
    The maximum search query length in bytes
    Supports the following optional suffixes for values: KB, MB, GB, KiB, MiB, GiB (default 16384)

# 达到 -search.maxConcurrentRequests 时,查询请求的最大等待时间
-search.maxQueueDuration duration
    The maximum time the request waits for execution when -search.maxConcurrentRequests limit is reached; see also -search.maxQueryDuration (default 10s)

# 
-search.maxStalenessInterval duration
    The maximum interval for staleness calculations. By default it is automatically calculated from the median interval between samples. This flag could be useful for tuning Prometheus data model closer to Influx-style data model. See https://prometheus.io/docs/prometheus/latest/querying/basics/#staleness for details. See also '-search.maxLookback' flag, which has the same meaning due to historical reasons

# 
-search.minStalenessInterval duration
    The minimum interval for staleness calculations. This flag could be useful for removing gaps on graphs generated from time series with irregular intervals between samples. See also '-search.maxStalenessInterval'

# 可选authKey,用于通过/internal/resetRollupResultCache 接口来重置缓存
-search.resetCacheAuthKey string
    Optional authKey for resetting rollup cache via /internal/resetRollupResultCache call

# 在每个存储上的查询超时时间。该项允许某些storage节点查询缓慢时,返回部分查询数据
-search.storageTimeout duration
    The timeout for per-storage query processing; this allows returning partial responses if certain -storageNode instances slowly process the query; see also -search.maxQueryDuration and -search.denyPartialResponse command-line flags

-search.treatDotsAsIsInRegexps
    Whether to treat dots as is in regexp label filters used in queries. For example, foo{bar=~"a.b.c"} will be automatically converted to foo{bar=~"a\\.b\\.c"}, i.e. all the dots in regexp filters will be automatically escaped in order to match only dot char instead of matching any char. Dots in ".+", ".*" and ".{n}" regexps aren't escaped. Such escaping can be useful when querying Graphite data

# 查询节点列表。
-selectNode array
    Addresses of vmselect nodes; usage: -selectNode=vmselect-host1:8481 -selectNode=vmselect-host2:8481
    Supports array of values separated by comma or specified via multiple flags.

# 存储节点列表
-storageNode array
    Addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1:8401 -storageNode=vmstorage-host2:8401
    Supports array of values separated by comma or specified via multiple flags.
-tls
    Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
    Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs, since RSA certs are slow
-tlsKeyFile string
    Path to file with TLS key. Used only if -tls is set
-version
    Show VictoriaMetrics version
赞(0) 打赏
未经允许不得转载:陈桂林博客 » VictoriaMetrics启动参数说明

相关推荐

  • 暂无文章

大佬们的评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

全新“一站式”建站,高质量、高售后的一条龙服务

橙子建站.极速智能建站8折购买虚拟主机

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏