/prometheus-rules

Primary LanguageGoApache License 2.0Apache-2.0

A collection of useful prometheus rules

This is intended as a home for collections of useful, reusable prometheus rules.

  • time.rules: Rules for building time/date awareness. These are approximations, with some room for improvement:
  • time_current_year: The current year
  • time_start_current_year_seconds: Start of current year, second since Unix Epock
  • time_end_current_year_seconds: End of current year, second since Unix Epock
  • time_end_of_current_day_seconds: End of current day, second since Unix Epock
  • time_current_day_remaining_seconds: Seconds left in the current day
  • time_is_leap_year_bool: 1 indicates that you are currently in a leap year
  • time_end_of_current_[month]_seconds: month is a three letter month indicator
  • time_current_month: 1 == Jan, 12 == December
  • time_end_of_current_month_seconds: End of the current month, seconds since Unix Epoch
  • time_current_month_remaining_seconds: Seconds remaining in the current month
  • time_current_weekday: The current week day 1 is Monday, 7 is Sunday
  • time_is_weekday_bool: Check if the current day is a weekday (not Saturday or Sunday)

License

These configs are released under the Apache 2.0 license. All images downloaded are subject to their individual licenses.