VictoriaMetrics啟動(dòng)參數(shù)說(shuō)明

https://www.lijiaocn.com/%E9%A1%B9%E7%9B%AE/2020/02/24/prometheus-scale-out-2.html

https://victoriametrics.github.io/

啟動(dòng)參數(shù)涵叮、命令行參數(shù)

Environment variables

可以通過(guò)環(huán)境變量設(shè)置參數(shù):

  • 必須設(shè)置-envflag.enable
  • 參數(shù)名中的每個(gè).必須由_代替(例如-insert.maxQueueDuration <duration>將轉(zhuǎn)換為insert_maxQueueDuration=<duration>)
  • 對(duì)于重復(fù)參數(shù)脑奠,用,作為分隔符將不同的值合并為一個(gè)值(例如-storageNode <nodeA> -storageNode <nodeB>將轉(zhuǎn)換為storageNode=<nodeA>,<nodeB>)
  • 可以使用-envflag.prefix為環(huán)境變量設(shè)置前綴睦柴。例如窘面,如果-envflag.prefix=VM_允瞧,那么env vars必須以VM_開(kāi)頭

vmstorage

./vmstorage-prod --help

# 處理大型合并時(shí)所用的最大cpu核數(shù)
-bigMergeConcurrency int
    The maximum number of CPU cores to use for big merges. Default value is used if set to 0

# 如果時(shí)序數(shù)據(jù)之間的時(shí)間差比該配置小抱完,則剔除驰怎。當(dāng)多個(gè)Prometheus同時(shí)寫入一個(gè)VictoriaMetric時(shí)滤灯,這對(duì)減少開(kāi)銷很有幫助巍杈。當(dāng)設(shè)置為0時(shí)忧饭,不生效。
-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(數(shù)據(jù)保留時(shí)長(zhǎng))之外的查詢筷畦。 設(shè)置后词裤,/api/v1/query_range對(duì)于-retentionPeriod以外的'from'值的查詢,將返回'503 Service Unavailable'錯(cuò)誤鳖宾。 當(dāng)多個(gè)具有不同數(shù)據(jù)保留時(shí)長(zhǎng)的數(shù)據(jù)源隱藏在query-tee后面時(shí)吼砂,該項(xiàng)可能很有用
-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

# 是否監(jiān)聽(tīng)和使用ipv6,默認(rèn)只使用ipv4
-enableTCP6
    Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP is used

# 是否讀取命令行以外的環(huán)境變量的參數(shù)鼎文,命令行參數(shù)的等級(jí)高于環(huán)境變量參數(shù)渔肩。若未設(shè)置時(shí),只讀取命令行參數(shù)拇惋。
-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

# 環(huán)境變量的前綴周偎,如果設(shè)置了-envflag.enable
-envflag.prefix string
    Prefix for environment variables if -envflag.enable is set

# 沒(méi)有新數(shù)據(jù)插入之后,在完成每月分區(qū)的最終合并之前的延遲撑帖。完成最終合并后栏饮,通常會(huì)降低查詢速度和磁盤空間使用率。最終合并的延遲過(guò)短可能會(huì)導(dǎo)致磁盤IO使用率和CPU使用率增加(默認(rèn)為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)

# 授權(quán)字符串磷仰,必須以查詢字符串的形式傳遞給/internal/force_flush 接口
-forceFlushAuthKey string
    authKey, which must be passed in query string to /internal/force_flush pages

# 授權(quán)字符串袍嬉,必須以查詢字符串的形式傳遞給/internal/force_merge 接口
-forceMergeAuthKey string
    authKey, which must be passed in query string to /internal/force_merge pages

