concept alert in category system administration

appears as: lerts, alert, An alert, The alert, n alert, alerts, lert, The alerts, Alerts, Alerts
Operations Anti-Patterns DevOps Solutions

This is an excerpt from Manning's book Operations Anti-Patterns DevOps Solutions.

  • Chapter 6 will dive into the on-call process. Many teams are drowning in alerts. This chapter will focus on how to structure your on-call rotations and change your alerting to be actionable.
  • The danger of creating an alert without context is that once an alert is created, it is somehow imbued with a sense of finality. Due to some deep, unknown psychological trauma that afflicts on-call staff members, it can be near impossible to convince people to remove a defined alert. People start to recall old stories of, “Remember that one time when the alert was right!” discounting the other 1500 times it was wrong. Use our example from earlier in the chapter, where Raymond received a CPU alert. The fact that the CPU was that high for an extended period sounds like something you’d want to alert on when you’re designing alerts. But your mileage may vary depending on your workload. So, let’s talk about what makes a good alert. First, an alert should have some sort of associated documentation with it. It might be details that go directly into the alert or it might be a separate document that explains what steps should be taken should someone receive the alert. This documentation in all its various forms are collectively known as runbooks. The runbook will not only document how to resolve the issue, but also document why the alert is a good alert in the first place. A good alert is

    Securing DevOps

    This is an excerpt from Manning's book Securing DevOps.

  • An analysis layer to inspect the content of logs, detect fraud, and raise alerts
  • Figure 8.1 The three types of fraud-detection modules described in this chapter are located inside the analysis layer, at the center of the logging pipeline discussed in chapter 7. Each module performs a specific type of detection, sends alerts to operators, and writes alerts to databases.

    c08_01.png
    Listing 8.7 Plugin that catches logs containing attacks in the query string
    require "string"
    local rex = require "rex_pcre"    #1  
    local xss = '((\%3C)|<)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|>)'    #2  
    
    function process_message()
     local req = read_message("Fields[request]")    #3  
     local xss_matches = rex.match(req, xss)    #4  
     if xss_matches then    #4  
     local remote_addr = read_message("Fields[remote_addr]")    #5  
     add_to_payload(string.format("ALERT: xss attempt from %s    #6  
     in request %s\n", remote_addr, req))    #6  
      end
      return 0
    end
    function timer_event()    #7  
     inject_payload("txt", "alerts")    #7  
    end    #7  
    
    #1   Imports the regex library
    #2   Loads the XSS regex in a local variable
    #3   Extracts the HTTP request from the incoming event
    #4   Checks if the request matches the regex pattern
    #5   Extracts the remote IP from the event
    #6   Generates an alert
    #7   Regularly injects the alerts into the output layer

    The right moment to alert is as soon as we want a human to take action and block or review an anomaly. A lot of systems will send you alerts as early as possible by default, sometimes bragging about their ability to alert you in near real-time. That sounds like a nice idea at first, but often means that your phone will beep nonstop from morning until night to review endless streams of false positives. Those systems aren’t useful because you’ll mute them within a week. You don’t want an alert to be sent to you as early as possible in the analysis process. You want it to be sent when there’s enough confidence that it’s fraudulent. An alert should be sent when the automated system has done as much as it can to qualify the event as fraudulent and requires a human brain to continue the analysis. You may not, for example, send every change of a filesystem to operators, but you may send an alert when a client violates a limit several times in a row.

    The right amount of information is a balance between providing context and not overwhelming the operator or user. Ultimately, alerts must be short, no more than a dozen lines in an email, and easy to read. The problem being identified must be clearly described at the top, and additional context provided in the body of the alert. If you can’t read it in three seconds, it’s not good enough.

    Being strict about the timing and format of alerts will increase confidence into the fraud-detection and analysis system. It’s better to start small and send few alerts, than to start big, fill up inboxes, and trim down later.