Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
17
migrations/common/filter_options.go
Normal file
17
migrations/common/filter_options.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package common
|
||||
|
||||
type FilterOptions struct {
|
||||
NamePass []string `toml:"namepass,omitempty"`
|
||||
NameDrop []string `toml:"namedrop,omitempty"`
|
||||
FieldPassOld []string `toml:"pass,omitempty"`
|
||||
FieldPass []string `toml:"fieldpass,omitempty"`
|
||||
FieldInclude []string `toml:"fieldinclude,omitempty"`
|
||||
FieldDropOld []string `toml:"drop,omitempty"`
|
||||
FieldDrop []string `toml:"fielddrop,omitempty"`
|
||||
FieldExclude []string `toml:"fieldexclude,omitempty"`
|
||||
TagPassFilters map[string][]string `toml:"tagpass,omitempty"`
|
||||
TagDropFilters map[string][]string `toml:"tagdrop,omitempty"`
|
||||
TagExclude []string `toml:"tagexclude,omitempty"`
|
||||
TagInclude []string `toml:"taginclude,omitempty"`
|
||||
MetricPass string `toml:"metricpass,omitempty"`
|
||||
}
|
43
migrations/common/input_options.go
Normal file
43
migrations/common/input_options.go
Normal file
|
@ -0,0 +1,43 @@
|
|||
package common
|
||||
|
||||
type InputOptions struct {
|
||||
// General options
|
||||
Interval string `toml:"interval,omitempty"`
|
||||
Precision string `toml:"precision,omitempty"`
|
||||
CollectionJitter string `toml:"collection_jitter,omitempty"`
|
||||
CollectionOffset string `toml:"collection_offset,omitempty"`
|
||||
NamePrefix string `toml:"name_prefix,omitempty"`
|
||||
NameSuffix string `toml:"name_suffix,omitempty"`
|
||||
NameOverride string `toml:"name_override,omitempty"`
|
||||
Alias string `toml:"alias,omitempty"`
|
||||
Tags map[string]string `toml:"tags,omitempty"`
|
||||
|
||||
// Filter options
|
||||
NamePass []string `toml:"namepass,omitempty"`
|
||||
NameDrop []string `toml:"namedrop,omitempty"`
|
||||
FieldPassOld []string `toml:"pass,omitempty"`
|
||||
FieldPass []string `toml:"fieldpass,omitempty"`
|
||||
FieldInclude []string `toml:"fieldinclude,omitempty"`
|
||||
FieldDropOld []string `toml:"drop,omitempty"`
|
||||
FieldDrop []string `toml:"fielddrop,omitempty"`
|
||||
FieldExclude []string `toml:"fieldexclude,omitempty"`
|
||||
TagPassFilters map[string][]string `toml:"tagpass,omitempty"`
|
||||
TagDropFilters map[string][]string `toml:"tagdrop,omitempty"`
|
||||
TagExclude []string `toml:"tagexclude,omitempty"`
|
||||
TagInclude []string `toml:"taginclude,omitempty"`
|
||||
MetricPass string `toml:"metricpass,omitempty"`
|
||||
}
|
||||
|
||||
func (io *InputOptions) Migrate() {
|
||||
io.FieldInclude = append(io.FieldInclude, io.FieldPassOld...)
|
||||
io.FieldInclude = append(io.FieldInclude, io.FieldPass...)
|
||||
|
||||
io.FieldPassOld = nil
|
||||
io.FieldPass = nil
|
||||
|
||||
io.FieldExclude = append(io.FieldExclude, io.FieldDropOld...)
|
||||
io.FieldExclude = append(io.FieldExclude, io.FieldDrop...)
|
||||
|
||||
io.FieldDropOld = nil
|
||||
io.FieldDrop = nil
|
||||
}
|
35
migrations/common/output_options.go
Normal file
35
migrations/common/output_options.go
Normal file
|
@ -0,0 +1,35 @@
|
|||
package common
|
||||
|
||||
type OutputOptions struct {
|
||||
// General options
|
||||
Alias string `toml:"alias,omitempty"`
|
||||
|
||||
// Filter options
|
||||
NamePass []string `toml:"namepass,omitempty"`
|
||||
NameDrop []string `toml:"namedrop,omitempty"`
|
||||
FieldPassOld []string `toml:"pass,omitempty"`
|
||||
FieldPass []string `toml:"fieldpass,omitempty"`
|
||||
FieldInclude []string `toml:"fieldinclude,omitempty"`
|
||||
FieldDropOld []string `toml:"drop,omitempty"`
|
||||
FieldDrop []string `toml:"fielddrop,omitempty"`
|
||||
FieldExclude []string `toml:"fieldexclude,omitempty"`
|
||||
TagPassFilters map[string][]string `toml:"tagpass,omitempty"`
|
||||
TagDropFilters map[string][]string `toml:"tagdrop,omitempty"`
|
||||
TagExclude []string `toml:"tagexclude,omitempty"`
|
||||
TagInclude []string `toml:"taginclude,omitempty"`
|
||||
MetricPass string `toml:"metricpass,omitempty"`
|
||||
}
|
||||
|
||||
func (oo *OutputOptions) Migrate() {
|
||||
oo.FieldInclude = append(oo.FieldInclude, oo.FieldPassOld...)
|
||||
oo.FieldInclude = append(oo.FieldInclude, oo.FieldPass...)
|
||||
|
||||
oo.FieldPassOld = nil
|
||||
oo.FieldPass = nil
|
||||
|
||||
oo.FieldExclude = append(oo.FieldExclude, oo.FieldDropOld...)
|
||||
oo.FieldExclude = append(oo.FieldExclude, oo.FieldDrop...)
|
||||
|
||||
oo.FieldDropOld = nil
|
||||
oo.FieldDrop = nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue