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

[FR] Add custom information to LogMonitor Events/Conditions #979

Open
Shabirmean opened this issue Oct 23, 2024 · 0 comments
Open

[FR] Add custom information to LogMonitor Events/Conditions #979

Shabirmean opened this issue Oct 23, 2024 · 0 comments

Comments

@Shabirmean
Copy link

Description

Currently it seems like we can define a default message for new conditions that are introduced.

"conditions": [
        {
                "type": "SomeNodeProblem",
                "reason": "NoProblem",
                "message": "some node problem not seen in the node"
        }
],

However, when rules are defined against this condition, we can only do a regex match for the logs and NPD will report the the matching log as is. In cases where we want to customize the message posted, there is no option to do this.

"rules": [
        {
                "type": "permanent",
                "condition": "SomeNodeProblem",
                "reason": "HaveProblem",
                "pattern": "failed: some node problem regex log"
        }
]

Is it possible to have an additional field to add to the matching log posted to by NPD? It can be a simple static message tha tis concatenated to the matching log message posted to NPD.

"rules": [
        {
                "type": "permanent",
                "condition": "SomeNodeProblem",
                "reason": "HaveProblem",
                "pattern": "failed: some node problem regex log",
                "message": "refer www.foo.com/docs for playbook on how to fix the issue"
        }
]
Type                Status    Reason                Message
------              ------    ------                ------
SomeNodeProblem     True.     HaveProblem.          failed: some node problem regex log; refer www.foo.com/docs for playbook on how to fix the issue

If this request makes sense I am happy to send a pull request to integrate it.

@Shabirmean Shabirmean changed the title [FR] Support for adding custom information to LogMonitor Events/Conditions [FR] Add custom information to LogMonitor Events/Conditions Oct 23, 2024
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

No branches or pull requests

1 participant