Check script vbs with mrpe error - Unable to execute - plugin may be missing

CMK version:
2.2.0
OS version:
Rocky Linux 8.9

Error message:
Unable to execute - plugin may be missing

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

Hello,
I’m trying to add a vbs script via mrpe but I get the following error
Unable to execute - plugin may be missing

If I run the script from command prompt it works correctly

I have enabled execute in global

execute: [exe, bat, vbs, cmd, ps1] # Supported: vbs, ps1, py, pl, exe, cmd, bat

In the mrpe entry I configured the check like this

mrpe:
enabled: yes

## Timeout value (seconds) - Defaults to 60, which can be considered a safe choice,
## as legacy Nagios checks usually execute fastly.
timeout: 60

config:
    ## MRPE check entries:
    ## check = SERVICE_DESCRIPTION [(interval=INTERVAL)] COMMAND
    ## If specified, the check result will be cached for INTERVAL seconds
    ## before executing it again.
    ## Relative path are supported for checks and includes.
    ## The path below is equal to '$CUSTOM_AGENT_PATH$\plugins\your_check.com'
    - check = TEST3 '$CUSTOM_AGENT_PATH$\plugins\name_check_.vbs'
    # - check = Console 'c:\windows\system32\mode.com' WITH CP /STATUS
    # - check = Checker (interval=100) 'c:\windows\system32\mode.com'

    ## Include entries:
    ## include [USER_NAME] = PATH_TO_CFG
    ## Add config files that contain additional MRPE check lines
    # - include = $CUSTOM_AGENT_PATH$\mrpe_checks.cfg
    # - include some_user_name = $CUSTOM_AGENT_PATH$\mrpe_checks.cfg

Obviously I also tried to change the path of the checks by moving them but nothing changed.
Where could I have gone wrong?

Solved.
Post here the solution that could be useful for other users

When execute vbs custon script via mrpe you must specified the interpreter of the command
Example

mrpe:
enabled: yes

## Timeout value (seconds) - Defaults to 60, which can be considered a safe choice,
## as legacy Nagios checks usually execute fastly.
timeout: 60

config:
    ## MRPE check entries:
    ## check = SERVICE_DESCRIPTION [(interval=INTERVAL)] COMMAND
    ## If specified, the check result will be cached for INTERVAL seconds
    ## before executing it again.
    ## Relative path are supported for checks and includes.
    ## The path below is equal to '$CUSTOM_AGENT_PATH$\plugins\your_check.com'
    - check = TESTFINALE 'c:\windows\system32\cscript.exe' //nologo C:\ProgramData\checkmk\agent\mrpe\SCRIPT_NAME.vbs
    
1 Like

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.