Agent plugins doesn't work - agent 2.0.0p3, Windows Server 2016

So again, I’m new to checkmk, please bare with me. :slight_smile:

I’m trying to get agent plugins working on windows agent, but nothing happens. The plugin files are placed in C:\ProgramData\CheckMK\Agent\plugins, the agent service is restarted. I’ve done a full service discovery. Nothing happens. Tested on three different servers. Tested almost every included plugin.

What am I missing?

Is the output you expect in the agent output included?
What happens if you test the agent locally on the machine?

Nope, nothing in the output. Running locally or otherwise.

First part of output:
<<<check_mk>>>
Version: 2.0.0p3
BuildDate: Apr 17 2021
AgentOS: windows
Hostname: sa-logistics-weblogic-db-01
Architecture: 64bit
WorkingDirectory: C:\Program Files (x86)\checkmk\service
ConfigFile: C:\Program Files (x86)\checkmk\service\check_mk.yml
LocalConfigFile: C:\ProgramData\checkmk\agent\check_mk.user.yml
AgentDirectory: C:\Program Files (x86)\checkmk\service
PluginsDirectory: C:\ProgramData\checkmk\agent\plugins
StateDirectory: C:\ProgramData\checkmk\agent\state
ConfigDirectory: C:\ProgramData\checkmk\agent\config
TempDirectory: C:\ProgramData\checkmk\agent\tmp
LogDirectory: C:\ProgramData\checkmk\agent\log
SpoolDirectory: C:\ProgramData\checkmk\agent\spool
LocalDirectory: C:\ProgramData\checkmk\agent\local

Nothing strange there, right?

Is there any entry in check_mk.user.yml - maybe the agent can’t execute because the relevant extensions are not defined / expanded there?

Hmm, it’s a clean install, the only thing I’ve added there is an allowed ip. Should I add something else?

You didn’t mention which plugin you want to get running so for me it’s also just guessing… So, it might be interesting if

  • the plugin (file type) extension (say: .py) is set in the check_mk.user.yml to guarantee its execution?
  • the plugin needs a further config file for execution in C:\ProgramData\CheckMK\Agent\config?

Also see the given link above…

Ah, sorry. Originally I was after mssql, but now I’ve runned through them all I think, just to try. :slight_smile:

But for example win_license.bat shouldn’t require any config, right? I’m testing with that one now, but nothing happens.

The .bat-file runs fine in itself of course.

I wrote a simple bat-script that just creates a file when run. And that file isn’t created, so I guess that shows that the script is never called from the agent.

Take a look at the agent log file in C:\ProgramData\checkmk\agent\log
If there is a problem with the plugin execution you should see it there.

Aha, there we go! :slight_smile:

