#!/usr/bin/env ruby # frozen_string_literal: false # # handler-purge-stale-results.rb # # Author: Matteo Cerutti # require 'sensu-handler' require 'time' require 'net/smtp' require 'socket' require 'chronic_duration' class HandlerPurgeStaleResults < Sensu::Handler option :stale, description: 'Elapsed time after which a stale check result will be deleted (default: 7d)', short: '-s