Get Application Server Version with .ps1 outputs numbers - interpretation in gui

Dear Reader/Community,

Checkmk Raw Edition 2.1.0p11

NO Error message:

The powershell script:

$ServerVersionResponse = Invoke-RestMethod -Uri $ServerVersionUrl -Headers $headers -Method Get
Write-Host “0 ““CustomApplication Dep-Test Server”” Version=$ServerVersionResponse”

Output of the local powershell script is:
<<local:sep(0)>>
0 “CustomApplication Dep-Test Server” Version=11.70.5.2258

In the gui in checkMK for that specific host, it renders it as 10.70
image

I’d like the output in the GUI to match what is in the output of the script.

Wim

Checkmk interprets the CheckOutput as a metric named ‘version’ with value ‘10.70’.

In order for CheckMK to recognise the CheckOutput correctly, you must add a ‘-’ after the service name and before ‘CheckOutput’. This tells CheckMK that this check has no metrics.

0 “CustomApplication Dep-Test Server” - Version=11.70.5.2258

2 Likes

Worked !! Thank you LaSoe