Skip to content

Instantly share code, notes, and snippets.

@jen-huang
Last active March 18, 2021 20:45
Show Gist options
  • Save jen-huang/c39232dfa59d7f97327f5af7909dc5f4 to your computer and use it in GitHub Desktop.
Save jen-huang/c39232dfa59d7f97327f5af7909dc5f4 to your computer and use it in GitHub Desktop.
# Use objects instead of strings, this will allow for more package configuration
# options in the future, such as the APM allow/blocklist settings use case on Cloud
xpack.fleet.packages:
- name: apache
version: 0.3.4 # if `latest` or maybe undefined?, Kibana needs to get latest pkg & install
# "Policies" is used in various places, use `agent_policies` to be more specific
# agent_policies: NewAgentPolicy & { package_policies: PackagePolicy[] }
# Do these preconfigured policies have flag saying so? - Yes they do, with a flag for user-defined ID
xpack.fleet.agent_policies:
- id: some-user-input # use this field when we create the agent policy SO
name: Preconfigured Policy
description: A test preconfigured policy
namespace: 'test_namespace'
monitoring_enabled:
- logs
- metrics
# Each package policy is a new SO
package_policies: # Kibana should fill this out with the newly created package policy SO IDs
- name: Preconfigured system integration
description: System integration description
namespace: 'test_namespace'
# policy_id: Kibana should fill this in from the newly created agent policy SO id
# output_id: Kibana should fill this in by finding the default output SO id ()
package:
# Kibana should error if the package specified here is not installed
name: system
# version: Kibana needs to get currently installed pkg
# title: Kibana needs to fill this in from pkg info
# Each input is the type `NewPackagePolicyInput`
# We should deep merge the results of `packageToPackagePolicyInputs` with the user settings here?
inputs:
- type: system/metrics
enabled: true
# Input level vars
vars:
- name: system.hostfs # Kibana needs to use this field as a key to match NewPackagePolicyInput
value: home/test
# type: text # User shouldn't have to specify this, this should be prefilled by the deep merge with packageToPackagePolicyInputs
- ... # Additional input vars
streams:
- data_stream:
type: metrics
dataset: system.core
enabled: true
# Stream level vars
vars:
- name: period
value: 10s
# type: text
- ... # Additional stream vars
- ... # Additional streams
- ... # Additional inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment