Skip to content
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

Improve CEL input usage/guidance documentation #36818

Open
ShourieG opened this issue Oct 10, 2023 · 3 comments
Open

Improve CEL input usage/guidance documentation #36818

ShourieG opened this issue Oct 10, 2023 · 3 comments
Assignees
Labels
docs Filebeat Filebeat Team:Security-Service Integrations Security Service Integrations Team

Comments

@ShourieG
Copy link
Contributor

ShourieG commented Oct 10, 2023

At the moment the CEL input documentation lacks a proper guide that demonstrates via extensive examples, how to implement certain api calls and apply complex logic expressions using CEL. This is possibly a barrier for new/inexperienced users to adopt CEL in place of HTTPJSON.

Proposal: Introduce a guidance section within the CEL doc or have a separate dedicated CEL guide doc that will explain step by step with the help of a sample api's how to write CEL programs in Filebeat config to suit a specific use-case. The doc/guide should start with simple api logic and move towards more complex api requests step by step using separate examples.

Such a documentation with have a big impact on the end user and improve adoption of the CEL input in general.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@efd6
Copy link
Contributor

efd6 commented Oct 15, 2023

A diagram like this placed at the Execution section of the CEL input page might be helpful. I don't think mermaid does a good job of the diagram — it makes bad decisions about direction (start should be at the top, but
doing this with TB makes the flow inside the box upside-down) — so it might be better to use graphviz.

flowchart BT
    Start ~~~ Evaluation
    Start --> |initial configured state|Rehydrate(( ))
    Rehydrate --> |rehydrated state| Evaluate[Evaluate CEL Program]
    Wake --> Evaluate
    Sleep -->|Wait| Wake

    subgraph Evaluation
    Evaluate --- Events
    Events([Evaluated state]) --> Publish
    Publish ---o |Events| ES[(Elasticsearch)]
    Publish ---o |Cursor| Cursor[(Cursor store)]
    Cursor --o Rehydrate
    Publish --> Rerun{{at least one event\nand\n`want_more` is true?}}
    Rerun --> |Yes| Evaluate
    end

    Rerun --> |No| Sleep
Loading

@ebeahan ebeahan added the Team:Security-Service Integrations Security Service Integrations Team label Jan 31, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Filebeat Filebeat Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

No branches or pull requests

4 participants