cookbook 'm-site24x7', '= 1.0.1'
m-site24x7 (2) Versions 1.0.1 Follow0
Installs/Configures site24x7 server monitoring agent. Obs: This is a fork from Zoho Site24x7 oficial cookbook
cookbook 'm-site24x7', '= 1.0.1', :supermarket
knife supermarket install m-site24x7
knife supermarket download m-site24x7
Mission Site24x7 Cookbook
This cookbook installs the site24x7 monitoring agent and configures it
Requirements:
Add this line to the client cookbook metadata.rb
where you want the site24x7 agent to be installed:
depends 'm-site24x7'
Quick Example
site24x7agent node.name do api_key 'us_1234567890' end
Full syntax
Resource block
site24x7agent 'display_name' do api_key String # Required if the "node['Site24x7']['APIkey']" is not set group_name String # Only works during initial installation configuration_template String # Only works during initial installation proxy_enabled True, False # Defaults to false proxy_host String # Required if proxy_enabled is true proxy_port Integer # Required if proxy_enabled is true proxy_user String # May be left unset to specify no username proxy_pass String # May be left unset to specify no password end
Actions
:install # Default, installs the agent if it is not installed. Does nothing if agent is already installed :update # Updates the site24x7 configuration to match the provided settings. Does not perform installation if site24x7 isn't installed :uninstall # Uninstalls the agent. (WARNING: This has not been fully tested nor confirmed to work correctly)
Properties
api_key Site24x7 API key to install the agent with. Required if the "node['Site24x7']['APIkey']" attribute is not set
group_name What site24x7 group should the system be placed in. Optional, only works during initial installation
configuration_template What site24x7 configuration should be used. Optional, only works during initial installation
proxy_enabled If true, enables proxy mode. If false, all proxy settings are disabled
proxy_host The hostname (or ip) of the proxy system. Ignored if proxy is disabled
proxy_port The port the connect to on the proxy system. Ignored if proxy is disabled
proxy_user The username to use when connecting to the proxy system. Ignored if proxy is disabled
proxy_pass The password to use when connecting to the proxy system. Ignored if proxy is disabled
More Detailed Examples
Installation
To install the site24x7 agent on a system, then add the resource block, as in the example below.
site24x7agent node.name do api_key 'us_1234567890' end
In order to prevent site24x7 from starting during automated kitchen tests, use the following block:
unless ENV['TEST_KITCHEN'] site24x7agent node.name do api_key 'us_1234567890' end end
Alternatively, you may also use the default['Site24x7']['APIkey']
attribute in place of
specifying the api_key in the resource block. However, the attribute is set AND the api key
is provided in the resource block then the one provided by the resource block will be used.
Update
By default, the cookbook will only install the agent if it is not already installed and
will make no changes if it is installed. To update existing installations, you will need
to specify the update action, as in the example below
site24x7agent node.name do api_key 'us_1234567890' action :update end
Proxy
The proxy_enabled property should be set to true to enable proxy mode in the site24x7 agent. If proxy mode is
true, then both host and port is REQUIRED. The user and pass properties are not required.
If proxy mode is false (the default) then it will disable all proxy settings on the agent.
site24x7agent 'Test Kitchen Instance' do api_key 'us_1234567890' proxy_enabled true proxy_host '1.2.3.4' proxy_port 3128 end
Dependent cookbooks
m-patch ~> 0.3 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.