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

Updated documentation for alert definition, example added #8414

Merged
merged 25 commits into from
May 30, 2024

Conversation

lucaferret
Copy link
Contributor

No description provided.

.. figure:: ../img/developing_alerts_alert_structure.png
:align: center
:alt: BlacklistedFlowAlert Flow Alert
Let's begin by creating al the files of the alert.
Copy link
Member

Choose a reason for hiding this comment

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

Typo: all
Also, I would describe the whole list of files that should be created, before showing their content

Copy link
Member

Choose a reason for hiding this comment

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

And I would specify the new files that should be created, and the files that should be modified (e.g. to add new keys, or register the check)

:alt: BlacklistedFlowAlert Flow Alert
Let's begin by creating al the files of the alert.

Under :code:`scripts/lua/modules/alert_definitions/host/` create a new file, in this case :code:`host_alert_http_contacts`
Copy link
Member

Choose a reason for hiding this comment

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

The file name is missing the .lua suffix

Formatting the output
----------------------

One last thing we can do is to modify the locales in order to visualize both the check enable section and the alert launched in a readable format.
Copy link
Member

Choose a reason for hiding this comment

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

Please specify that the localized strings are those referenced in the alert or check definition


- create new files in the specified directory:

- place :code:`host_alert_http_contacts.lua` under :code:`scripts/lua/modules/alert_definitions/host/` this file is responsable for the representation of the alert on the GUI.
Copy link
Member

Choose a reason for hiding this comment

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

What about the check definitions (scripts/lua/modules/check_definitions/)?

@cardigliano cardigliano merged commit f6c18a5 into ntop:dev May 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants