Fix ACC endpoint reachability and stable service names
This commit is contained in:
@@ -15,6 +15,7 @@ namespace BizTalkCheckmkPulse
|
||||
public string Server { get; set; }
|
||||
public string ServicePrefix { get; set; }
|
||||
public string EnvironmentName { get; set; }
|
||||
public bool IncludeEnvironmentInServiceName { get; set; }
|
||||
public int QueryTimeoutSeconds { get; set; }
|
||||
public bool ProbeSqlConnectivity { get; set; }
|
||||
public int SqlConnectionTimeoutSeconds { get; set; }
|
||||
@@ -57,6 +58,7 @@ namespace BizTalkCheckmkPulse
|
||||
Server = ".";
|
||||
ServicePrefix = "BizTalk";
|
||||
EnvironmentName = string.Empty;
|
||||
IncludeEnvironmentInServiceName = false;
|
||||
QueryTimeoutSeconds = 25;
|
||||
ProbeSqlConnectivity = true;
|
||||
SqlConnectionTimeoutSeconds = 5;
|
||||
@@ -92,13 +94,14 @@ namespace BizTalkCheckmkPulse
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Erzeugt den stabilen Checkmk-Service-Namen mit optionalem Umgebungsnamen.
|
||||
/// Erzeugt den stabilen Checkmk-Service-Namen. Der Umgebungsname ist nur explizit opt-in,
|
||||
/// damit ein Installer-Update bestehende Checkmk-Services nicht unbemerkt umbenennt.
|
||||
/// </summary>
|
||||
/// <param name="suffix">Fachlicher Suffix des Services.</param>
|
||||
/// <returns>Vollstaendiger Service-Name fuer Checkmk.</returns>
|
||||
public string ServiceName(string suffix)
|
||||
{
|
||||
var prefix = string.IsNullOrWhiteSpace(EnvironmentName)
|
||||
var prefix = !IncludeEnvironmentInServiceName || string.IsNullOrWhiteSpace(EnvironmentName)
|
||||
? ServicePrefix
|
||||
: ServicePrefix + " " + EnvironmentName.Trim();
|
||||
return prefix.Trim() + " " + suffix;
|
||||
@@ -117,6 +120,10 @@ namespace BizTalkCheckmkPulse
|
||||
options.Server = ReadString(settings, "Server", options.Server);
|
||||
options.ServicePrefix = ReadString(settings, "ServicePrefix", options.ServicePrefix);
|
||||
options.EnvironmentName = ReadString(settings, "EnvironmentName", options.EnvironmentName);
|
||||
options.IncludeEnvironmentInServiceName = ReadBool(
|
||||
settings,
|
||||
"IncludeEnvironmentInServiceName",
|
||||
options.IncludeEnvironmentInServiceName);
|
||||
options.QueryTimeoutSeconds = ReadInt(settings, "QueryTimeoutSeconds", options.QueryTimeoutSeconds, 5, 120);
|
||||
options.ProbeSqlConnectivity = ReadBool(settings, "ProbeSqlConnectivity", options.ProbeSqlConnectivity);
|
||||
options.SqlConnectionTimeoutSeconds = ReadInt(settings, "SqlConnectionTimeoutSeconds", options.SqlConnectionTimeoutSeconds, 3, 60);
|
||||
|
||||
@@ -98,8 +98,14 @@ namespace BizTalkCheckmkPulse
|
||||
+ result.SendPorts.Count
|
||||
+ " send_ports_not_started="
|
||||
+ result.SendPorts.Count(x => x.Status != 3)
|
||||
+ " endpoint_candidates_active="
|
||||
+ result.EndpointConnectivity.ActiveCandidates
|
||||
+ " endpoints_active="
|
||||
+ result.EndpointConnectivity.Active
|
||||
+ " endpoints_unsupported="
|
||||
+ result.EndpointConnectivity.UnsupportedActive
|
||||
+ " endpoints_excluded="
|
||||
+ result.EndpointConnectivity.ExcludedActive
|
||||
+ " endpoints_failed="
|
||||
+ result.EndpointConnectivity.Results.Count(x => !x.Available)
|
||||
+ " endpoints_unresolved="
|
||||
|
||||
@@ -6,5 +6,5 @@ using System.Reflection;
|
||||
[assembly: AssemblyDescription("Privileged BizTalk data provider and validated Checkmk snapshot consumer")]
|
||||
[assembly: AssemblyCompany("BEW")]
|
||||
[assembly: AssemblyProduct("BizTalk Checkmk Pulse")]
|
||||
[assembly: AssemblyVersion("2.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.2.1.0")]
|
||||
[assembly: AssemblyVersion("2.2.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.2.2.0")]
|
||||
|
||||
Reference in New Issue
Block a user