Your configuration is mostly the unchanged demo “check_mk.user.yml”.
For your two scripts you don’t need to change anything.
Place the “ADAudit.ps1” to the folder “C:\ProgramData\checkmk\agent\plugins” that’s all.
Same for the Local check but don’t put it inside the plugin folder if it is really a local check.
In your case the “netstat_an.bat” is a plugin and not a local check und needs to be inside the plugins like you configured but not as a execution entry in the local section.
Put booth scripts “ADAudit.ps1” and “netstat_an.bat” inside the “C:\ProgramData\checkmk\agent\plugins” and finished.
After a manual config change you should use the test function of the agent before you try to activate the config.
check_mk_agent.exe showconfig and then reload_config
Your file loads at my system without problem?
And what’s now not working?
To shorten your config file a little bit the following is enough as nothing else was changed in your file.
Your new config
global:
only_from: 172.16.9.240
The following is the config output after a “check_mk_agent.exe showconfig” you see that the plugins and local sections are enabled and that it looks inside the $CUSTOM_PLUGINS_PATH$ for executable files.
# Environment Variables:
# MK_LOCALDIR="C:\ProgramData\checkmk\agent\local"
# MK_STATEDIR="C:\ProgramData\checkmk\agent\state"
# MK_PLUGINSDIR="C:\ProgramData\checkmk\agent\plugins"
# MK_TEMPDIR="C:\ProgramData\checkmk\agent\tmp"
# MK_LOGDIR="C:\ProgramData\checkmk\agent\log"
# MK_CONFDIR="C:\ProgramData\checkmk\agent\config"
# MK_SPOOLDIR="C:\ProgramData\checkmk\agent\spool"
# MK_INSTALLDIR="C:\ProgramData\checkmk\agent\install"
# MK_MSI_PATH="C:\ProgramData\checkmk\agent\update"
# Loaded Config Files:
# system: 'C:\Program Files (x86)\checkmk\service\check_mk.yml'
# bakery: 'C:\ProgramData\checkmk\agent\bakery'
# user : 'C:\ProgramData\checkmk\agent\check_mk.user.yml'
#
global:
enabled: yes
only_from: 172.16.9.240
port: 6556
ipv6: no
encrypted: no
passphrase: secret
execute: [exe, bat, vbs, cmd, ps1]
async: yes
try_kill_plugin_process: safe
sections:
- check_mk
- mrpe
- skype
- spool
- plugins
- local
- winperf
- uptime
- systemtime
- df
- mem
- services
- msexch
- dotnet_clrmemory
- wmi_webservices
- wmi_cpuload
- ps
- fileinfo
- logwatch
- openhardwaremonitor
disabled_sections: []
realtime:
enabled: no
timeout: 90
port: 6559
encrypted: no
passphrase: this is my password
run: [mem, df, winperf_processor]
wmi_timeout: 3
logging:
location: ~
file: ~
debug: yes
windbg: yes
eventlog: yes
ps:
enabled: yes
use_wmi: yes
full_path: no
winperf:
enabled: yes
exe: agent
prefix: winperf
timeout: 10
counters:
- 234: phydisk
- 510: if
- 238: processor
fileinfo:
enabled: yes
path: []
logwatch:
enabled: yes
sendall: no
vista_api: no
max_size: 500000
logfile:
- Parameters: ignore
- State: ignore
- "*": warn nocontext
plugins:
enabled: yes
player: ""
max_wait: 60
async_start: yes
folders: [$CUSTOM_PLUGINS_PATH$, $BUILTIN_PLUGINS_PATH$]
execution:
- pattern: $CUSTOM_PLUGINS_PATH$\*.*
timeout: 60
run: yes
- pattern: $BUILTIN_PLUGINS_PATH$\*.*
timeout: 60
run: no
- pattern: "*"
run: no
local:
enabled: yes
player: ""
max_wait: 60
async_start: true
execution:
- pattern: "*.*"
timeout: 60
run: yes
mrpe:
enabled: yes
parallel: no
timeout: 60
config: ~
system:
firewall:
mode: none