How-To Monitor file content

You want to monitor content from a specific file (Windows based hosts), eg. logfiles or any other text based files.
This plugins allows you to search within text format log files for strings and adjust exit code accordingly.

Step-by-step guide

Some things needs to be prepared to do this. Just follow these steps.

  1. Download the plugin and the ZIP file
    check_remote_logentries_1.0.1117.azsp 
    agent_logentries_option.zip

  2. Upload the plugin (azsp file) via admin GUI



  3. Extract the ZIP files content into your SONARPLEX agent CMD folder, eg. C:\azeti\agent\bin\cmd
    Maybe you should copy or move your "old" remote.bat to a different place before you overwrite it!

    You can adjust agents remote dispatcher, usually "c:\azeti\agent\bin\cmd\remote.bat", in your own remote.bat as well in order to call "logentries.ps1" for remote logcheck requests, e.g:
    ...
    set POWERSHELL=c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ep RemoteSigned
    :logentries
    IF NOT "%PLUGIN_NAME%"=="logentries" GOTO OK
    set PLUGIN_NAME=%POWERSHELL% -file .\logentries.ps1
    GOTO RUN


  4. For my How-To example this is my test file and it´s stored in folder C:\LogFileCheck
    LOG_AK_AB.txt

  5. Create a new service, based on "check_remote_logentries", and connect it to your host.

    In my example I´m searching for "Verbindung zur Datenbank beendet" for status OK and "Verbindung zur Datenbank nicht korrekt beendet" for status CRITICAL.
    Important to know is, whenever you enter the files path you have to set \\ for a \, eg. C:\\LogFileCheck\\LOG_AK_AB.txt


  6. Due the fact in our test file "LOG_AK_AB.txt" the last entry is "Verbindung zur Datenbank beendet" the check will return an OK status.



    After editing the "LOG_AK_AB.txt" putting "Verbindung zur Datenbank nicht korrekt beendet" at the end the output is CRITICAL.















The following macros are not currently supported in the footer:
  • style