-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not ignore vars when there are no inputs #70
Comments
@jen-huang As most of these changes need to happen in Kibana, would be great to get your input on that. Currently all the templates are living inside the |
If you mean if it validates, yes it does.
Good point; but IIUC that wouldn't ever work without major changes... The apm-server spec expects an I don't know how else we could instruct Elastic Agent to spin up an apm-server process and pass it that config. Not only that, but we also need the So it doesn't look like we can just omit the input; rather Kibana should be able to create an input (for apm-server in this case) silently behind the curtains. Maybe the way forward is something similar to the proposal in #69: define a
policy_templates:
- name: apm
title: Elastic APM Integration
inputs:
- type: apm
title: Collect application traces
force_enabled: true # don't display toggle switch
vars:
...
title: APM data stream
type: traces
streams:
- input: apm
enabled: true
hidden: true # don't display the input
title: (It doesn't matter, no one will see) Will produce the policy:
inputs:
- id: <randomly-generated>
name: <user-defined>
type: apm
meta:
package:
name: apm
version: 0.1.0
data_stream:
namespace: <user-defined>
streams:
- id: <generated>
data_stream:
dataset: <generated>
type: traces
apm-server: # this would come from the hbs template
... WDYT? |
I think I don't get why there is |
Yes, your assumption is correct. Without that limitation, a full config for APM I think should look like this: id: dac0e3c0-19c8-11eb-9ffd-b9afa78c7e76
revision: 1
outputs:
default:
type: elasticsearch
hosts:
- 'http://localhost:9200'
agent:
monitoring:
enabled: true
use_output: default
logs: true
metrics: true
inputs:
- id: bda84570-19ec-11eb-8f6d-192e8cf5c9dd
name: apm-integration
revision: 1
type: apm
use_output: default
meta:
package:
name: apm
version: 0.1.0
data_stream:
namespace: default
apm-server:
rum.enabled: true
# more specific apm-server settings
fleet:
kibana:
protocol: http
hosts:
- 'localhost:5601' I will update the original issue 👌 |
Great, lets make sure we can make this possible. @jen-huang Currently when building a config, we rely on |
* Implement --version flag on cluster up,update subcommands * Adding godoc for DefaltVersion * Use the DefaultVersion for docker-compose down * Fixing godoc
Consider this snippet of an
0.1.0/manifest.yml
example:If my data stream(s) don't have a
streams
key, the generated policy will just have aninput
withstreams: []
, and the variablehost
will not be there even if I had filled it in the UI.For apm-server we don't have streams, so we need that the
vars
defined at the policy level get picked up and rendered in the generated policy.Not sure on which repo this issue belongs, let me know if it should be transferred to Kibana.
Update: The ideal way forward is that the top level config shows right under
inputs
, and not under astreams
entry. For this we need hbs templates at the top level too.The text was updated successfully, but these errors were encountered: