I was preparing some virtual environment for testing so I decide just do document this. If you are using OMS you already know that there is OMS agent for Linux (still Preview). Supported operating are
- Amazon Linux 2012.09 –> 2015.09 (x86/x64)
- CentOS Linux 5,6, and 7 (x86/x64)
- Oracle Linux 5,6, and 7 (x86/x64)
- Red Hat Enterprise Linux Server 5,6 and 7 (x86/x64)
- Debian GNU/Linux 6, 7, and 8 (x86/x64)
- Ubuntu 12.04 LTS, 14.04 LTS, 15.04, 15.10 (x86/x64)
- SUSE Linux Enteprise Server 11 and 12 (x86/x64)
But before OMS agent lets first install Linux Integration Services for Hyper-V . It enables lot of Hyper-V features to work and provide driver support for virtual Linux machines. Latest version is 4.1 any you can read all about it in documentation attached to installation. You can find it here.
Mount LIS ISO file. CentOS has already installed LIS 3.1 so you will need to run upgrade.sh instead install.sh. You can see that I get an “error” when I tried to install. After installation you will need to restart Linux machine .
After installation of LIS lets install OMS agent. You can download agent from OMS portal but that is not Linux way to do it. Open terminal and download installation and install agent with next lines of commands
wget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/v1.1.0-28/omsagent-1.1.0-28.universal.x64.sh sha256sum ./omsagent-1.1.0-28.universal.x64.sh sudo sh ./omsagent-1.1.0-28.universal.x64.sh --upgrade -w <YOUR OMS WORKSPACE ID> -s <YOUR OMS WORKSPACE PRIMARY KEY>
I should not remind you, I hope, to enter workspace id and workspace primary key in last command
Lets check know If my OMS Linux agent is connected! As I can see it is not because there is 0 servers connected. Why?
If you check logs on your Linux machine ( var
/opt/microsoft/omsagent/omsagent.log) you will see something like this.
It means you didn’t load configuration because you are not connected to OMS. Why? Because in my network you need to pass proxy. To install it right use –p option when onboarding MOMS.
sudo sh ./omsagent-1.1.0-28.universal.x86.sh --upgrade -p http://<proxy user>:<proxy password>@<proxy address>:<proxy port> -w <workspaceid> -s <shared key>
Use this only if you didn’t run command already. If you did, run next command to onboard again using proxy settings.
cd /opt/microsoft/omsagent/bin sudo ./omsadmin.sh -p http://<proxy user>:<proxy password>@<proxy address>:<proxy port> -w <WorkspaceID> -s <Shared Key>
You should get output like this. You see that there is proxy.conf file created that MOMS agent will use for communicating with Internet.
After that you will see in OMS happy info. Add some counters for Linux to get some data out of it on OMS.
for all linux funs outhere (I am newbie) there is script to install OMS agent and DSC resources for Linux in one file you can find it here. Thanks Jonhatan