@dors1 (Dors) posted a new topic, subject "Ignore specific pod from sending alerts". It read:

   I'm trying to filter out pods with prefix (like app-*) from sending CPU high usage alerts.  
    Any idea how to perform this?

So @philweber (Phil Weber) replied

    Hi, @dors1:
    [code] 
        SELECT (cpuUsedCores / cpuLimitCores) * 100 AS 'CPU Percent' FROM K8sContainerSample WHERE podName NOT LIKE 'app-%'
    [/code]

To which @dors1 (Dors) replied

    Hi @philweber ,
    
    So in order to achieve that I need to create NRQL alert?  
    I can't just use the built in alert from the default kubernetes alerts?

After which, @philweber (Phil Weber) added

    I don't know if you can do it with the default kubernetes alerts. You asked if we had “any idea” how to do it, so I gave you an idea.

@dors1 (Dors) replied

    Hi @philweber ,  
    Actually what you gave is a sample NRQL query to get CPU usage, But we prefer of having the ability to create an infrastructure alert condition (and not a NRQL alert condition), but also to filter out a specific pod , but I can't find how to do this.  
    Maybe Newrelic will add this feature in the future ?
    
    image1540×750 42.8 KB

So @philweber (Phil Weber) replied

    Have you tried clicking _FILTER ENTITIES_ and filtering on `podName`?
    
    filter-entities1020×923 50.4 KB


{'source': 'discourse', 'url': 'https://discuss.newrelic.com/t/ignore-specific-pod-from-sending-alerts/185996', 'title': 'Ignore specific pod from sending alerts', 'views': 647, 'has_accepted_answer': False, 'word_count': 180, 'like_count': 1, 'reply_count': 3, 'participant_count': 2, 'posts': 6, 'tags': '', 'author': '@dors1 (Dors)', 'participants': '@dors1 (Dors), @philweber (Phil Weber)', 'image_url': [None], 'created_at': '2022-05-17T15:46:51.656Z', 'last_posted_at': '2022-05-18T15:40:51.933Z'}