node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Refactor node-mixin as node-observ-lib

Open v-zhuravlev opened this issue 1 year ago • 8 comments

NOTE: I put this observ-lib(mixin) into separate folder due to some incompatibilities with old mixin like:

  • USE dashboards (node-rsrc-use.json, node-cluster-rsrc-use.json,node-multicluster-rsrc-use.json)

Similar to windows-observ-lib, node-observ-lib is created, using many panels from commonlib:. It also refactors everything from node-mixin by using grafonnet (v10 schema).

Node observability lib would allow:

  • Easily read and maintain dashboards as code
  • Easily modify any dashboard, panel, target, variable... before rendering final result
  • Change instanceLabels, groupLabels from default job,instance to use dashboards in environments with extra or custom labels
  • Instantiate node dashboards more than once in a single environment (Uid and filteringSelector are used to avoid conflicts).

To learn more about suggested mixin packaging format (observ-lib) you can check dataless example here.

What is recreated/moved from old node-mixin:

  • Dashboards except USE.
  • All alerts
  • All recording rules

Added/Updated:

  • Dashboards:
    • Fleet overview
    • Overview dashboard (added inventory row)
    • Drill down dashboards:
      • Memory
      • CPU and system
      • Network (Interfaces & Sockstat / Netstat)
      • Disks and filesystem
      • Logs (only added if enableLokiLogs:true)
    • MacOS overview (added inventory row)
    • MacOS logs (only added if enableLokiLogs:true)
  • Prometheus annotations (for all dashboards):
    • Reboot
    • OOM kill detected
    • Kernel update
  • New loki annotations (only added if enableLokiLogs:true)
    • Service failed
    • Critical system event
    • Session opened
    • Session closed
  • Alerts:
    • filesystem alerts are moved into separate alerts group to avoid hitting limits for number of alerts allowed in group (in Grafana Mimir)
  • Title case is used across all recreated panels and dashboard names

image image image

v-zhuravlev avatar Nov 29 '23 18:11 v-zhuravlev

Just a little question : why don't you render dashboards with .json suffix?

gaetanars avatar Jan 16 '24 09:01 gaetanars

Just a little question : why don't you render dashboards with .json suffix?

Nothing specific, It was a little bit more convenient to reference dashboards by key (dashboards.overview, dashboards.network etc..)..

v-zhuravlev avatar Jan 16 '24 09:01 v-zhuravlev

If this is intended to replace the node-mixin, should we remove the old mixin?

SuperQ avatar Feb 03 '24 09:02 SuperQ

Just a little question : why don't you render dashboards with .json suffix? @gaetanars, I think you are right, it is expected for end files to have .json suffix. Brought it back.

If this is intended to replace the node-mixin, should we remove the old mixin? @SuperQ , we could, but we need to either to reimplement use dashboards as well, or agree that they could be dropped.

v-zhuravlev avatar May 04 '24 19:05 v-zhuravlev

Just let me know, if what do you think I should do to merge this :)

v-zhuravlev avatar Jun 03 '24 12:06 v-zhuravlev