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

Filter alerts - Add ThrottleTimeSeconds and ThrottleField #166

Conversation

fjerlov-cs
Copy link
Contributor

Both fields are optional.

export:

name: some-alert
description: test-description
queryString: this is a query
actionNames: []
labels:
- some-label
- some-label2
enabled: true
queryOwnershipType: Organization
throttleTimeSeconds: 3600
throttleField: some_field

show:

/Users/fjerlov/Library/Caches/JetBrains/GoLand2023.3/tmp/GoLand/___show filter-alerts show DemoView some-alert
                     ID | BCB2xv1WhBqvB077hRwyJPskSLxE0R2m  
                   Name | some-alert                        
                Enabled | true                              
            Description | test-description                  
           Query String | this is a query                   
                 Labels | some-label, some-label2           
                Actions |                                   
  Throttle Time Seconds | 3600                              
         Throttle Field | some_field                        
         Run As User ID |                                   
   Query Ownership Type | Organization  

list:

/Users/fjerlov/Library/Caches/JetBrains/GoLand2023.3/tmp/GoLand/___list filter-alerts list DemoView
                 ID                |    NAME    | ENABLED |   DESCRIPTION    | ACTIONS |         LABELS          | THROTTLE TIME SECONDS | THROTTLE FIELD | RUN AS USER ID | QUERY OWNERSHIP TYPE  
+----------------------------------+------------+---------+------------------+---------+-------------------------+-----------------------+----------------+----------------+----------------------+
  BCB2xv1WhBqvB077hRwyJPskSLxE0R2m | some-alert | true    | test-description |         | some-label, some-label2 |                  3600 | some_field     |                | Organization    

When throttleTimeSeconds is undefined, throttleTimeSeconds will not be exported, but printed as 0 in list and show as in other commands in the cli.

/Users/fjerlov/Library/Caches/JetBrains/GoLand2023.3/tmp/GoLand/___show filter-alerts show DemoView some-alert
                     ID | BCB2xv1WhBqvB077hRwyJPskSLxE0R2m  
                   Name | some-alert                        
                Enabled | true                              
            Description | test-description                  
           Query String | this is a query                   
                 Labels | some-label, some-label2           
                Actions |                                   
  Throttle Time Seconds | 0                                 
         Throttle Field |                                   
         Run As User ID | pMeYeiIlF3NljnMAIcEcRnUK          
   Query Ownership Type | User      

@fjerlov-cs fjerlov-cs requested a review from a team as a code owner July 4, 2024 11:56
@fjerlov-cs fjerlov-cs force-pushed the fjerlov/throttle-time-seconds-and-throttle-field-on-filter-alerts branch from 873d69b to c5847dc Compare July 4, 2024 11:57
Copy link
Contributor

@jespermbyskov jespermbyskov left a comment

Choose a reason for hiding this comment

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

LGTM

@fjerlov-cs fjerlov-cs force-pushed the fjerlov/throttle-time-seconds-and-throttle-field-on-filter-alerts branch from c5847dc to 90e5d21 Compare July 4, 2024 12:01
@SaaldjorMike SaaldjorMike merged commit b70d822 into humio:master Jul 4, 2024
1 check 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.

3 participants