groups:
  - name: system-monitor-recording
    interval: 30s
    rules:
      - record: system_monitor:mem_available_percent
        expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100
      - record: system_monitor:swap_used_percent
        expr: (1 - node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes) * 100
      - record: system_monitor:cpu_busy_percent
        expr: 100 * (1 - avg(irate(node_cpu_seconds_total{mode="idle"}[1m])))
      - record: system_monitor:fd_used_percent
        expr: node_filefd_allocated / node_filefd_maximum * 100
      - record: system_monitor:tmpfs_bad_percent
        expr: max(node_tmp_used_percent or node_tmp_inodes_percent)
