Check_MK - Eigene PlugIns via NRPE:

Um auf Windows Server eigene Plugins / Scripts....über check_mk abzufragen bedarf es der NRPE-Schnittstelle des Agenten:

BSP:
Exchange Componet-State Abfrage mit Powershellscript:

Unter:
https://exchange.nagios.org/directory/Plugins/Email-and-Groupware/Microsoft-Exchange/Exchange-2013-ServerComponentState-Health/details
 entsprechendes PlugIn laden und auf dem Exchange-Server im Verzeichnis C:\ProgramData\checkmk\agent\mrpe (installierter Check_MK-Agent vorausgesetzt) ablegen

Ein Test in der Konsole bringt den Status:
C:\> powershell -f C:\ProgramData\checkmk\agent\mrp\CheckEX2013ServerComponentState.ps1

Anpassung der Konfigurationsdatei des lokalen Agenten: (Datei: C:\ProgramData\checkmk\agent\check_mk.user.yml)

Auszug:

mrpe:
    enabled: yes

    # 60 is default, this is safe value, because mrpe checks are relative fast ergo
    # hitting this timeout is virtually not possible
    # timeout: 60

    # entries and cfg are the same as in the Legacy agent
    config:
      - check = check_ExchangeComponentState C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy bypass -file C:\ProgramData\checkmk\agent\mrpe\CheckEX2013ServerComponentState.ps1

Neustart des Diesntes:
net stop CheckMkService && net start CheckMkService

Aktualisieren der Einstellungen für den Agenten:
check_mk_agent.exe reload_config

Test der Section in Datei check_mk.user.yml

C:\Program Files (x86)\checkmk\service>check_mk_agent.exe section mrpe
<<<mrpe>>>
(powershell.exe) check_ExchangeComponentState 0 ServerWideOffline: Active - HubT
ransport: Active - FrontendTransport: Active - Monitoring: Active - RecoveryActi
onsEnabled: Active - AutoDiscoverProxy: Active - ActiveSyncProxy: Active - EcpPr
oxy: Active - EwsProxy: Active - ImapProxy: Active - OabProxy: Active - OwaProxy
: Active - PopProxy: Active - PushNotificationsProxy: Active - RpsProxy: Active
- RwsProxy: Active - RpcProxy: Active - UMCallRouter: Active - XropProxy: Active
 - HttpProxyAvailabilityGroup: Active - ForwardSyncDaemon: Inactive - Provisioni
ngRps: Inactive - MapiProxy: Active - EdgeTransport: Active - HighAvailability:
Active - SharedCache: Active

--> entsprechende Ausgabe findet sich im Interface wieder

Integration in Webinterface:
Neuer FullScan des Hosts antriggern --> neues Objekt: check_ExchangeComponentState verfügbar, welches anschliessend zur Überwachung hinzugefügt werden kann:

 

 

© 2024 ziggymania.de Designed S.Wommer