Configuration Management Pack Testing Xplat

SCOM 2012 R2 TP3 – Monitoring Apache Web Server


Few month ago, Microsoft released management packs for monitoring open source software like Apache HTTP Server or MySQL databases. In this post I would like to have an overview of monitoring Apache web server. So far there have not been many free options to actually monitor this web server, although it is a very common candidate out in the field. This management pack shows clearly Microsoft’s commitment to support open-source software in the SCOM world.


This  current management pack supports version Apache HTTP Server version 2.2 and 2.4 if you install Apache from one of the SCOM supported Linux distributions. Find all supported *nix versions  here . In SUSE Linux Enterprise Server 11 there is Apache version 2.2 and in SUSE Linux Enterprise Server 12 there is Apache version 2.4 included. In this example I installed SUSE Enterprise Server 11 SP3.

The Apache management pack is part of the System Center 2016 Technical Preview 2 Management Packs for Open Source Software found here . Required is at least SCOM 2016 TP2, but SCOM TP2 has already expired few month ago, I will use SCOM 2016 TP3, which also works perfectly fine and can be found here .


First import all management packs for your Linux distribution from the SCOM source itself, depending on your distribution you need to add different MP’s. In my case I will use the SLES (SUSE) MP’s. Make sure you import all depended MP’s also …


After some time, you will find in the DownloadedKits directory,  the corresponding shell script bundles for your Linux distributions…


You might are used to have *.rpm or *.deb files in this directory, in this current version Microsoft delivers a *.sh package we need to extract later on. Because these are no installer file, I could not use the SCOM agent wizard to deploy these packages. So we need to take some manual steps to install the agent.

Copy this package to your Linux server using e.g. WinSCP . WinSCP will allow you to connect to your Linux server from your Windows box and upload any files from your local system…


Before we proceed make sure you have configured your Linux monitoring RunAs accounts properly. Please read this post for more details on how to configure the RunAs accounts , it shows you exactly how to monitor a Linux server.

At this stage you should have the proper Linux distribution MP’s imported, RunAs accounts configured and also the agent source file copied to the Linux server.

Note: We imported these management packs first, because this will place the agent file into the C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\AgentManagement\UnixAgents\DownloadedKits on your SCOM server, which is needed to install the agent.

Install SCOM Linux agent

Log into your Linux box and open a terminal session, in my case I am logged in as root into and changed to the /tmp directory where I copied the agent source There are multiple steps you need to execute:

  1. Make the shell file executable by executing the command:  chmod +x
  2. See all options you have for the package: ./ – -help
  3. Install the agent only – -Install


As you can see the installation routine checks, if Apache is already installed or not. In my case I haven’t installed the web server and therefore we need to take additional steps. I did this on purpose, to see how it works to install the Apache cim-provider. Now you basically have the blank OMI agent installed but there is no “connection” between SCOM and this agent. Therefore we need to run the agent discovery for discovering the Linux box, sign the certificate and finally manage this server. Just run the Linux discovery wizard, as you would install a regular Linux agent. Your wizard should look like this if you configured everything properly…


…hit Manage and finally your Linux box is monitored by SCOM…


Go to the Monitoring pane and click through the views, you should see some objects popping up after a while …


At this point you should have the Linux server monitored and if this is ok we will take the next step and install the Apache HTTP Server.

Install Apache HTTP Server

In this step we will install a plane Apache HTTP Server using the SUSE package installer. Go to Install/Remove Software and search for Apache…


The search result will show up with all Apache modules and packages, I selected the following (some depended packages are selected automatically)…


…some dependencies are resolved…


After installation we need to switch to the terminal window and create a default index.html file, because there is no such file per default installed. Of course this step is optional, but I want to check if my web server works 🙂 and therefore I want to show a default website. Change into the /srv/www/htdocs directory and create a index.html file…


…add some content to the index.html file…


Save the file and start the Apache service…


If you open http://localhost you should see the default site like this…


At this stage we have Apache HTTP server installed and running.

Import Apache HTTP Server  management packs

Next we need to import the management packs for monitoring the Apache HTTP Server itself. The management pack can be found here and contains also the MP for MySQL, which we don’t need. Import the following two files and


If you meet all dependencies, the import will succeed…


Configure CIM Provider

The last step is to configure the CIM Provider. The Apache CIM Provider package is automatically deployed during the installation of the Linux agent Operations Manager, if Apache HTTP Server is detected at that time. This detection and automatic installation occurs when installing the Linux agent for the first time on a computer, and it also occurs when upgrading a previous agent version to the current version. If the Apache HTTP Server is installed to the Linux computer after the Operations Manager agent is installed, the CIM Provider can be manually installed through the following mechanisms. Open a terminal window and change to /temp where uploaded the  package.Then execute these steps…

  1. Extract the  package : sudo sh ./  – -extract
  2. Change into the directory: cd scxbundle.20141/
  3. Extract the CIM Provider package: sudo ./ – -extract
  4. Change the directory: cd apache_22/
  5. Run the installation: rpm –I apache-cimprov-1.0.0-545.universal.1.i686.rpm
  6. Restart the agent: scxadmin –restart
  7. Restart apache service: service apache2 restart


At this point the CIM Provider is installed and running. In order to load the module into Apache HTTP Server we need to modify the sudoers file. When you are monitoring *nix systems you need to modify the sudoers file which basically sets permission for the specific RunAs accounts we define in SCOM. For monitoring Apache HTTP Server we need to add an additional line…

  1. Open the file: sudo visudo
  2. Change to insert mode: press i
  3. Scroll at the end of the file and insert the following line, assuming your monitoring account is called monuser. This allows your privileged monitoring account to execute the script, which we will start from the SCOM console:
    monuser ALL=(root) NOPASSWD: /opt/microsoft/apache-cimprov/bin/
  4. Press Esc-key to leave vi editor
  5. Type :wq! to write and quit


Open the SCOM console and change to the Apache view, where you should see a not monitored object in the Apache HTTP Server view…


Click the Load Monitoring Module task, this will open this dialog…


…click Run, which will load the module into the web server using the privileged RunAs account. After a short time the task should finish successfully…


After some time you will see data dropping in…

Apache HTTP Servers…


Apache Virtual Hosts…


Performance counters…



There are multiple steps you need to take to monitor Apache HTTP Server. First monitor the basic Linux OS, if Apache has not been installed before, you need to install the CIM Provider afterwards. For monitoring Apache HTTP Server import the Apache MP’s and load the module apache-cimprov into the web server by executing the Load Monitoring Module SCOM task. At the end you get a pretty well monitored Apache HTTP Server having the most common performance counters out of the box. Be aware the discoveries run every 4 hours and the rule collect data every 5 minutes. If you need to know what exactly is being monitored and which data is collected read the MP guide provided here . The intention here was to play around with the Apache monitoring and therefore this procedure might does not exactly meet the production requirements. I hope you get an impression how things play together.

One Reply to “SCOM 2012 R2 TP3 – Monitoring Apache Web Server

  1. Nice article.
    How do I get this to work against a WindowsServer with Apache installed.
    I have SCOM2019 and have installed the MP and restartet the agent on a server running Apache.
    It is now showing up. Is there any config i have to do like on a Linux-server?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.