cockroachdb.conf 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Availability
  2. template: cockroachdb_last_collected_secs
  3. on: cockroachdb.live_nodes
  4. calc: $now - $last_collected_t
  5. units: seconds ago
  6. every: 10s
  7. warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
  8. crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
  9. delay: down 5m multiplier 1.5 max 1h
  10. info: number of seconds since the last successful data collection
  11. to: dba
  12. # Capacity
  13. template: cockroachdb_used_storage_capacity
  14. on: cockroachdb.storage_used_capacity_percentage
  15. calc: $capacity_used_percent
  16. units: %
  17. every: 10s
  18. warn: $this > (($status >= $WARNING) ? (80) : (85))
  19. crit: $this > (($status == $CRITICAL) ? (85) : (95))
  20. delay: down 15m multiplier 1.5 max 1h
  21. info: entire disk usage percentage
  22. to: dba
  23. template: cockroachdb_used_usable_storage_capacity
  24. on: cockroachdb.storage_used_capacity_percentage
  25. calc: $capacity_usable_used_percent
  26. units: %
  27. every: 10s
  28. warn: $this > (($status >= $WARNING) ? (80) : (85))
  29. crit: $this > (($status == $CRITICAL) ? (85) : (95))
  30. delay: down 15m multiplier 1.5 max 1h
  31. info: usable space usage percentage
  32. to: dba
  33. # Replication
  34. template: cockroachdb_unavailable_ranges
  35. on: cockroachdb.ranges_replication_problem
  36. calc: $ranges_unavailable
  37. units: num
  38. every: 10s
  39. warn: $this > 0
  40. delay: down 15m multiplier 1.5 max 1h
  41. info: number of ranges with fewer live replicas than the replication target
  42. to: dba
  43. template: cockroachdb_replicas_leaders_not_leaseholders
  44. on: cockroachdb.replicas_leaders
  45. calc: $replicas_leaders_not_leaseholders
  46. units: num
  47. every: 10s
  48. warn: $this > 0
  49. delay: down 15m multiplier 1.5 max 1h
  50. info: number of replicas that are Raft leaders whose range lease is held by another store
  51. to: dba
  52. # FD
  53. template: cockroachdb_open_file_descriptors_limit
  54. on: cockroachdb.process_file_descriptors
  55. calc: $sys_fd_open/$sys_fd_softlimit * 100
  56. units: %
  57. every: 10s
  58. warn: $this > 80
  59. delay: down 15m multiplier 1.5 max 1h
  60. info: open file descriptors usage percentage
  61. to: dba
  62. # SQL
  63. template: cockroachdb_sql_active_connections
  64. on: cockroachdb.sql_connections
  65. calc: $sql_conns
  66. units: active connections
  67. every: 10s
  68. info: number of active SQL connections
  69. to: dba
  70. template: cockroachdb_sql_executed_statements_total_last_5m
  71. on: cockroachdb.sql_statements_total
  72. lookup: sum -5m absolute of sql_query_count
  73. units: statements
  74. every: 10s
  75. warn: $this == 0 AND $cockroachdb_sql_active_connections != 0
  76. delay: down 15m up 30s multiplier 1.5 max 1h
  77. info: number of executed SQL statements in the last 5 minutes
  78. to: dba