Managed Google Stackdriver Logging Agent via Puppet
APACHE-2.0 License
Puppet module for Google Cloud Operations agents.
https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent#access
The following modules must be available on the Puppet server:
To build the module from source:
pdk build
pkg/
puppet module install ops-cloud_ops-0.1.0.tar.gz
puppet module list
Parameter | Default | Description |
---|---|---|
agent_type |
Required | The agent type. The allowed values are: ops-agent , monitoring , logging
|
package_state |
present |
Whether the agent should be installed or not. The allowed values are: present and absent . |
version |
latest |
The version variable can be used to specify which version of the agent to install. The allowed values are latest , MAJOR_VERSION.*.* and MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION , which are described in detail below. |
main_config |
Optional value for overriding the default configuration. For configuration syntax instructions, see Ops Agent Config, Logging Agent Config, and Monitoring Agent for more details. | |
additional_config_dir |
Optional value for overriding the plugins directory for the monitoring or logging agents |
version=latest
version=MAJOR_VERSION.*.*
version=MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION
An example implementation can be found in test/cases/linux/ops-agent/latest/install/manifests/site.pp
Install the latest version:
google_cloud_ops::agent {'ops-agent':
agent_type => 'ops-agent',
}
This example assumes:
example
example
has a file at files/ops_agent/config.yaml
that represents the custom configurationInstall version 1.0.5 and use a custom configuration:
google_cloud_ops::agent {'ops-agent':
agent_type => 'ops-agent',
installed => true,
version => '1.0.5',
main_config => 'puppet:///modules/example/ops_agent/config.yaml',
}
Ensure the agent is not installed by setting installed
to false:
google_cloud_ops::agent {'ops-agent':
agent_type => 'ops-agent',
installed => false,
version => 'latest',
}
google_cloud_ops::agent {'monitoring-agent':
agent_type => 'monitoring',
installed => true,
version => '6.*.*',
# optional
main_config => 'puppet:///modules/example/monitoring/collectd.conf',
additional_config_dir => 'puppet:///modules/example/monitoring/plugins'
}
google_cloud_ops::agent {'logging-agent':
agent_type => 'logging',
installed => true,
version => 'latest',
# optional
main_config => 'puppet:///modules/example/logging/google-fluentd.conf',
additional_config_dir => 'puppet:///modules/example/logging/plugins'
}
Copyright 2021 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.