# 是否使用pread()代替mmap()讀取數(shù)據(jù)文件。默認(rèn)情況下,mmap()用于64位架構(gòu)伺通,而pread()用于32位架構(gòu)箍土,因?yàn)樗鼈儫o(wú)法讀取內(nèi)存中大于2^32字節(jié)的數(shù)據(jù)文件。mmap()通常比pread()更快地讀取小數(shù)據(jù)塊罐监。
-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請(qǐng)求在超過(guò)該值后吴藻,將被關(guān)閉。這可能有助于在負(fù)載均衡器后面的服務(wù)集群之間分配傳入負(fù)載弓柱。請(qǐng)注意沟堡,實(shí)際超時(shí)可能會(huì)增加多達(dá)10%,以防止出現(xiàn)驚群效應(yīng)(默認(rèn)為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響應(yīng)壓縮以節(jié)省CPU資源矢空。默認(rèn)情況下啟用壓縮以節(jié)省網(wǎng)絡(luò)帶寬
-http.disableResponseCompression
    Disable compression of HTTP responses for saving CPU resources. By default compression is enabled to save network bandwidth

# 空閑http請(qǐng)求超時(shí)時(shí)間
-http.idleConnTimeout duration
    Timeout for incoming idle http connections (default 1m0s)

# HTTP server正常關(guān)閉的最大持續(xù)時(shí)間航罗。高負(fù)載服務(wù)器可能需要增加值才能正常關(guān)閉(默認(rèn)為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代理前綴。此項(xiàng)在nginx等代理時(shí)有用
-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 關(guān)閉之前的可選延遲屁药。在此交易期間粥血,http server 為/health 接口返回了non-OK響應(yīng),因此負(fù)載均衡器可以將新請(qǐng)求路由到其他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 監(jiān)控地址
-httpListenAddr string
    Address to listen for http connections (default ":8482")

# 是否禁用在日志中寫入時(shí)間戳
-loggerDisableTimestamps
    Whether to disable writing timestamps in logs

# 每秒錯(cuò)誤日志數(shù)量的限制酿箭。 如果每秒發(fā)出的錯(cuò)誤數(shù)量超過(guò)給定的數(shù)量复亏,那么剩余的錯(cuò)誤將被抑制。零值禁用速率限制(默認(rèn)值為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")

# 日志等級(jí)
-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可用的緩存大小缭嫡,如果設(shè)置為非0值缔御,將覆蓋-memory.allowedPercent參數(shù)。值太低可能會(huì)增加高速緩存未命中率妇蛀,這通常會(huì)導(dǎo)致更高的CPU和磁盤IO使用率刹淌。值太高可能會(huì)從OS頁(yè)面緩存中驅(qū)逐過(guò)多數(shù)據(jù),這將導(dǎo)致更高的磁盤IO使用率讥耗。
支持以下值的可選后綴:KB,MB疹启,GB古程,KiB,MiB喊崖,GiB(默認(rèn)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可用的緩存占用系統(tǒng)內(nèi)存的百分比挣磨。默認(rèn)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)

# 每個(gè)值要存儲(chǔ)的精度位數(shù)。較低的精度位以精度損失為代價(jià)提高了數(shù)據(jù)壓縮比(默認(rèn)為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)

# 數(shù)據(jù)保留時(shí)長(zhǎng)荤懂,時(shí)間戳在該值之外的數(shù)據(jù)將被自動(dòng)刪除茁裙。
支持以下可選后綴:h(小時(shí)),d(天)节仿,w(周)晤锥,y(年)。如果未設(shè)置后綴,則持續(xù)時(shí)間以月為單位(默認(rèn)為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使用率女轿,但會(huì)占用更高的網(wǎng)絡(luò)帶寬
-rpc.disableCompression
    Disable compression of RPC traffic. This reduces CPU usage at the cost of higher network bandwidth usage

# 每次搜索返回的最大標(biāo)簽建數(shù)量
-search.maxTagKeys int
    The maximum number of tag keys returned per search (default 100000)

# 從/metrics/find 返回的標(biāo)簽值后綴的最大數(shù)量(默認(rèn)為100000)
-search.maxTagValueSuffixesPerSearch int
    The maximum number of tag value suffixes returned from /metrics/find (default 100000)

# 每次搜索返回的標(biāo)簽值的最大數(shù)量(默認(rèn)為100000)
-search.maxTagValues int
    The maximum number of tag values returned per search (default 100000)

# 每次搜索掃描可以支持的獨(dú)立事件序列的最大數(shù)量
-search.maxUniqueTimeseries int
    The maximum number of unique time series each search can scan (default 300000)

# 用于小型合并的最大CPU內(nèi)核數(shù)。如果設(shè)置為0壕翩,則使用默認(rèn)值
-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

# 數(shù)據(jù)存儲(chǔ)路徑
-storageDataPath string
    Path to storage data (default "vmstorage-data")

# 是否啟動(dòng)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:

# 導(dǎo)入csv數(shù)據(jù)時(shí)的時(shí)間戳間隔。最小時(shí)間間隔為1ms放妈,使用較高的時(shí)間間隔(如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()

# 監(jiān)聽(tīng)Graphite數(shù)據(jù)的tcp和udp地址北救,為空則不監(jiān)聽(tīng)
-graphiteListenAddr string
    TCP and UDP address to listen for Graphite plaintext data. Usually :2003 must be set. Doesn't work if empty

# Graphite數(shù)據(jù)時(shí)間戳間隔時(shí)間
-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 接口接收的最大數(shù)據(jù)長(zhǎng)度,可以通過(guò)max_rows_per_line url參數(shù)修改
-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數(shù)據(jù)的最大長(zhǎng)度
-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時(shí)的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行僅包含一個(gè)字段珍策,請(qǐng)使用“ {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)

# 因?yàn)?maxConcurrentInserts 導(dǎo)致的插入隊(duì)列最大等待時(shí)間
-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")

# 最大并發(fā)插入數(shù),默認(rèn)值在大多數(shù)情況下都是最優(yōu)解挽绩,因?yàn)樗畲蟪潭鹊臏p少了并發(fā)開(kāi)銷膛壹。和-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)

# 單個(gè)Prometheus remote_write API請(qǐng)求的最大長(zhǎng)度
-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)

# 每個(gè)時(shí)序數(shù)據(jù)能夠接受的最大label數(shù)量
-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)

