Skip to content

Instantly share code, notes, and snippets.

@ctdk
Created December 7, 2015 19:45
Show Gist options
  • Select an option

  • Save ctdk/e7220c64ef72299feaeb to your computer and use it in GitHub Desktop.

Select an option

Save ctdk/e7220c64ef72299feaeb to your computer and use it in GitHub Desktop.

Revisions

  1. ctdk created this gist Dec 7, 2015.
    28 changes: 28 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    lookup load_host {
    entry host=cassandra* {
    highCrit = 10
    highWarn = 8
    }
    entry host=mariadb* {
    highCrit = 8
    highWarn = 6
    }
    entry host=* {
    highCrit = 1
    highWarn = 0
    }
    }

    alert load {
    template = generic
    $metric = collectd.*.*.*.load.load.longterm
    $query = aliasByNode(perSecond($metric),3)
    $graphData = graphite("movingAverage($query,40)", "20m", "", "host")
    $val = avg(graphite("$query","5m", "","host"))

    warn = $val > lookup("load_host", "highWarn")
    crit = $val > lookup("load_host", "highCrit")

    critNotification = critNot
    warnNotification = default
    }