Knewton/check-graph — pull request #1 by dysinger (2013-08-01 22:45:56+00:00)
Title: Feature/check for null data

tim@domU-12-31-39-09-90-72:~/check-graph$ ./check_graph --help
CLI Check for Graphite

Usage: check_graph [-n|--check-null] URL TARGET OPERATOR VALUE MINUTES
Checks Graphite for out-of-bounds data

Available options:
-h,--help Show this help text
-n,--check-null Check for null data for TARGET
URL Graphite API URL
TARGET Graphite Target Metric (pattern or name)
OPERATOR '<', '<=', '==', '>' or '>='
VALUE Combined with OPERATOR to check TARGET's values
MINUTES Number of previous minutes (from now) to check

tim@domU-12-31-39-09-90-72:~/check-graph$ ./check_graph 'http://metrics.staging.knewton.net:8080' 'Platform2.QA.KPIP-Processor.*.jvm.memory.heap.percentUsed' '<=' 0.95 5
OK: Graphite values are within bounds

tim@domU-12-31-39-09-90-72:~/check-graph$ ./check_graph -n 'http://metrics.staging.knewton.net:8080' 'Platform2.QA.KPIP-Processor.*.jvm.memory.heap.percentUsed' '<=' 0.95 5
CRITICAL: Graphite values contain nulls Platform2.QA.KPIP-Processor.*.jvm.memory.heap.percentUsed