# 標(biāo)簽重置的配置文件路徑
-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

# 副本數(shù),即在-storageNode要復(fù)制多少個(gè)副本唉堪。當(dāng)-replicationFactor>1時(shí)模聋,vmselect必須以-dedup.minScrapeInterval=1ms運(yùn)行,以進(jìn)行重復(fù)數(shù)據(jù)的刪除唠亚。~~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節(jié)點(diǎn)列表
-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:

# 緩存文件的存儲(chǔ)地址链方,如果不配置則不啟用緩存
-cacheDataPath string
    Path to directory for cache files. Cache isn't saved if empty

# 如果同一個(gè)metric的兩條數(shù)據(jù)時(shí)間差小于該值,則作為重復(fù)數(shù)據(jù)刪除灶搜。如果為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)

# 當(dāng)前時(shí)間和響應(yīng)數(shù)據(jù)的最大差值,只查詢?cè)紨?shù)據(jù)割卖,不適用緩存前酿。如果發(fā)現(xiàn)數(shù)據(jù)源和VictoriaMetrics之間的時(shí)間同步存在問(wèn)題,請(qǐng)?jiān)黾哟酥怠?-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實(shí)例無(wú)法執(zhí)行查詢時(shí)鹏溯,是否拒絕部分響應(yīng)罢维。此項(xiàng)在保證一致性的時(shí)候犧牲了可用性
-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

# 禁止返回?cái)?shù)據(jù)緩存。此項(xiàng)在數(shù)據(jù)回填時(shí)候很有用
-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)

# 在日志中記錄超過(guò)此時(shí)間的查詢丙挽。0則禁用慢查詢?nèi)罩?-search.logSlowQueryDuration duration
    Log queries with execution time exceeding this value. Zero disables slow query logging (default 5s)

# 查詢搜索的并發(fā)數(shù)肺孵,不應(yīng)該很大,因?yàn)閱蝹€(gè)搜索有可能讓所有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 導(dǎo)出接口的最大持續(xù)時(shí)間
-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

# 一個(gè)請(qǐng)求中單個(gè)時(shí)間序列的最大點(diǎn)數(shù)
-search.maxPointsPerTimeseries int
    The maximum points per a single timeseries returned from the search (default 30000)

