Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Import Macro Repair


Info

This article explains how to reset the counter of CPU cores when added to a Windows VM.

Status
colourGreen
titleLAST TESTED ON CHECKMK 2.0.0P1

Table of Contents

Problem

Since the increase of the cores on the Windows VM, the graphs show constant values without any change.


The Windows Agent executes the following commands to get the values:

Code Block
languagebash
themeRDark
Get-WmiObject -class Win32_PerfRawData_PerfOS_System -namespace   root\cimv2 |Format-List *


Code Block
languagebash
themeRDark
Get-WmiObject -class Win32_PerfRawData_PerfOS_System -namespace root\cimv2 |Format-List ProcessorQueueLength

Solution

Checkmk is caching these values with the corresponding timestamp. In this case, the new timestamp has a smaller value than the new one. That's why Checkmk is always presenting the old/constant values. We suspect that this is because of the core modification. It looks like Windows is resetting some system counters.

To solve this, you need to remove the cached counter file:


  1. Stop the site

    Code Block
    languagebash
    themeRDark
    root@mylinuxhost~# omd stop <SITENAME>

    .

  2. As site user, you should find this file: ~/tmp/check_mk/counters/<HOSTNAME>. In this file, you need to delete the following section:

    Code Block
    languagebash
    themeRDark
    title~/tmp/check_mk/counters/<HOSTNAME>
    ('wmi_cpuload', None, 'load_5min'): (29632775.478311848, 18.056825022850912), ('wmi_cpuload', None, 'load_15min'): (29632775.478311848, 15.787631011576273),

    .

  3. Attached, you will find a screenshot with the marked section:

    .

  4. Start the site

    Code Block
    languagebash
    themeRDark
    root@mylinuxhost~#  omd start <SITENAME>


Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "windows_agent" , "windows" , "counter" , "wmi" ) and type = "page" and space = "KB"
labelswindows windows_agent counter wmi


Page Properties
hiddentrue


Related issues