This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add icinga2-commands.conf * Add icinga2-service-example.conf
- Loading branch information
Philipp Dorschner
authored
Mar 31, 2022
1 parent
db1f035
commit 65db1fa
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
template CheckCommand "microsoft365" { | ||
command = [ PluginContribDir + "/check_microsoft365" ] | ||
|
||
arguments = { | ||
"--clientid" = { | ||
value = "$microsoft365_clientid$" | ||
description = "The client id from your app registration" | ||
} | ||
"--clientsecret" = { | ||
value = "$microsoft365_clientsecret$" | ||
description = "The client secret from your app registration" | ||
} | ||
"--tenantid" = { | ||
value = "$microsoft365_tenantid$" | ||
description = "The tenant id from your app registration" | ||
} | ||
"--scope" = { | ||
value = "$microsoft365_scope$" | ||
description = "Represents the definition of a delegated permission" | ||
} | ||
"--timeout" = { | ||
value = "$microsoft365_timeout$" | ||
description = "Timeout for the check" | ||
} | ||
} | ||
} | ||
|
||
object CheckCommand "microsoft365-servicehealth" { | ||
import "microsoft365" | ||
|
||
command += ["servicehealth"] | ||
|
||
arguments += { | ||
"--servicenames" = { | ||
value = "$microsoft365_servicenames$" | ||
repeat_key = true | ||
description = "The name of one or more specific service/s" | ||
} | ||
"--state-override" = { | ||
value = "$microsoft365_stateoverrides$" | ||
repeat_key = true | ||
description = "States to override (e.g. STATENAME=ok)" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apply Service "microsoft365-servicehealth" { | ||
check_command = "microsoft365-servicehealth" | ||
|
||
vars.microsoft365_tenantid = "example_tenant_id" | ||
vars.microsoft365_clientsecret = "example_client_secret" | ||
vars.microsoft365_clientid = "example_client_id" | ||
vars.microsoft365_servicenames = [ "Exchange Online" ] | ||
vars.microsoft365_stateoverrides = [ "EXTENDEDRECOVERY=warning" ] | ||
|
||
assign where host.name == NodeName | ||
} |