MRPE Windows - Unable to execute - plugin may be missing

Hallo Leute

Ich will einen Check von Nagios in CheckMK portieren und komme hier nicht weiter:

Nagios: $USER1$/check_nrpe -H x.x.x.x -t 60 -u -c CheckTestRep

CheckMK:
Hier liegt das Script: C:\ProgramData\checkmk\agent\mrpe\CheckTestRep.ps1
Folgendes steht in der check_mk.user.yml:

mrpe:
enabled: yes
timeout: 60
config:
- check = CheckTestRep ‘C:\ProgramData\checkmk\agent\mrpe\CheckTestRep.ps1’

Im CheckMK erkennt er zwar den Service, aber mit: Unable to execute - plugin may be missing.UNKN

Was mache ich falsch?

Greetz
Ovrld

Powershell Scripte können nicht so ausgeführt werden im Windows.

Aufruf müsste so in der Art hier aussehen

PowerShell.exe -ExecutionPolicy Bypass -Command "MeinTollesScript.ps1"

Aus Erfahrung würde ich im Windows eh abraten von MRPE sondern die Powershell Scripte einfach in Local Checks umbauen - ist wesentlich effizienter und der Aufruf erfolgt auch automatisch.
In Powershell ist es auch kein Problem zum Beispiel eine Config Datei einzulesen mit verschiedenen Parametern. Damit bleibt selbst ein Local Check Konfigurierbar.

3 Likes

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