Skip to content

Modifications for ease of use#12

Open
StacieClark-Elastic wants to merge 1 commit intoelastic:mainfrom
StacieClark-Elastic:change-directory-structure
Open

Modifications for ease of use#12
StacieClark-Elastic wants to merge 1 commit intoelastic:mainfrom
StacieClark-Elastic:change-directory-structure

Conversation

@StacieClark-Elastic
Copy link
Member

Changed directory structure. Changed names of all CEL template files to cel.yml.hbs. Combined README.md files into one file.Reworked beats-config-from-agent-config-template.sh to use defaults and new directory structure

Checklist

  • I have a mock server and the example runs with no errors.
  • I have documented the CEL program.
  • I have followed the documented layout for examples.

Related issues

  • Relates #12881

…to cel.yml.hbs. Combined README.md files into one file.Reworked beats-config-from-agent-config-template.sh to use defaults and new directory structure
@StacieClark-Elastic StacieClark-Elastic added the enhancement New feature or request label Dec 3, 2025
@StacieClark-Elastic StacieClark-Elastic requested a review from a team as a code owner December 3, 2025 21:06
Copy link

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good restructure.

I made a few comments.

Haven't been over everything in detail but this seems good to merge.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment on a different file: LICENSE.
I think it'll need the Copyright [yyyy] [name of copyright owner] line to be filled out for Elastic.

docker-compose file to run a mock server to serve an API so the example can
be run in realistically. The [README.md](./examples/README.md) explains how to
run the examples.
be run in realistically. The [README.md](./examples/README.md) explains how to

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that's this readme.


As a non-turing complete functional language, the structure of CEL programs can
seem foreign to procedural or object-oriented programmers. For more information
As a non-turing complete functional language, the structure of CEL programs can

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As a non-turing complete functional language, the structure of CEL programs can
As a non-Turing complete functional language, the structure of CEL programs can

Comment on lines +46 to +66
scripts
├── beats-config-from-agent-config-template.sh #script
├── render.js #script that is used by
│ beats-config-from-agent-config-template.sh
└── filebeat-cel-input-base.yml #File for the filebeat cel-input file to
which the CEL progam will be added.
Can be any name.
examples
└──example_name/ # an example directory
├── cel.yml.hbs # agent configuration file. *
├── variables.yml # yaml file with replacement values for handlebar
│ handlebar variables in the cel.yml.hbs file. *
├── filebeat/ # filebeat directory
│ ├── filebeat.yml # filebeat executable configuration file *
│ ├── inputs.d # generated directory to hold filebeat CEL input file *
│ │ └── test.yml # generated filebeat config.
│ └── out # generated directory for output *
└── docker/ # docker files to run a test API server
├── docker-compose.yml
└── files
└── config.yml # contains responses from the API Server

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
scripts
├── beats-config-from-agent-config-template.sh #script
├── render.js #script that is used by
│ beats-config-from-agent-config-template.sh
└── filebeat-cel-input-base.yml #File for the filebeat cel-input file to
which the CEL progam will be added.
Can be any name.
examples
└──example_name/ # an example directory
├── cel.yml.hbs # agent configuration file. *
├── variables.yml # yaml file with replacement values for handlebar
│ handlebar variables in the cel.yml.hbs file. *
├── filebeat/ # filebeat directory
│ ├── filebeat.yml # filebeat executable configuration file *
│ ├── inputs.d # generated directory to hold filebeat CEL input file *
│ │ └── test.yml # generated filebeat config.
│ └── out # generated directory for output *
└── docker/ # docker files to run a test API server
├── docker-compose.yml
└── files
└── config.yml # contains responses from the API Server
.
└── scripts/
├── beats-config-from-agent-config-template.sh # Script.
├── render.js # Helper used by the script.
└── filebeat-cel-input-base.yml # Filebeat CEL input config
to which the CEL progam
will be added. Can be any
name.
.
└── examples/
   └── example_name/ # An example directory.
      ├── cel.yml.hbs # Agent configuration file. *
      ├── variables.yml # YAML file with replacement values for
      │ Handlebars variables in the agent
│ configuration file. *
      ├── filebeat/ # Filebeat directory.
      │   ├── filebeat.yml # Filebeat executable configuration file. *
      │   ├── inputs.d/ # Generated directory for Filebeat config. *
      │   │ └── test.yml # Generated Filebeat config.
      │ └── out/ # Generated directory for output. *
      └── docker/ # Docker files to run a test API server.
         ├── docker-compose.yml
         └── files/
         └── config.yml # Contains responses from the API server.
  • Consistency in space after hash at start of description.
  • Correct indentation of filebeat-cel-input-base.yml.
  • Remove trailing whitespace.
  • Consistency in period at end of description.
  • Wrap lines to 80 chars.
  • Same indentation level for all examples/ descriptions.
  • Consistency in trailing slash for directory names
  • Initial capital for descriptions.

Comment on lines +68 to +72
Files with an "*" after the description can have their name and location
overridden. The locations must be in sync with the 'filebeat.yml' specified
on the commandline when running 'filebeat'. This is an advanced use and not
expected in the normal flow of testing and debugging.
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph could be moved outside of the directory tree code block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants