Browse Source

fix(alarms): treat 0 processors as unknown in load_cpu_number (#14286)

Ilya Mashchenko 2 years ago
parent
commit
59e71195b9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      health/health.d/load.conf

+ 1 - 1
health/health.d/load.conf

@@ -11,7 +11,7 @@
 component: Load
        os: linux
     hosts: *
-     calc: ($active_processors < 2) ? ( 2 ) : ( $active_processors )
+     calc: ($active_processors == nan or $active_processors == 0) ? (nan) : ( ($active_processors < 2) ? ( 2 ) : ( $active_processors ) )
     units: cpus
     every: 1m
      info: number of active CPU cores in the system