Documentation
¶
Index ¶
- Variables
- func CheckRelabelConfigs() error
- func CheckStreamAggrConfigs() error
- func Init()
- func InitSecretFlags()
- func MultitenancyEnabled() bool
- func PushDropSamplesOnFailure(at *auth.Token, wr *prompbmarshal.WriteRequest)
- func StartIngestionRateLimiter()
- func Stop()
- func StopIngestionRateLimiter()
- func TryPush(at *auth.Token, wr *prompbmarshal.WriteRequest) bool
Constants ¶
This section is empty.
Variables ¶
var ( // ErrQueueFullHTTPRetry must be returned when TryPush() returns false. ErrQueueFullHTTPRetry = &httpserver.ErrorWithStatusCode{ Err: fmt.Errorf("remote storage systems cannot keep up with the data ingestion rate; retry the request later " + "or remove -remoteWrite.disableOnDiskQueue from vmagent command-line flags, so it could save pending data to -remoteWrite.tmpDataPath; " + "see https://docs.victoriametrics.com/vmagent/#disabling-on-disk-persistence"), StatusCode: http.StatusTooManyRequests, } )
Functions ¶
func CheckRelabelConfigs ¶ added in v1.35.6
func CheckRelabelConfigs() error
CheckRelabelConfigs checks -remoteWrite.relabelConfig and -remoteWrite.urlRelabelConfig.
func CheckStreamAggrConfigs ¶ added in v1.90.0
func CheckStreamAggrConfigs() error
CheckStreamAggrConfigs checks -remoteWrite.streamAggr.config and -streamAggr.config.
func Init ¶
func Init()
Init initializes remotewrite.
It must be called after flag.Parse().
Stop must be called for graceful shutdown.
func InitSecretFlags ¶ added in v1.42.0
func InitSecretFlags()
InitSecretFlags must be called after flag.Parse and before any logging.
func MultitenancyEnabled ¶ added in v1.64.0
func MultitenancyEnabled() bool
MultitenancyEnabled returns true if -enableMultitenantHandlers is specified.
func PushDropSamplesOnFailure ¶ added in v1.96.0
func PushDropSamplesOnFailure(at *auth.Token, wr *prompbmarshal.WriteRequest)
PushDropSamplesOnFailure pushes wr to the configured remote storage systems set via -remoteWrite.url
PushDropSamplesOnFailure can modify wr contents.
func StartIngestionRateLimiter ¶ added in v1.97.7
func StartIngestionRateLimiter()
StartIngestionRateLimiter starts ingestion rate limiter.
Ingestion rate limiter must be started before Init() call.
StopIngestionRateLimiter must be called before Stop() call in order to unblock all the callers to ingestion rate limiter. Otherwise deadlock may occur at Stop() call.
func Stop ¶
func Stop()
Stop stops remotewrite.
It is expected that nobody calls TryPush during and after the call to this func.
func StopIngestionRateLimiter ¶ added in v1.97.7
func StopIngestionRateLimiter()
StopIngestionRateLimiter stops ingestion rate limiter.
func TryPush ¶ added in v1.96.0
func TryPush(at *auth.Token, wr *prompbmarshal.WriteRequest) bool
TryPush tries sending wr to the configured remote storage systems set via -remoteWrite.url
TryPush can modify wr contents, so the caller must re-initialize wr before calling TryPush() after unsuccessful attempt. TryPush may send partial data from wr on unsuccessful attempt, so repeated call for the same wr may send the data multiple times.
The caller must return ErrQueueFullHTTPRetry to the client, which sends wr, if TryPush returns false.
Types ¶
This section is empty.