Windows Agent - LOCAL section not found

CMK version: 1.6.0p27
OS version: Windows 2008 R2 / Windows 2012 R2

Hello everyone,

Im having trouble find out where to look to fix this:
We have some windows servers (doesnt seems to be related to specific O.S. version) that the agent output is not showing the LOCAL scripts.

When we run the test locally (PS C:\Program Files (x86)\checkmk\service> .\check_mk_agent.exe test) , everything is fine.We can see the local scripts. Ex;

  TCP    [fe80::5efe:]:45000  [::]:0                 LISTENING
0 Check_Dns - OK - is resolving correctly
0 check_ec2scheduled - No scheduled events
0 check_mcollective - mcollective is health
0 PuppetCheck - OK -  puppet agent service is running
PS C:\Program Files (x86)\checkmk\service>

Now if we run the command from the cmk server or any other server: (telnet servername 6556)
The LOCAL section is gone Ex:

  TCP    [fe80::5efe:]:19101  [::]:0                 LISTENING
  TCP    [fe80::5efe:]:28080  [::]:0                 LISTENING
  TCP    [fe80::5efe:]:45000  [::]:0                 LISTENING
Connection closed by foreign host.
[root@cmkcore0005 ~]# telnet c24m0051 6556

On cmk Dashboard, we see this output:

WARN - [agent] Version: 1.6.0p20, OS: windows, Missing agent sections: local WARN, execution time 1.3 sec

The discovery also doesnt find it:

OMD[default]:~$ cmk -vII
WARNING: Found rules for deprecated ruleset 'inventory_services'. These rules are not applied anymore. In case you still need them, you need to migrate them by hand. Otherwise you can remove them from your configuration.
Discovering services on:
 [agent] Execute data source
 [piggyback] Execute data source
No piggyback files for ''. Skip processing.
No piggyback files for ''. Skip processing.
ps.perf does not support discovery. Skipping it.
win_netstat does not support discovery. Skipping it.
  2 df
  1 services.summary
  1 systemtime
  1 uptime
  2 winperf_if
  2 winperf_phydisk
  1 winperf_processor.util
  1 wmi_cpuload
SUCCESS - Found 12 services, no host labels

We have checked the logs and nothing seems off.
We also tried to compare from any other server that is working fine but was not able to find anything so far.

Is worth mention that we started to see this when we upgraded the agents from 1.5.0 version.
He keeps the old version disabled but on some servers we have uninstalled the older version and got the same behavior.
So that makes us believe is not related but we are not sure.

Any help would be appreciated.

Thank you

You have too many dashes in your output. The parser looks at the dashe to find metric data. The second dash is cause of the problem.
Try this output instead:

0 Check_Dns - is resolving correctly
0 check_ec2scheduled - No scheduled events
0 check_mcollective - mcollective is health
0 PuppetCheck - puppet agent service is running

RG, Christian

That’s not the problem. The parser only looks for spaces and counts them.
All text after the third space is agent output.

Keep in mind that the agent runs with the rights of your locally logged in user and not with the user agent runs.
With default settings the agent runs as local system and should have no problems to execute your local scripts. But if you changed from local system to a normal user account it would be normal that not all scripts are visible for this user.

Inside your agent log you should see that the agent starts your local check also if triggered from network and not locally.

For a local test it would be better if you can check with a “telnet localhost 6556”.

i opened a prompt window as LOCAL SYSTEM and runned check_mk_agent test. No issues
Tried the telnet localhost 6556 but get screw up results.

                             AgentDirectory: C:\Program Files (x86)\checkmk\service
                                                                                   PluginsDirectory: C:\ProgramData\chec
                 StateDirectory: C:\ProgramData\checkmk\agent\state
                                                                   ConfigDirectory: C:\ProgramData\checkmk\agent\config
empDirectory: C:\ProgramData\checkmk\agent\tmp
                                              LogDirectory: C:\ProgramData\checkmk\agent\log
                                                                                            SpoolDirectory: C:\ProgramDa
                      LocalDirectory: C:\ProgramData\checkmk\agent\local

Doesnt seem to show everything. Im trying to find a way do use a diferent “console” to test the telnet locally.

By the way, i edit the script to remove the extra dashes just in case but no luck. We have over 5000 servers, only like 10 or so have this kind of issue. That indicates is something locally indeed.
Not able to find out anything in common on them yet. Still investigating.

Worth mention that i tested all scripts, removing one by one from the folder. Same behavior.
We have 1 EXE, 1 python and 2 powershell.
So it seems is not a issue with an specific file type.