-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Philipp Dorschner
committed
Feb 28, 2022
1 parent
42f6dc2
commit 196fbae
Showing
1 changed file
with
88 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,88 @@ | ||
template CheckCommand "cloud_aws" { | ||
command = [ PluginDir + "/check_cloud_aws" ] | ||
|
||
arguments = { | ||
"-t" = { | ||
value = "$cloud_aws_timeout$" | ||
description = "Timeout for the check" | ||
} | ||
"-P" = { | ||
value= "$cloud_aws_profile$" | ||
description = "AWS credential profile (~/.aws/credentials)" | ||
} | ||
"-R" = { | ||
value = "$cloud_aws_region$" | ||
description = "AWS region name (e.g. eu-central-1)" | ||
} | ||
} | ||
} | ||
|
||
object CheckCommand "cloud_aws_instance" { | ||
import "cloud_aws" | ||
|
||
arguments += { | ||
"ec2" = { | ||
value = "$cloud_aws_ec2$" | ||
description = "Checks in the EC2 context" | ||
} | ||
"instance" { | ||
value = "$cloud_aws_instance$" | ||
description = "Checks a single EC2 instance" | ||
} | ||
"-i" = { | ||
value = "$cloud_aws_id$" | ||
description = "Look for ec2 instance by id" | ||
} | ||
"-n" = { | ||
value = "$cloud_aws_name$" | ||
description = "Look for ec2 instance by name" | ||
} | ||
} | ||
|
||
vars.cloud_aws_ec2 = "ec2" | ||
vars.loud_aws_instance = "instance" | ||
} | ||
|
||
object CheckCommand "cloud_aws_instance" { | ||
import "cloud_aws" | ||
|
||
arguments += { | ||
"ec2" = { | ||
value = "$cloud_aws_ec2$" | ||
description = "Checks in the EC2 context" | ||
} | ||
"instances" = { | ||
value = "$cloud_aws_instances$" | ||
description = "Checks multiple EC2 instances by name" | ||
} | ||
"-n" = { | ||
value = "$cloud_aws_name$" | ||
description = "Search for ec2 instances by name (e.g. instance*)" | ||
} | ||
"-a" = { | ||
value = "$cloud_aws_autoscale$" | ||
description = "Search for ec2 instances by autoscaling group" | ||
} | ||
} | ||
|
||
vars.cloud_aws_ec2 = "ec2" | ||
vars.loud_aws_instances = "instances" | ||
} | ||
|
||
apply Service "cloud_aws_single_instance" { | ||
import "generic-service" | ||
|
||
check_command = "cloud_aws_instance" | ||
|
||
vars.cloud_aws_name = "IcingaMaster" | ||
|
||
assign where host.name == NodeName | ||
} | ||
|
||
apply Service "cloud_aws_multiple_instances" { | ||
import "generic-service" | ||
|
||
check_command = "cloud_aws_instances" | ||
|
||
assign where host.name == NodeName | ||
} |