# 查詢執(zhí)行的最大持續(xù)時(shí)間
-search.maxQueryDuration duration
    The maximum duration for query execution; see also -search.storageTimeout (default 30s)

# 查詢語(yǔ)句長(zhǎng)度的最大字節(jié)數(shù)
-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)

# 達(dá)到 -search.maxConcurrentRequests 時(shí)平窘,查詢請(qǐng)求的最大等待時(shí)間
-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,用于通過(guò)/internal/resetRollupResultCache 接口來(lái)重置緩存
-search.resetCacheAuthKey string
    Optional authKey for resetting rollup cache via /internal/resetRollupResultCache call

# 在每個(gè)存儲(chǔ)上的查詢超時(shí)時(shí)間凳怨。該項(xiàng)允許某些storage節(jié)點(diǎn)查詢緩慢時(shí)瑰艘,返回部分查詢數(shù)據(jù)
-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

# 查詢節(jié)點(diǎn)列表。
-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.

# 存儲(chǔ)節(jié)點(diǎn)列表
-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
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市磅叛,隨后出現(xiàn)的幾起案子屑咳,更是在濱河造成了極大的恐慌,老刑警劉巖弊琴,帶你破解...
    沈念sama閱讀 222,681評(píng)論 6 517
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件兆龙,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡敲董,警方通過(guò)查閱死者的電腦和手機(jī)紫皇,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,205評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)腋寨,“玉大人聪铺,你說(shuō)我怎么就攤上這事√汛埽” “怎么了铃剔?”我有些...
    開(kāi)封第一講書人閱讀 169,421評(píng)論 0 362
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)查刻。 經(jīng)常有香客問(wèn)我键兜,道長(zhǎng),這世上最難降的妖魔是什么穗泵? 我笑而不...
    開(kāi)封第一講書人閱讀 60,114評(píng)論 1 300
  • 正文 為了忘掉前任普气,我火速辦了婚禮,結(jié)果婚禮上佃延,老公的妹妹穿的比我還像新娘现诀。我一直安慰自己,他們只是感情好履肃,可當(dāng)我...
    茶點(diǎn)故事閱讀 69,116評(píng)論 6 398
  • 文/花漫 我一把揭開(kāi)白布仔沿。 她就那樣靜靜地躺著,像睡著了一般尺棋。 火紅的嫁衣襯著肌膚如雪封锉。 梳的紋絲不亂的頭發(fā)上,一...
    開(kāi)封第一講書人閱讀 52,713評(píng)論 1 312
  • 那天陡鹃,我揣著相機(jī)與錄音,去河邊找鬼抖坪。 笑死萍鲸,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的擦俐。 我是一名探鬼主播脊阴,決...
    沈念sama閱讀 41,170評(píng)論 3 422
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了嘿期?” 一聲冷哼從身側(cè)響起品擎,我...
    開(kāi)封第一講書人閱讀 40,116評(píng)論 0 277
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎备徐,沒(méi)想到半個(gè)月后萄传,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,651評(píng)論 1 320
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡蜜猾,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,714評(píng)論 3 342
  • 正文 我和宋清朗相戀三年秀菱,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片蹭睡。...
    茶點(diǎn)故事閱讀 40,865評(píng)論 1 353
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡衍菱,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出肩豁,到底是詐尸還是另有隱情脊串,我是刑警寧澤,帶...
    沈念sama閱讀 36,527評(píng)論 5 351
  • 正文 年R本政府宣布清钥,位于F島的核電站琼锋,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏循捺。R本人自食惡果不足惜斩例,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 42,211評(píng)論 3 336
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望从橘。 院中可真熱鬧念赶,春花似錦、人聲如沸恰力。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 32,699評(píng)論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)踩萎。三九已至停局,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間香府,已是汗流浹背董栽。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 33,814評(píng)論 1 274
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留企孩,地道東北人锭碳。 一個(gè)月前我還...
    沈念sama閱讀 49,299評(píng)論 3 379
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像勿璃,于是被迫代替她去往敵國(guó)和親擒抛。 傳聞我的和親對(duì)象是個(gè)殘疾皇子推汽,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,870評(píng)論 2 361

推薦閱讀更多精彩內(nèi)容