cookbook 'scalyr_agent', '~> 0.1.4'
scalyr_agent (5) Versions 0.1.4 Follow0
Installs, configures and runs the scalyr agent
cookbook 'scalyr_agent', '~> 0.1.4', :supermarket
knife supermarket install scalyr_agent
knife supermarket download scalyr_agent
Scalyr Chef Recipes
Official Chef recipes to install the Scalyr Agent.
This is currently in BETA release. We are stil investigating the best
way to support Chef users. Please send your feedback to support@scalyr.com.
Existing recipes have only been tested on chef 12.
The source code for this cookbook is available
here
Recipes
default
Installs, configures, enables at boot, and starts the scalyr agent service.
agent
Same as default
install
Installs the agent, but does not update configuration or start the agent service
configure
Updates the config files of the agent to match the attributes assigned to a
node. The agent will automatically detect new, modified, or deleted files so
you don't need to restart it after a configuration change.
start
Enables the agent to start at boot, and starts the scalyr agent service.
Usage
Add the scalyr_agent cookbook to your Chef server:
knife cookbook site install scalyr_agent
knife cookbook upload scalyr_agent
The scalyr_agent cookbook supports the following attributes, which can be
specified in a role, an environment or via other methods provided by chef such
as on the command line.
- api_key - Your scalyr write log API key. You can find your API key here.
- logs - A hash that maps glob patterns of the files you want to to monitor with a Scalyr log parser.
- server_attributes - A map of user specified server attributes that will be uploaded along with each log message.
- scalyr_server - The url of the scalyr server to upload to. If not specified this defaults to our US server.
Here is an example role showing a sample configuration for a simple webserver:
name 'webserver'
description 'Installs the nginx webserver and monitors logs with scalyr'
run_list(
'nginx',
'scalyr_agent::agent'
)
default_attributes(
'scalyr_agent' => {
'api_key' => 'YOUR_API_KEY_GOES_HERE',
'logs' => {
'/var/log/nginx/*.log' => 'accessLog'
},
'server_attributes' => {
'tier' => 'webserver'
}
}
)
This role will install nginx and the scalyr agent, and monitor all log files in
the /var/log/nginx directory.
If you will run the scalyr_agent on all your nodes you can also set up a 'base'
role so that you don't need to specify the API key each time:
name 'base'
description 'base role for nodes running the scalyr-agent'
run_list(
'scalyr_agent::agent'
)
default_attributes(
'scalyr_agent' => {
'api_key' => 'YOUR_API_KEY_GOES_HERE'
}
)
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.4 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.4 failed this metric
FC067: Ensure at least one platform supported in metadata: scalyr_agent/metadata.rb:1
FC069: Ensure standardized license defined in metadata: scalyr_agent/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.4 passed this metric
Testing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.4 failed this metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.4 failed this metric
FC067: Ensure at least one platform supported in metadata: scalyr_agent/metadata.rb:1
FC069: Ensure standardized license defined in metadata: scalyr_agent/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.4 passed this metric
Testing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.4 failed this metric
FC069: Ensure standardized license defined in metadata: scalyr_agent/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.4 passed this metric
Testing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.4 failed this metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number