cloudWatch.py
Templates:
templates/AWS/aws.ec2.xml
templates/AWS/aws.ecs.xml
templates/AWS/aws.elb.application.xml
templates/AWS/aws.elb.classic.xml
templates/AWS/aws.rds.xml
templates/AWS/aws.s3.backups.xml
templates/AWS/aws.sqs.xml
- Python >= 3.5
- Boto3 library >= 1.9.45
./cloudWatch.py -l <aws access id> -p <aws secret key> -r <aws region> -n <name prefix> -m <mode> -q <query>
mode: query:
mode: query:
ec2
getList [-a 'InstanceID' or -a 'name=InstanceName']
getInfo -a 'InstanceID' or -a 'name=InstanceName'
getVolumesList -a 'InstanceID' or -a 'name=InstanceName'
getVolumeInfo -a 'InstanceID,VolumeID'
rds
getList [-a 'DatabaseName' or -a 'DatabaseARN']
getInfo [-a 'DatabaseName' or -a 'DatabaseARN']
ecs
clustersList
clusterInfo -a 'ClusterName'
tasksList -a 'clusterName'
taskInfo -a 'ClusterName,TaskName'
servicesList -a 'clusterName'
serviceInfo -a 'ClusterName,ServiceName'
elb
getList [-a 'ELBName']
getInfo -a 'ELBName,ELBType'
ELBType=(classic|application)
getTGList -a 'ELBName'
getTGInfo -a 'ELBName,TargetGroupName'
s3
getLatestFiles -a 'Bucket,Mask,DaysBack'
sqs
getList [-a 'Part of a queue name']
getInfo -a 'QueueName'
./cloudWatch.py -l "AccessKey" -p "SecretKey" -r us-west-2 -n Client1 -m elb -q getList
{
"data": [
{
"{#NAME}": "Staging",
"{#DNS}": "Staging-1234567.us-west-2.elb.amazonaws.com",
"{#TYPE}": "classic",
"{#SCHEME}": "internet-facing",
"{#ARN}": ""
},
{
"{#NAME}": "Production",
"{#DNS}": "Production-1234567.us-west-2.elb.amazonaws.com",
"{#TYPE}": "classic",
"{#SCHEME}": "internet-facing",
"{#ARN}": ""
}
]
}
./cloudWatch.py -l "AccessKey" -p "SecretKey" -r us-west-2 -n Client1 -m elb -q getInfo -a "Production,classic"
{
"name": "Production",
"instances": 2,
"instancesHealthy": 2,
"instancesUnHealthy": 0,
"HTTPCode_Backend_2XXAverage": 1,
"HTTPCode_Backend_2XXMinimum": 0,
"HTTPCode_Backend_2XXMaximum": 0,
"HTTPCode_Backend_2XXUnit": "Count",
"HTTPCode_Backend_4XXAverage": 0,
"HTTPCode_Backend_4XXMinimum": 0,
"HTTPCode_Backend_4XXMaximum": 0,
"HTTPCode_Backend_4XXUnit": "",
"HTTPCode_Backend_5XXAverage": 0,
"HTTPCode_Backend_5XXMinimum": 0,
"HTTPCode_Backend_5XXMaximum": 0,
"HTTPCode_Backend_5XXUnit": "",
"HTTPCode_ELB_5XXAverage": 0,
"HTTPCode_ELB_5XXMinimum": 0,
"HTTPCode_ELB_5XXMaximum": 0,
"HTTPCode_ELB_5XXUnit": "",
"EstimatedALBNewConnectionCountAverage": 30,
"EstimatedALBNewConnectionCountMinimum": 20,
"EstimatedALBNewConnectionCountMaximum": 48,
"EstimatedALBNewConnectionCountUnit": "Count",
"EstimatedALBActiveConnectionCountAverage": 5,
"EstimatedALBActiveConnectionCountMinimum": 5,
"EstimatedALBActiveConnectionCountMaximum": 6,
"EstimatedALBActiveConnectionCountUnit": "Count",
"UnHealthyHostCountAverage": 1,
"UnHealthyHostCountMinimum": 1,
"UnHealthyHostCountMaximum": 1,
"UnHealthyHostCountUnit": "Count",
"HealthyHostCountAverage": 1,
"HealthyHostCountMinimum": 1,
"HealthyHostCountMaximum": 1,
"HealthyHostCountUnit": "Count",
"RequestCountAverage": 1,
"RequestCountMinimum": 1,
"RequestCountMaximum": 1,
"RequestCountUnit": "Count",
"LatencyAverage": 0,
"LatencyMinimum": 0,
"LatencyMaximum": 0,
"LatencyUnit": "Seconds"
}
- {$AWSACCESS} - AWS Access key
- {$AWSREGION} - AWS Region
- {$AWSSECRET} - AWS Secret key
- {$PREFIX} - This prefix will be added to begin of some trigger names. Usually it should be different for hosts or group hosts.
- {$AWSBUCKET} - AWS Bucket
- {$BACKUPMASK} - file mask
- {$INSTANCEID} - Instance ID or tage 'Name'
- {$CLUSTERNAME} - ECS Cluster name
- {$RDSNAME} - RDS Instance name
- {$ELBNAME} - LoadBalancer name
- {$SQSNAME} - Name of the sqs queue or part of the name: "queue-xxx-dev-yyy" or just "dev"
sslCheck.py
Templates:
templates/ssl.c.check.xml
- Python >= 3.5
./sslCheck.py -d <dnsname> [-p port]
-d - DNS Name of the server
-p - port number
- {HOST.DNS} - Predefined value in Zabbix.
- {$HOST.SSL.PORT} - Macros. Default is 443
templates/SendTestAlert.xml
- Periodic sending testing alerts.