Skip to content

Instantly share code, notes, and snippets.

@yokota-shinsuke
yokota-shinsuke / cloud_watch
Last active December 31, 2023 09:01
Zabbix template for AWS/RDS and Ruby script for external check. The template includes Item definitions(all CloudWatch metrics), Graph definitions and Screen definition. Zabbix server needs role with to enough permissions to read CloudWatch and rubygem-aws-sdk. Put script "cloud_watch" at zabbix-server:/usr/lib/zabbix/externalscripts, add excite …
#!/usr/bin/ruby
require 'rubygems'
require 'aws-sdk'
require 'optparse'
params = ARGV.getopts(
"",
"region:",
"service:",
@yokota-shinsuke
yokota-shinsuke / discover_s3
Created May 16, 2014 10:23
Monitor S3 with Zabbix
#!/usr/bin/ruby
require 'rubygems'
require 'aws-sdk'
require 'optparse'
require 'json'
discovery = {'data' => []}
s3 = AWS::S3.new
s3.buckets.each do |bucket|