2021-05-14 15:56:20.221 [srv 4784] [Trace] ‘openhardwaremonitor’ is skipped by config
2021-05-14 15:56:20.222 [srv 4784] Allowed Extensions: [checkmk.py,py,exe,bat,vbs]
2021-05-14 15:56:20.222 [srv 4784] [Trace] Left [24] files to execute
2021-05-14 15:56:20.225 [srv 4784] Plugin ‘C:\ProgramData\checkmk\agent\plugins\win_license.bat’ is sync with age:0 timeout:60 retry:0
2021-05-14 15:56:20.226 [srv 4784] Plugin ‘C:\ProgramData\checkmk\agent\plugins\test.bat’ is sync with age:0 timeout:60 retry:0
2021-05-14 15:56:20.226 [srv 4784] [Trace] Left [2] files to execute in ‘plugins’
2021-05-14 15:56:20.227 [srv 4784] Generating answer number [1]
2021-05-14 15:56:20.227 [srv 4784] Id is [48996346614384]
2021-05-14 15:56:20.227 [srv 4784] [Trace] ‘wmi_cpuload’ is skipped by config
2021-05-14 15:56:20.228 [srv 4784] [Trace] Skipping ‘wmi_cpuload’ by config
2021-05-14 15:56:20.228 [srv 4784] [Trace] Provider ‘uptime’ is about to be started, id ‘48996346614384’ port [mail:\.\mailslot\Global\WinAgent_0]
2021-05-14 15:56:20.229 [srv 4784] Using file ‘C:\Program Files (x86)\checkmk\service\check_mk_agent.exe’ for winperf
2021-05-14 15:56:20.229 [srv 4784] [Trace] Sending data ‘uptime’ id is [48996346614384] length [18]
2021-05-14 15:56:20.230 [srv 4784] Exec ‘C:\Program Files (x86)\checkmk\service\check_mk_agent.exe’ for ‘winperf’ to be started
2021-05-14 15:56:20.230 [srv 4784] [Trace] Skipping ‘ps’ by config
2021-05-14 15:56:20.231 [srv 4784] [Trace] Provider ‘df’ is about to be started, id ‘48996346614384’ port [mail:\.\mailslot\Global\WinAgent_0]
2021-05-14 15:56:20.231 [srv 4784] [Trace] Provider ‘mem’ is about to be started, id ‘48996346614384’ port [mail:\.\mailslot\Global\WinAgent_0]
2021-05-14 15:56:20.232 [srv 4784] [Trace] Provider ‘services’ is about to be started, id ‘48996346614384’ port [mail:\.\mailslot\Global\WinAgent_0]
2021-05-14 15:56:20.233 [srv 4784] perf: Section ‘uptime’ took [1] milliseconds
2021-05-14 15:56:20.233 [srv 4784] async RunStdCmd: “C:\Program Files (x86)\checkmk\service\check_mk_agent.exe” -runonce winperf mail:\.\mailslot\Global\WinAgent_0 id:48996346614384 timeout:10 ip:10.130.230.85 234:phydisk 510:if 238:processor 10332:msx_queues 638:tcp_conn
2021-05-14 15:56:20.234 [srv 4784] [Trace] Skipping ‘fileinfo’ by config
2021-05-14 15:56:20.234 [srv 4784] [Trace] Sending data ‘mem’ id is [48996346614384] length [233]
2021-05-14 15:56:20.235 [srv 4784] [Trace] Skipping ‘logwatch’ by config
2021-05-14 15:56:20.235 [srv 4784] perf: Section ‘mem’ took [3] milliseconds
2021-05-14 15:56:20.236 [srv 4784] [Trace] Skipping ‘plugins’ by config
2021-05-14 15:56:20.237 [srv 4784] Allowed Extensions: [checkmk.py,py,exe,bat,vbs]
2021-05-14 15:56:20.237 [srv 4784] [Trace] Left [0] files to execute
2021-05-14 15:56:20.238 [srv 4784] [Warn ] Failed FindFirstVolumeMountPointA, error is [18]
2021-05-14 15:56:20.238 [srv 4784] [Trace] Left [0] files to execute in ‘local’
2021-05-14 15:56:20.239 [srv 4784] Processed [1] drives
2021-05-14 15:56:20.239 [srv 4784] Received [146] bytes from ‘uptime’
2021-05-14 15:56:20.240 [srv 4784] [Trace] ‘dotnet_clrmemory’ is skipped by config
2021-05-14 15:56:20.240 [srv 4784] [Trace] To start [0] sync plugins
2021-05-14 15:56:20.241 [srv 4784] [Trace] Sending data ‘df’ id is [48996346614384] length [62]
2021-05-14 15:56:20.241 [srv 4784] [Trace] Skipping ‘dotnet_clrmemory’ by config
2021-05-14 15:56:20.242 [srv 4784] [Trace] Provider ‘local’ is about to be started, id ‘48996346614384’ port [mail:\.\mailslot\Global\WinAgent_0]
2021-05-14 15:56:20.242 [srv 4784] perf: Section ‘df’ took [10] milliseconds
2021-05-14 15:56:20.243 [srv 4784] [Trace] ‘wmi_webservices’ is skipped by config
2021-05-14 15:56:20.243 [srv 4784] [Warn ] Section ‘local’ cannot provide data
2021-05-14 15:56:20.244 [srv 4784] [Trace] Sending data ‘local’ id is [48996346614384] length [0]
2021-05-14 15:56:20.245 [srv 4784] [Trace] Skipping ‘wmi_webservices’ by config
2021-05-14 15:56:20.245 [srv 4784] perf: Section ‘local’ took [2] milliseconds
2021-05-14 15:56:20.246 [srv 4784] [Trace] ‘msexch’ is skipped by config
2021-05-14 15:56:20.246 [srv 4784] [Trace] Skipping ‘msexch’ by config
2021-05-14 15:56:20.247 [srv 4784] [Trace] Skipping ‘mrpe’ by config
2021-05-14 15:56:20.247 [srv 4784] [Trace] Skipping ‘skype’ by config
2021-05-14 15:56:20.248 [srv 4784] [Trace] Skipping ‘spool’ by config
2021-05-14 15:56:20.248 [srv 4784] [Trace] ‘openhardwaremonitor’ is skipped by config
2021-05-14 15:56:20.249 [srv 4784] [Trace] Skipping ‘openhardwaremonitor’ by config
2021-05-14 15:56:20.260 [srv 4784] Received [361] bytes from ‘mem’
2021-05-14 15:56:20.262 [srv 4784] [Trace] Sending data ‘services’ id is [48996346614384] length [10751]
2021-05-14 15:56:20.263 [srv 4784] perf: Section ‘services’ took [30] milliseconds
2021-05-14 15:56:20.281 [srv 4784] Received [190] bytes from ‘df’
2021-05-14 15:56:20.302 [srv 4784] Received [128] bytes from ‘local’
2021-05-14 15:56:20.323 [srv 4784] Received [10879] bytes from ‘services’
2021-05-14 15:56:20.344 [srv 4784] Received [3810] bytes from ‘winperf’
2021-05-14 15:56:20.345 [srv 4784] perf: Answer is ready in [117] milliseconds
2021-05-14 15:56:20.346 [srv 4784] Send [15535] bytes of data

So it seems there is a config somewhere, but I don’t know where. Could there be traces from previous installs of Nagios for example? Can I see exactly what config files are loaded?

There are only two config files.

ConfigFile: C:\Program Files (x86)\checkmk\service\check_mk.yml
LocalConfigFile: C:\ProgramData\checkmk\agent\check_mk.user.yml

The first one should not be touched. As it is the default config used by the agent if nothing else is configured.
For testing you can remove the LocalConfigFile and check after an service restart if the same error messages are comming.
If the ConfigFile was modified please reinstall the agent with the default config.

That was it, thank you!

I upgraded the agent from 1.2.something, and it seems the installer left the old config more or less untouched. It was very different from the new default version. :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.