SCOM 2012 R2 Ubuntu Linux Agent

Managed ad

By justin, 14 February, 2016

So I wanted to monitor my Ubuntu 12.04 linux box with SCOM. I had read other places that they were able to do it with the Universal Linux Monitoring Management Pack (Microsoft.Linux.Universal.Monitoring) and Universal Linux (Debian) Discovery (Microsoft.Linux.UniversalD.1) without any problems, but when I tried to discover and install the agent through the console on the server I ran into this error:

Message:
Agent installation operation was not successful

Details:
Failed to install kit. Exit code: 1
Standard Output: Selecting previously unselected package scx.
(Reading database ... 278115 files and directories currently installed.)
Unpacking scx (from .../scx-1.4.1-304.universald.1.x64.deb) ...
Setting up scx (1.4.1.304) ...
Checking existence of /lib64/libssl.so.1.0.1 and /lib64/libcrypto.so.1.0.1 ...
Checking existence of /lib64/libssl.so.1.0.1 and /lib64/libcrypto.so.1.0.1 ...
Checking existence of /lib64/libssl.so.1.0.1 and /lib64/libcrypto.so.1.0.1 ...
Checking existence of /lib64/libssl.so.1.0.1 and /lib64/libcrypto.so.1.0.1 ...
Checking existence of /lib64/libssl.so.1.0.0 and /lib64/libcrypto.so.1.0.0 ...
Checking existence of /usr/lib64/libssl.so.1.0.1 and /usr/lib64/libcrypto.so.1.0.1 ...
Checking existence of /usr/lib64/libssl.so.1.0.1 and /usr/lib64/libcrypto.so.1.0.1 ...
Checking existence of /usr/lib64/libssl.so.1.0.1 and /usr/lib64/libcrypto.so.1.0.1 ...
Checking existence of /usr/lib64/libssl.so.1.0.1 and /usr/lib64/libcrypto.so.1.0.1 ...
Checking existence of /usr/lib64/libssl.so.1.0.0 and /usr/lib64/libcrypto.so.1.0.0 ...
Checking existence of /lib/x86_64-linux-gnu/libssl.so.1.0.1 and /lib/x86_64-linux-gnu/libcrypto.so.1.0.1 ...
Checking existence of /lib/x86_64-linux-gnu/libssl.so.1.0.1 and /lib/x86_64-linux-gnu/libcrypto.so.1.0.1 ...
Checking existence of /lib/x86_64-linux-gnu/libssl.so.1.0.1 and /lib/x86_64-linux-gnu/libcrypto.so.1.0.1 ...
Checking existence of /lib/x86_64-linux-gnu/libssl.so.1.0.1 and /lib/x86_64-linux-gnu/libcrypto.so.1.0.1 ...
Checking existence of /lib/x86_64-linux-gnu/libssl.so.1.0.0 and /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ...
  Found /lib/x86_64-linux-gnu/libssl.so.1.0.0 and /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ...
Starting Microsoft SCX CIM Server Processing triggers for ureadahead ...

Standard Error: Certificate not generated - '/etc/opt/microsoft/scx/ssl/scx-key.pem' exists
/etc/init.d/scx-cimd: line 36: rc_reset: command not found
/etc/init.d/scx-cimd: line 69: /etc/sysconfig/language: No such file or directory
/etc/init.d/scx-cimd: line 73: startproc: command not found
/etc/init.d/scx-cimd: line 74: rc_status: command not found
/etc/init.d/scx-cimd: line 136: rc_exit: command not found
invoke-rc.d: initscript scx-cimd, action "start" failed.
dpkg: error processing scx (--install):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while 

The problem is that it tries to use "startproc" which does not work in Ubuntu. the solution I found that worked for me requires a few steps:

  1. remove the scx that the console tried to install:
    apt-get remove scx

     

  2. ​copy the "scx-1.4.1-304.universald.1.x64.deb" file from your management server located at "<InstallDrive>:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\AgentManagement\UnixAgents\DownloadedKits" to your Ubuntu box. I put it in the "/tmp" directory, but you can put it wherever you want just as long as you execute it from that directory
     
  3. Install the "scx-1.4.1-304.universald.1.x64.deb" using dpkg from the comand line with the "--force-overwrite --force-overwrite-dir" switches from the directory you put it in:
    dpkg --install scx-1.4.1-304.universald.1.x64.deb --force-overwrite --force-overwrite-dir
     
  4. edit the "/etc/init.d/scx-cimd" file (I use nano for this). 
     
  5. Delete (or rem out with "#") "./etc/sysconfig/language" at or around line 69
     
  6. Change the line "startproc -p $SCX_CIMD_PIDFILE $SCX_CIMD_BIN" at or around line 73 to read only "$SCX_CIMD_BIN"
     
  7. Delete (or rem out with "#") "rc_status -v" at or around line 74
     
  8. Delete (or rem out with "#") "if [ $INIT_STYLE == S ]; then rc_exit; else exit $RETVAL; fi" which was the last line of the script for me.
     
  9. Run the command "/etc/init.d/scx-cimd start"

​Now that that is all done you can go back to your console and discover it and tell it to manage it.

Comments