Add BizTalk Checkmk Pulse local check

This commit is contained in:
2026-07-22 11:34:28 +02:00
commit 7660dc4555
20 changed files with 1919 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace BizTalkCheckmkPulse
{
internal static class Program
{
private static int Main(string[] args)
{
MonitoringOptions options = null;
try
{
Console.OutputEncoding = new UTF8Encoding(false);
options = MonitoringOptions.Load(args);
var formatter = new CheckmkLocalFormatter(options);
if (options.SelfTest)
{
foreach (var line in formatter.FormatSelfTest())
{
Console.WriteLine(line);
}
return 0;
}
var result = new ProbeResult();
var wmiProbe = new WmiBizTalkProbe(options);
wmiProbe.Query(result);
if (options.ProbeEventLog)
{
var eventLogProbe = new EventLogProbe(options);
eventLogProbe.Query(result);
}
foreach (var line in formatter.Format(result))
{
Console.WriteLine(line);
}
return 0;
}
catch (Exception ex)
{
var fallbackOptions = options ?? new MonitoringOptions();
var formatter = new CheckmkLocalFormatter(fallbackOptions);
foreach (var line in formatter.FormatFatal("BizTalk Checkmk Pulse failed: " + ex.GetType().Name + ": " + ex.Message))
{
Console.WriteLine(line);
}
return 0;
}
}
}
}