Skip to content

Commit

Permalink
Remove os specific config examples and code (#549)
Browse files Browse the repository at this point in the history
As discussed in #533 the os specific configs should be removed from now.
  • Loading branch information
ruflin authored Jun 29, 2020
1 parent 561ab48 commit 3466343
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 74 deletions.
56 changes: 4 additions & 52 deletions testdata/generated/package/datasources/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,7 @@
"show_user": false,
"default": [
"/var/log/nginx/error.log*"
],
"os": {
"darwin": {
"default": [
"/usr/local/var/log/nginx/error.log*"
]
},
"windows": {
"default": [
"c:/programdata/nginx/logs/*error.log*"
]
}
}
]
}
],
"template_path": "logs.yml",
Expand Down Expand Up @@ -104,19 +92,7 @@
"show_user": false,
"default": [
"/var/log/nginx/access.log*"
],
"os": {
"darwin": {
"default": [
"/usr/local/var/log/nginx/access.log*"
]
},
"windows": {
"default": [
"c:/programdata/nginx/logs/*access.log*"
]
}
}
]
}
],
"title": "Title of the stream",
Expand Down Expand Up @@ -239,19 +215,7 @@
"show_user": false,
"default": [
"/var/log/nginx/error.log*"
],
"os": {
"darwin": {
"default": [
"/usr/local/var/log/nginx/error.log*"
]
},
"windows": {
"default": [
"c:/programdata/nginx/logs/*error.log*"
]
}
}
]
}
],
"dataset": "datasources.examplelog1",
Expand All @@ -273,19 +237,7 @@
"show_user": false,
"default": [
"/var/log/nginx/access.log*"
],
"os": {
"darwin": {
"default": [
"/usr/local/var/log/nginx/access.log*"
]
},
"windows": {
"default": [
"c:/programdata/nginx/logs/*access.log*"
]
}
}
]
}
],
"dataset": "datasources.examplelog2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ streams:
multi: true
default:
- /var/log/nginx/error.log*
# I suggest to use ECS fields for this config options here: https://github.com/elastic/ecs/blob/master/schemas/os.yml
# This would need to be based on a predefined definition on what can be filtered on
os.darwin:
default:
- /usr/local/var/log/nginx/error.log*
os.windows:
default:
- c:/programdata/nginx/logs/*error.log*

- input: syslog
title: Title of the stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,3 @@ streams:
multi: true
default:
- /var/log/nginx/access.log*
# I suggest to use ECS fields for this config options here: https://github.com/elastic/ecs/blob/master/schemas/os.yml
# This would need to be based on a predefined definition on what can be filtered on
os.darwin:
default:
- /usr/local/var/log/nginx/access.log*
os.windows:
default:
- c:/programdata/nginx/logs/*access.log*
6 changes: 0 additions & 6 deletions util/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ type Variable struct {
Required bool `config:"required" json:"required" yaml:"required"`
ShowUser bool `config:"show_user" json:"show_user" yaml:"show_user"`
Default interface{} `config:"default" json:"default,omitempty" yaml:"default,omitempty"`
Os *Os `config:"os" json:"os,omitempty" yaml:"os,omitempty"`
}

type Os struct {
Darwin interface{} `config:"darwin" json:"darwin,omitempty" yaml:"darwin,omitempty"`
Windows interface{} `config:"windows" json:"windows,omitempty" yaml:"windows,omitempty"`
}

type fieldEntry struct {
Expand Down

0 comments on commit 3466343

Please sign in to comment.