Class: Awsbix
- Inherits:
-
Object
- Object
- Awsbix
- Includes:
- API, AmazonWebServices, Base, Conf
- Defined in:
- lib/awsbix/api.rb,
lib/awsbix.rb,
lib/awsbix/aws.rb,
lib/awsbix/base.rb,
lib/awsbix/conf.rb,
lib/awsbix/error.rb
Overview
Author: Tom Llewellyn-Smith <[email protected]>
Copyright: © Onix Consulting Limited 2012-2015. All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Defined Under Namespace
Modules: API, AmazonWebServices, Base, Conf Classes: ErrorAWSAuthentication, ErrorNoConfiguration, ErrorZabbixAuthentication
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(config) ⇒ Awsbix
constructor
A new instance of Awsbix.
Methods included from Conf
#configured?, #get_conf, #read
Methods included from Base
Methods included from AmazonWebServices
#aws_get_hosts, #aws_get_regions, #ec2_connect
Methods included from API
#zbx_connect, #zbx_connected?, #zbx_create_group, #zbx_create_host, #zbx_disable_host, #zbx_enable_host, #zbx_get_all_hosts, #zbx_group_exists?, #zbx_host_exists?, #zbx_process_host
Constructor Details
#initialize(config) ⇒ Awsbix
Returns a new instance of Awsbix.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/awsbix.rb', line 31 def initialize(config) begin if File.exists?(config) then puts "info: #{config} exists using it" self.read(config) end rescue Awsbix::ErrorNoConfiguration puts "error: please provide a YAML configuration" exit end end |
Instance Method Details
#dump ⇒ Object
44 45 46 |
# File 'lib/awsbix.rb', line 44 def dump() puts self.inspect end |