Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 <= 7.4.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'oraziobattaglia-azurelaagent', '0.1.5'
Learn more about managing modules with a PuppetfileDocumentation
azurelaagent
Table of Contents
- Description
- Setup - The basics of getting started with azurelaagent
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
Install the Azure Log Analytics agent on Linux and Windows. This is a beta module, feel free to contribute.
Setup
What azurelaagent affects
The module have the dependecies:
- puppetlabs-stdlib
- puppetlabs-powershell
Setup Requirements
- Require powershell version 3 or major to use the Invoke-WebRequest cmdlet
Beginning with azurelaagent
Example
To install the agent
class { 'azurelaagent':
azure_id => 'your_workspace_id',
azure_shared => 'your_shared_key',
}
To modify workspace id and key after installation
class { 'azurelaagent::config':
azure_id => 'your_workspace_id',
azure_shared => 'your_shared_key',
}
To modify the proxy settings after installation
Unauthenticated proxy
class {'azurelaagent::config_proxy':
proxy_server => 'http://your.proxy:port',
}
Authenticated proxy
class {'azurelaagent::config_proxy':
proxy_server => 'http://your.proxy:port',
proxy_user => 'username',
proxy_password => 'password',
}
To remove the proxy settings after installation
class {'azurelaagent::config_proxy':
ensure => 'absent',
}
To uninstall the agent
class { 'azurelaagent':
ensure => 'absent',
}
Usage
If you need to change specific data in Linux or Windows installation use yaml files like
azurelaagent::install_linux::x64_download_path: 'https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent_v1.8.1.256/omsagent-1.8.1-256.universal.x64.sh'
azurelaagent::install_windows::x64_download_path: 'https://go.microsoft.com/fwlink/?LinkId=828603'
Reference
See reference.
Limitations
OS compatibility: tested on Ubuntu 16.04 and Windows Server 2012 R2.
Development
Contributions are welcome!
Release Notes/Contributors/Etc.
Reference
Table of Contents
Classes
azurelaagent
: Install and configure Azure Log Analytics on Windows and Linuxazurelaagent::config
: Change Azure Log Analytics configuration on Windows and Linuxazurelaagent::config_linux
: Permit to set new workspace Id and Key. Remove all present workspace Ids.azurelaagent::config_proxy
: Configure proxy settings after installationazurelaagent::config_proxy_linux
: Configure proxy settings after installationazurelaagent::config_proxy_windows
: Configure proxy settings after installationazurelaagent::config_windows
: Permit to set new workspace Id and Key. Remove all present workspace Ids.azurelaagent::install_linux
: Install agent on linux.azurelaagent::install_windows
: Install agent on windows.
Classes
azurelaagent
Install and configure Azure Log Analytics on Windows and Linux
Examples
Explicit data
class { 'azurelaagent':
azure_id => 'your_workspace_id',
azure_shared => 'your_shared_key',
}
Data on yaml file
include azurelaagent
Parameters
The following parameters are available in the azurelaagent
class.
ensure
Data type: String
'present' to install the agent, 'absent' to uninstall the agent
azure_id
Data type: Optional[String]
Azure workspace ID
Default value: undef
azure_shared
Data type: Optional[String]
Azure shared key
Default value: undef
use_proxy
Data type: Optional[Boolean]
True to use a proxy
Default value: false
proxy
Data type: Optional[String]
Proxy URL like [protocol://][user:password@]proxyhost[:port]
Default value: undef
azurelaagent::config
Change Azure Log Analytics configuration on Windows and Linux
Examples
Explicit data
class { 'azurelaagent::config':
azure_id => 'your_workspace_id',
azure_shared => 'your_shared_key',
}
Data on yaml file
include azurelaagent::config
Parameters
The following parameters are available in the azurelaagent::config
class.
azure_id
Data type: String
Azure workspace ID
azure_shared
Data type: String
Azure shared key
azurelaagent::config_linux
Permit to set new workspace Id and Key. Remove all present workspace Ids.
Examples
class {'azurelaagent::config_linux':
azure_id => 'new_workspace_id',
azure_shared => 'new_shared_key',
}
Parameters
The following parameters are available in the azurelaagent::config_linux
class.
azure_id
Data type: String
The new workspace id
azure_shared
Data type: String
The new workspace key
omsadmin_command
Data type: Optional[String]
azurelaagent::config_proxy
Configure proxy settings after installation
Examples
class {'azurelaagent::config_proxy':
proxy_server => 'http://your.proxy:port',
proxy_user => 'username',
proxy_password => 'password',
}
Parameters
The following parameters are available in the azurelaagent::config_proxy
class.
ensure
Data type: String
'present' to set proxy, 'absent' to purge settings
proxy_server
Data type: Optional[String]
The proxy url like http://your.proxy:port
Default value: undef
proxy_user
Data type: Optional[String]
Username for proxy that require authentication
Default value: undef
proxy_password
Data type: Optional[String]
Password for proxy that require authentication
Default value: undef
azurelaagent::config_proxy_linux
Configure proxy settings after installation
Examples
class {'azurelaagent::config_proxy_linux':
proxy_server => 'http://your.proxy:port',
proxy_user => 'username',
proxy_password => 'password',
}
Parameters
The following parameters are available in the azurelaagent::config_proxy_linux
class.
ensure
Data type: String
'present' to set proxy, 'absent' to purge settings
proxy_server
Data type: Optional[String]
The proxy url like http://your.proxy:port
Default value: undef
proxy_user
Data type: Optional[String]
Username for proxy that require authentication
Default value: undef
proxy_password
Data type: Optional[String]
Password for proxy that require authentication
Default value: undef
path_proxy_conf
Data type: Optional[String]
Where's the proxy.conf file
service_restart_command
Data type: Optional[String]
Command to restart the omsagent
azurelaagent::config_proxy_windows
Configure proxy settings after installation
Examples
class {'azurelaagent::config_proxy_windows':
proxy_server => 'http://your.proxy:port',
proxy_user => 'username',
proxy_password => 'password',
}
Parameters
The following parameters are available in the azurelaagent::config_proxy_windows
class.
ensure
Data type: String
'present' to set proxy, 'absent' to purge settings
proxy_server
Data type: Optional[String]
The proxy url like http://your.proxy:port
Default value: undef
proxy_user
Data type: Optional[String]
Username for proxy that require authentication
Default value: undef
proxy_password
Data type: Optional[String]
Password for proxy that require authentication
Default value: undef
path_to_download
Data type: Optional[String]
Where to put the powershell script
azurelaagent::config_windows
Permit to set new workspace Id and Key. Remove all present workspace Ids.
Examples
class {'azurelaagent::config_windows':
azure_id => 'new_workspace_id',
azure_shared => 'new_shared_key',
}
Parameters
The following parameters are available in the azurelaagent::config_windows
class.
azure_id
Data type: String
The new workspace id
azure_shared
Data type: String
The new workspace key
path_to_download
Data type: Optional[String]
azurelaagent::install_linux
To override default value use yaml file and define variables like azurelaagent::install_linux::x64_download_path: 'https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent_v1.8.1.256/omsagent-1.8.1-256.universal.x64.sh'
Parameters
The following parameters are available in the azurelaagent::install_linux
class.
ensure
Data type: String
'present' to install the agent, 'absent' to uninstall the agent
azure_id
Data type: Optional[String]
Azure workspace ID (passed from init.pp)
Default value: undef
azure_shared
Data type: Optional[String]
Azure shared key (passed from init.pp)
Default value: undef
x64_download_path
Data type: String
URL of the 64 bit agent
x86_download_path
Data type: String
URL of the 32 bit agent
path_to_download
Data type: String
Where to download the installer
downloaded_script
Data type: String
Name of the installer script
use_proxy
Data type: Optional[Boolean]
True to use a proxy (passed from init.pp)
Default value: false
proxy
Data type: Optional[String]
Proxy URL like [protocol://][user:password@]proxyhost[:port] (passed from init.pp)
Default value: undef
azurelaagent::install_windows
To override default value use yaml file and define variables like azurelaagent::install_windows::x64_download_path: 'https://go.microsoft.com/fwlink/?LinkId=828603'
Parameters
The following parameters are available in the azurelaagent::install_windows
class.
ensure
Data type: String
'present' to install the agent, 'absent' to uninstall the agent
azure_id
Data type: Optional[String]
Azure workspace ID (passed from init.pp)
Default value: undef
azure_shared
Data type: Optional[String]
Azure shared key (passed from init.pp)
Default value: undef
x64_download_path
Data type: String
URL of the 64 bit agent
x86_download_path
Data type: String
URL of the 32 bit agent
path_to_download
Data type: String
Where to download the installer
downloaded_exe
Data type: String
Name of the installer
path_to_test_installation
Data type: String
Agent binaries path, used in the exec resource
package_name
Data type: String
Package name as is in Control Panel, Programs and Features
use_proxy
Data type: Optional[Boolean]
True to use a proxy (passed from init.pp)
Default value: false
proxy
Data type: Optional[String]
Proxy URL like [protocol://][user:password@]proxyhost[:port] (passed from init.pp)
Default value: undef
Changelog
Release 0.1.5
Features
- Updated agent for linux versions
Bugfixes
- Removed "ensure_resource" function, used builtin function "defined"
Known Issues
- The windows agent supports more than one workspace id but this module configures only one.
- Sometime the proxy server is configured without the protocol (http|https), for example using 'http://myproxy.com' the agent configuration will be 'myproxy.com'. This cause problem with idempotency. Seem to be a problem with the 'AgentConfigManager.MgmtSvcCfg' object used in the ChangeProxy.ps1 script.
- On Linux when change the proxy configuration there's no command to view the current proxy settings. The /opt/microsoft/omsagent/bin/omsadmin.sh -l command show the current workspace configuration but there isn't a switch to show the current proxy configuration.
Release 0.1.4
Features
- Install and uninstall Azure Log Analytics agent on linux and windows systems
- Modify Azure Log Analytics workspace id and key after installation
- Modify proxy settings after installation
Bugfixes
- Added resource dependecies
Known Issues
- The windows agent supports more than one workspace id but this module configures only one.
- Sometime the proxy server is configured without the protocol (http|https), for example using 'http://myproxy.com' the agent configuration will be 'myproxy.com'. This cause problem with idempotency. Seem to be a problem with the 'AgentConfigManager.MgmtSvcCfg' object used in the ChangeProxy.ps1 script.
- On Linux when change the proxy configuration there's no command to view the current proxy settings. The /opt/microsoft/omsagent/bin/omsadmin.sh -l command show the current workspace configuration but there isn't a switch to show the current proxy configuration.
Release 0.1.3
Features
- Install and uninstall Azure Log Analytics agent on linux and windows systems
- Modify Azure Log Analytics workspace id and key after installation
- Modify proxy settings after installation
Bugfixes
Known Issues
- Sometime the proxy server is configured without the protocol (http|https), for example using 'http://myproxy.com' the agent configuration will be 'myproxy.com'. This cause problem with idempotency. Seem to be a problem with the 'AgentConfigManager.MgmtSvcCfg' object used in the ChangeProxy.ps1 script.
- On Linux when change the proxy configuration there's no command to view the current proxy settings. The /opt/microsoft/omsagent/bin/omsadmin.sh -l command show the current workspace configuration but there isn't a switch to show the current proxy configuration.
Release 0.1.2
Features
- Install and uninstall Azure Log Analytics agent on linux and windows systems
- Modify Azure Log Analytics workspace id and key after installation
Bugfixes
Known Issues
Release 0.1.1
Features
- Install and uninstall Azure Log Analytics agent on linux and windows systems
Bugfixes
Known Issues
- To change worspace id and shared key uninstall the agent and install it again with the new values
Release 0.1.0
Features
- Install Azure Log Analytics agent on linux and windows systems
Bugfixes
- Metadata fixes
Known Issues
Release 0.0.9
Features
- Install Azure Log Analytics agent on linux and windows systems
Bugfixes
Known Issues
Dependencies
- puppetlabs/stdlib (>= 3.2.0 < 6.6.0)
- puppetlabs/powershell (>= 2.0.0 < 4.1.0)