oms-agent-for-linux BOSH release
This release provides an OMS Agent job for sending VM operational data (Syslog, Performance, Alerts, Inventory) to Azure OMS Log Analytics.
Prerequisites
Create an OMS Workspace in Azure
Get started
To deploy the OMS agent, you will need to install BOSH CLI on your Ops Manager Director and target it. For how to setup it, please follow the document here.
1. Upload release
To use this bosh release, first upload it to your BOSH Director:
# BOSH CLI v1
bosh upload release https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.12.15-0/oms-agent-for-linux-boshrelease-1.12.15-0.build7.tar.gz
# BOSH CLI v2
bosh upload-release https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.12.15-0/oms-agent-for-linux-boshrelease-1.12.15-0.build7.tar.gz
2. Deploy as a BOSH addon
To deploy OMS Agent on all instances in your CloudFoundry deployment, specify the job as an addon in runtime config.
First, create a new file runtime.yml
and paste all the following content into it.
# runtime.yml
---
releases:
- name: oms-agent-for-linux
version: 1.12.7-0
addons:
- name: omsagent
jobs:
- name: omsagent
release: oms-agent-for-linux
exclude:
stemcell:
- os: windows2012R2
- os: windows2016
- os: windows2019
- os: windows1803
properties:
# Get the OMS workspace ID and key from OMS Portal
oms:
workspace_id: CHANGE_ME
workspace_key: CHANGE_ME
top_level_domain: opinsights.azure.com # opinsights.azure.us for Azure US Government
# Set the rsyslog config as needed, optional
rsyslog:
selector_list:
- user.*
- syslog.*
port: 25224
protocol_type: udp
After replace placeholders in the file with id and key of your OMS workspace, deploy the runtime config with the following commands.
# BOSH CLI v1
bosh update runtime-config runtime.yml
bosh deploy
# BOSH CLI v2
bosh update-runtime-config runtime.yml
bosh deploy
Tips
- Recreate VMs when deploy then runtime-config will help to avoid potential problems.
- DO NOT specify the job as part of your deployment manifest if you are using the runtime config.
- If no
rsyslog
config is specified, the default rsyslog config of OMS Agent will be used. - Try delete leading spaces and input them by yourself if error
Incorrect YAML structure
occurs when updatingruntime-config
withruntime.yml
copied from above.
View in OMS Portal
Import OMS View
Operators can use OMS portal to visualize the logs and metrics collected by OMS Agent. From the main OMS Overview page, go to View Designer -> Import -> Browse, select the Syslog and Perf.omsview file, and save the view. Now a Tile will be displayed on the main OMS Overview page. Click the Tile, it shows visualized metrics.
Operators can customize the view or create new views through View Designer.
Additional reference
To collect metrics and logs from the Loggregator Firehose to OMS Log Analytics, please refer to oms-log-analytics-firehose-nozzle.