|
|
@ -186,6 +186,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -288,6 +289,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(50 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(50 * time.Second),
|
|
|
|
ScrapeTimeout: model.Duration(5 * time.Second),
|
|
|
|
ScrapeTimeout: model.Duration(5 * time.Second),
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: 10 * units.MiB,
|
|
|
|
BodySizeLimit: 10 * units.MiB,
|
|
|
|
SampleLimit: 1000,
|
|
|
|
SampleLimit: 1000,
|
|
|
|
TargetLimit: 35,
|
|
|
|
TargetLimit: 35,
|
|
|
@ -384,6 +386,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -438,6 +441,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: model.Duration(10 * time.Second),
|
|
|
|
ScrapeTimeout: model.Duration(10 * time.Second),
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -470,6 +474,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -508,6 +513,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -546,6 +552,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -573,6 +580,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -609,6 +617,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -642,6 +651,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -682,6 +692,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -712,6 +723,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -745,6 +757,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -771,6 +784,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -800,6 +814,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: false,
|
|
|
|
HonorTimestamps: false,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -829,6 +844,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -858,6 +874,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -884,6 +901,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -918,6 +936,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -951,6 +970,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -980,6 +1000,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1009,6 +1030,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1042,6 +1064,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1078,6 +1101,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1133,6 +1157,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1159,6 +1184,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1196,6 +1222,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1239,6 +1266,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1273,6 +1301,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1301,6 +1330,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -1332,6 +1362,7 @@ var expectedConf = &Config{
|
|
|
|
HonorTimestamps: true,
|
|
|
|
HonorTimestamps: true,
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeInterval: model.Duration(15 * time.Second),
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
BodySizeLimit: globBodySizeLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
SampleLimit: globSampleLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
|
TargetLimit: globTargetLimit,
|
|
|
@ -2060,9 +2091,10 @@ func TestGetScrapeConfigs(t *testing.T) {
|
|
|
|
ScrapeTimeout: scrapeTimeout,
|
|
|
|
ScrapeTimeout: scrapeTimeout,
|
|
|
|
ScrapeProtocols: DefaultGlobalConfig.ScrapeProtocols,
|
|
|
|
ScrapeProtocols: DefaultGlobalConfig.ScrapeProtocols,
|
|
|
|
|
|
|
|
|
|
|
|
MetricsPath: "/metrics",
|
|
|
|
MetricsPath: "/metrics",
|
|
|
|
Scheme: "http",
|
|
|
|
Scheme: "http",
|
|
|
|
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
|
|
|
EnableCompression: true,
|
|
|
|
|
|
|
|
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
|
|
|
ServiceDiscoveryConfigs: discovery.Configs{
|
|
|
|
ServiceDiscoveryConfigs: discovery.Configs{
|
|
|
|
discovery.StaticConfig{
|
|
|
|
discovery.StaticConfig{
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2118,6 +2150,8 @@ func TestGetScrapeConfigs(t *testing.T) {
|
|
|
|
MetricsPath: DefaultScrapeConfig.MetricsPath,
|
|
|
|
MetricsPath: DefaultScrapeConfig.MetricsPath,
|
|
|
|
Scheme: DefaultScrapeConfig.Scheme,
|
|
|
|
Scheme: DefaultScrapeConfig.Scheme,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
|
|
|
|
|
|
|
|
HTTPClientConfig: config.HTTPClientConfig{
|
|
|
|
HTTPClientConfig: config.HTTPClientConfig{
|
|
|
|
TLSConfig: config.TLSConfig{
|
|
|
|
TLSConfig: config.TLSConfig{
|
|
|
|
CertFile: filepath.FromSlash("testdata/scrape_configs/valid_cert_file"),
|
|
|
|
CertFile: filepath.FromSlash("testdata/scrape_configs/valid_cert_file"),
|
|
|
@ -2158,6 +2192,8 @@ func TestGetScrapeConfigs(t *testing.T) {
|
|
|
|
MetricsPath: DefaultScrapeConfig.MetricsPath,
|
|
|
|
MetricsPath: DefaultScrapeConfig.MetricsPath,
|
|
|
|
Scheme: DefaultScrapeConfig.Scheme,
|
|
|
|
Scheme: DefaultScrapeConfig.Scheme,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EnableCompression: true,
|
|
|
|
|
|
|
|
|
|
|
|
ServiceDiscoveryConfigs: discovery.Configs{
|
|
|
|
ServiceDiscoveryConfigs: discovery.Configs{
|
|
|
|
&vultr.SDConfig{
|
|
|
|
&vultr.SDConfig{
|
|
|
|
HTTPClientConfig: config.HTTPClientConfig{
|
|
|
|
HTTPClientConfig: config.HTTPClientConfig{
|
|
|
@ -2210,3 +2246,16 @@ func kubernetesSDHostURL() config.URL {
|
|
|
|
tURL, _ := url.Parse("https://localhost:1234")
|
|
|
|
tURL, _ := url.Parse("https://localhost:1234")
|
|
|
|
return config.URL{URL: tURL}
|
|
|
|
return config.URL{URL: tURL}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func TestScrapeConfigDisableCompression(t *testing.T) {
|
|
|
|
|
|
|
|
want, err := LoadFile("testdata/scrape_config_disable_compression.good.yml", false, false, log.NewNopLogger())
|
|
|
|
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out, err := yaml.Marshal(want)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
got := &Config{}
|
|
|
|
|
|
|
|
require.NoError(t, yaml.UnmarshalStrict(out, got))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require.Equal(t, false, got.ScrapeConfigs[0].EnableCompression)
|
|
|
|
|
|
|
|
}
|
|
|
|