question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set exclude document not alert ?

See original GitHub issue

hi ,

I have set a rule as below, it’s will alert when program field is vty , but how to set exclude events when program is vty and user value have the keyword “bo”?

name: action rule
type: frequency
index: logstash-*
 num_events: 1
 timeframe:
 hours: 4
filter:
 - term:
 program: "vty"
alert:
  - "email"
email: "my@email"

for example , program is vty , user is abc then alert , if program is vty ,user is bob-an will not alert , if program is vty ,user is abom-bc will not alert , is it possible ? how to set ? Any ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Qmandocommented, Aug 19, 2016

Oops, should be

- not:
     query:
       wildcard:
         user: ....

my bad

0reactions
sathishdsgithubcommented, Jul 12, 2017

@Qmando @stefansaye I’m trying to ignore specific string in field srx-source-zone-name. I tried with options whitelist and query_string and filter term nothing worked.

I’m trying to exclude the below filed using NOT in query_string srx-source-zone-name:EXTERNAL. Please assist me ?

srx-rt-flow : RT_FLOW_SESSION_DENY srx-source-address: 10.18.109.59 srx-source-port: 56453 srx-source-zone-name: EXTERNAL

Tried below method but nothing is working. I get matches for the NOT string also 😦

Method 1:

doc_type: message

filter:
- query:
    query_string:
        query: "_type:message"
- query:
     query_string:
        query: "srx-rt-flow:RT_FLOW_SESSION_DENY"
- query:
     query_string:
        query: "NOT srx-source-zone-name:EXTERNAL"

Method 2:

filter:
- query:
    query_string:
        query: "_type:message"
- query:
     query_string:
        query: "srx-rt-flow:RT_FLOW_SESSION_DENY AND NOT srx-source-zone-name:EXTERNAL"


Method 3:

filter:
   - not:
       terms:
          srx-source-zone-name: ["EXTERNAL"]

Method 4:

field: srx-source-zone-name type: any compare_key: srx-source-zone-name ignore_null: true whitelist:

  • “EXTERNAL”

Method 5:

filter:
    - not:
         term:
             srx-source-zone-name: "EXTERNAL"

Am I missing something here ? I did not get any error when I run the rule but the filter is not negating the mentioned string.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure and validate exclusions based on extension, name ...
Exclude files from Microsoft Defender Antivirus scans based on their file extension, file name, or location.
Read more >
How to remove warning messages in R Markdown document?
For your post-knit HTML document you can always just open it in the browser, like chrome for instance, right-click on the warning then...
Read more >
How Do I Exclude Devices From an Alert Trigger?
In theory I want it to function like this: "Trigger this alert when the node average response time is greater than 200ms and...
Read more >
How to exclude files from virus scans on Windows or macOS
Open your McAfee security software. Click the settings gear icon at the top right. Under PC Settings, click Real-Time Scanning. NOTE: The files...
Read more >
Set alerts for an event in Calendar on Mac - Apple Support
To remove an alert, click the Alert pop-up menu, then choose None. See alsoChange default alert settings in Calendar on MacManage notifications from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found