Skip to content

Commit f24d41e

Browse files
authored
Merge pull request #33 from Icinga:fix/mssql_health_main_service
Fixes: MSSQL main service not added to health check
2 parents f3fa529 + 2c06102 commit f24d41e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

doc/31-Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ documentation before upgrading to a new release.
77

88
Released closed milestones can be found on [GitHub](https://github.com/Icinga/icinga-powershell-mssql/milestones?state=closed).
99

10+
## 1.2.0 (2021-06-02)
11+
12+
[Issue and PRs](https://github.com/Icinga/icinga-powershell-mssql/milestone/4?closed=1)
13+
14+
### Bugfixes
15+
16+
* [32](https://github.com/Icinga/icinga-powershell-mssql/issues/32) Fixes `MSSQLSERVER` service not being added by default for `Invoke-IcingaCheckMSSQLHealth`
17+
1018
## 1.1.0 (2021-03-02)
1119

1220
[Issue and PRs](https://github.com/Icinga/icinga-powershell-mssql/milestone/2?closed=1)

plugins/Invoke-IcingaCheckMSSQLHealth.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function Invoke-IcingaCheckMSSQLHealth()
119119
$StatusRaw = $ServiceObject.configuration.Status.raw;
120120

121121
# Now check if our instance name is either matching the exact service name of the instance name
122-
if ($service -eq $Instance -Or $service -eq ([string]::Format('MSSQL${0}', $Instance))) {
122+
if ($service -eq 'MSSQLSERVER' -Or $service -eq $Instance -Or $service -eq ([string]::Format('MSSQL${0}', $Instance))) {
123123
$ServiceCheck = New-IcingaCheck -Name $ServiceName -Value $StatusRaw -ObjectExists $service -Translation $ProviderEnums.ServiceStatusName;
124124
$ServiceCheck.CritIfNotMatch($ProviderEnums.ServiceStatus.Running) | Out-Null;
125125
$MSSQLCheckPackage.AddCheck($ServiceCheck);

0 commit comments

Comments
 (0)