Moogsoft Docs

SCOM Configuration - Basic

Installing the SCOM Connector

Note

Download

The current connector for download is available here SCOM-Connector-Basic-4.1.zip .

Note

The following requirements should met before installing the SCOM Connector:

  • Internet Information Services 6.0 should be enabled for viewing the Status GUI.
  • Windows Server 2012 or Windows Server 2016.

Note

A user must have administrative privileges to install the SCOM Connector.

Note

No version of SCOM Connector should be installed on the machine. If any version is present, then it has to be uninstalled before proceeding with the installation. To check if SCOM Connector is installed, first check whether the SCOM Connector service is present in the services view or not.

The SCOM Connector establishes communication between SCOM Server and SCOM LAM in the Moogsoft AIOps. Installing the connector installs REST servers which enables the connector to receive and forward alarms/events. To install the connector, follow the steps mentioned below:

Note

It is advisable to have the IP address and port of the REST Server that will be installed by the SCOM Connector, as it is to be entered in the installer GUI. The installer will install the REST Server using the specified IP addresses and ports.

  1. Copy and unzip the downloaded SCOMConnectorInstaller folder on the SCOM Server or any other Windows Server 2012 machine.
  2. In the SCOMConnectorInstaller folder, double click SCOMConnectorInstaller . The SCOM Connector Installer window will appear as shown below:



  3. Click the Add SCOM Server button. The SCOM Server Connection dialog box will appear.
  4. Enter the following details in the dialog box and click the Add Connection button . The SCOM Servers are added in the SCOM Server section:
    • Domain : The domain name of the SCOM Server.
    • SCOM Server Host Name : The host name of the SCOM Server e.g. Winsvr1.
    • User Id : The user name of the SCOM Server. e.g. Administrator or someuser@corp .
    • Password : The user password.

  5. To add another SCOM Server, click the Add SCOM Server button again and enter the details as explained above. This will add another SCOM Server from where the SCOM Connector will fetch alerts/events.

  6. Click the Add Moog Server button. The Moog Server Connection dialog box will appear.
  7. Enter the following details in the dialog box and then click the Add Connection button . The Moog Servers are added in the Moog Server section.

    • Moog URL: Enter the URL of the SCOM LAM.
    • Moog IP : The IP address of the SCOM LAM.
    • Moog Port : The port of the SCOM LAM.
    • Enable SSL: Select the checkbox to enable ssl authentication , uncheck it to bypass ssl key authentication.
    • PublicKey : The path of the SSL certificate. You can add a Public Key file by clicking the Browse button.



    • Proxy Authentication Required : Select the check box if proxy authentication is required for communication with the SCOM LAM.
    • Username : Enter the username along with the domain e.g. moogsoft\user1.
    • Password : Enter the password for the given username.
    • Proxy IP : Enter the IP address of the Proxy.
    • Proxy Port : Enter the port of the Proxy.

    Note

    If you have provided the Moog URL, then the Moog IP and Moog Port fields will become grayed out, and if you are specifying the details in the Moog IP and Moog Port fields, then the Moog URL field will be grayed out.




  8. Click the Add Moog Server button again, and to add another Moog Server, enter the details as explained above.

  9. Enter the Connector URL in the Connector URL field. The connector URL is the IP address of the machine on which the connector is to be installed and the port number is any available open port. Enter the IP address and port in format: http://<IP Address>:<port>.

    Note

    After installation, REST Server for the connector is installed with the given IP address and Port in the field Connector URL.

  10. Enter the Alert Storm Threshold . This is a threshold limit set to prevent an alert storm. If the number of alerts received by the SCOM Connector crosses the given value, then a message will be sent to Moogsoft AIOps that the threshold is breached. By default, it is set to 10000. The threshold value can also be changed after installation in the SCOMConnectorConfig.json file.


  11. Select the Auto Start Service on Installation checkbox to start the SCOM Connector automatically after installation.


    Note

    If the checkbox Auto Start Service on Installation is not selected, then the SCOM Connector service has to be started manually from the Services view. The Services view can be opened by entering services.msc in the Windows RUN menu.

  12. Click Install. The SCOM Connector will be installed at the location C:\Program Files (x86)\SCOMConnectorInstaller.

With the installation of the SCOM Connector, a service SCOM Connector will be installed on the server. Stopping the SCOM Connector service will stop the connector or vice versa.

The SCOM Connector service can be viewed in the Services view. To open the Services view, enter the services.msc in the Windows RUN menu.

Note

The configurations entered during the installation are saved in the SCOMConnectorConfig.json file. The file is saved on the location C:\Program Files (x86)\SCOMConnectorInstaller.

Note

After installation, the log file named SCOMConnector.log will be generated at the location C:\Logs\SCOMConnector.log . All the logs related to the SCOM Connector can be found in this file. The location of the log file can be changed in the SCOMConnector.exe.config file.

Note

The SCOM server and the Windows server machine on which the connector will be installed should be in the same domain.

Note

In SCOM Connector Multiple Moog Server Configuration, if a connection with any of the connected Moog Server breaks, then a critical alarm is sent by the connector to all other Moog Servers about the connection failure.

Note

While restarting the SCOM connector, always make sure that it has stopped completely before starting the SCOM Connector again. There should be a gap of 3-4 minutes before starting the connector.

Editing the SCOM Connector

The configurations entered during installation can be changed after the installation is done. To make the changes:

  1. Click on ScomConnectorInstaller present in the SCOM Connector installer folder. The SCOM Connector Installer window will appear as shown below:



  2. Click Stop Service.
  3. To add SCOM Server or a Moog Server, click the respective Add SCOM Server / Add Moog Server button and enter the details as described in the above procedure.
  4. To remove any SCOM Server or Moog Server, select the respective server and click Remove .
  5. Change the values in the Connector URL or the Alert Storm Threshold fields as required.
  6. Click Update Config .



  7. Click Start Service.

The changes done to the SCOM Connector are updated and saved in the SCOMConnectorConfig.json file.

Note

All the other configuration changes can be made in the SCOMConnectorConfig.json file situated at C:\Program Files (x86)\SCOMConnectorInstaller.

Configuring the SCOM Connector

The user can configure the SCOM Connector according to their requirements. The configurations are done in the SCOMConnectorConfig.json file. An example of the configuration file is as follows:

   
{
  "ScomServers": [
    {
      "ScomAddressHost": "WIN-9R4CQNMLGCS",
      "Domain": "moogsoftadmin.com",
      "UserId": "administrator",
      "Password": "5wZmZrCfMPH2PJ5/gQmFLg==",
      "Guid": "9566384b-a48b-48e4-b8f7-75c8e7926ecb"
    }
  ],
  "MoogServers": [
    {
      "MoogUrl": "https://scom_lam_url/events/scom_lam_microsoftscom1",
      "MoogIp": "",
      "MoogPort": "",
      "MoogAddressDisplay": "https://scom_lam_url/events/scom_lam_microsoftscom1",
      "MoogPublicKey": "",
      "IsSslEnabled": true,
      "IsProxyRequired": false,
      "ProxyUsername": "",
      "ProxyPassword": "",
      "MoogProxyIP": "",
      "MoogProxyPort": "",
      "Url": "",
      "IsConnected": false
    }
  ],
  "IsPrimary": true,
  "SCOMConnectorRestUrl": "http://10.142.24.165:9393",
  "SiblingConnectorUrl": "",
  "AlertStormThreshold": 10000,
  "IsActiveAlertPolling": true,
  "AlertPollCycleTime": 45,
  "IsActiveEventPolling": false,
  "EventPollCycleTime": 45,
  "AmountOfTimeouts": 5,
  "LowerTimeoutBound": 10,
  "UpperTimeoutBound": 360,
  "ConnectorName": "SCOM Connector",
  "ConnectorDescription": "SCOM Connector",
  "ConnectorDisplayName": "SCOM Connector",
  "MaxPollRetryAttempt": 3,
  "WinAuthOverride": false,
  "AuthTokenRequired": false,
  "AuthTokenCode": "",
  "Version": "4.0 (Basic)"
}

The SCOMConnectorConfig.json config file has the following 3 sections :

  • SCOM Servers: The information of the SCOM servers added during installation, and the time of the last poll of alerts and events is saved in this section.  The user don't have to make any changes here.
  • Moog Servers : The information of the Moog servers added during installation and the proxy information, if configured, is saved in this section. The user don't have to make any changes here.
  • Other configurations : The configurations other than the SCOM Server and Moog Server which is related to the connector is specified here. Some configurations are here only for informational purpose and should not be changed. The configurations that can be changed are as follows:

    • AlertStormThreshold : If the number of alerts received by the SCOM Connector crosses the given value, a message will be sent to the Moogsoft AIOps that the threshold is breached. By default, it is set to 10000.
    • AlertPollCycleTime : The time period for polling the SCOM Connector to fetch alerts from SCOM. By default, it is set to 45 seconds.
    • IsActiveEventPolling : If set to "true", the SCOM connector will fetch events. If set to "false", the connector will not fetch events. By default, it is set to false.
    • EventPollCycleTime : The time period for polling the SCOM connector to fetch events from SCOM. By default, it is set to 45 seconds.

    • AmountOfTimeouts : The number of retry attempts is entered here. The default value is 5.

    • LowerTimeoutBound : The LowerTimeoutBound , UpperTimeoutBound , and AmountOfTimeouts collectively decide the time duration after which a retry is attempted. The default value is 10 seconds.

    • UpperTimeoutBound : The UpperTimeoutBound time is entered here. The default value is 360 seconds.

    • Connector Name : The name of the connector.

    • ConnectorDescription : The description of the connector.

    • ConnectorDisplayName : The display name of the connector.

    • MaxPollRetryAttempt : The number of retry attempts in case the SCOM server fails to send the data to the SCOM Connector. This scenario occurs if SCOM Server has to send a large amount of data, and it fails to send data.

    • WinAuthOverrid : To enable Windows authentication for accessing the SCOM Server. If set to "true", then windows authentication will not be used for accessing SCOM. The override can be used if SCOM and SCOM Connector are located on the same machine. By default, it is set to "false".
    • AuthTokenRequired : Set to true, if auth token is also to be configured in SSL.

    • AuthTokenCode : Enter the auth token for SSL communication.

    Note

    The fields IsRunning , IsMaster , and IsActiveAlertPolling are only for informational purpose and should not be changed by the user.

    Note

    The field SCOMConnectorRestUrl is saved here from the entries made during installation and should not be changed.

    Note

    The SCOM Connector does not fetch the events from the SCOM Server. To start fetching events, set the field IsActiveEventPolling to true.

Note

Before making any changes in the SCOMConnectorConfig.json file, stop the SCOM Connector service. After saving the changes start the service again.

Note

While restarting the SCOM connector, always make sure that it has stopped completely before starting the SCOM Connector again. There should be a gap of 3-4 minutes before starting the connector.

Note

The last poll time on which the SCOM Connector polled the SCOM Server is stored in the config file SCOMLastPollTime.json , located in the Configs folder of the SCOMConnectorInstalle r folder. The SCOM Connector after a communication failure resumes fetching events from the last poll time saved here.

SCOM Connector Logging

The user can configure the SCOM Connector logging according to their requirements. The configurations are done in the SCOMConnector.exe.config file. An example of the configuration file is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <log4net>
    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="C:\Logs\ConnectorHA.log" />
      <appendToFile value="true" />
      <rollingStyle value="Size"/>
      <datePattern value=".yyyy-MM-dd-hh_mm_ss"/>
      <maxSizeRollBackups value="5" />
      <maximumFileSize value="10MB"/>
      <staticLogFileName value="false" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %level %logger - %message%newline" />
      </layout>
      <filter type="log4net.Filter.LevelRangeFilter">
        <levelMin value="INFO" />
        <levelMax value="FATAL" />
      </filter>
    </appender>
    <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %level %logger - %message%newline" />
      </layout>
      <filter type="log4net.Filter.LevelRangeFilter">
        <levelMin value="INFO" />
        <levelMax value="FATAL" />
      </filter>
    </appender>
    <logger name="FileLogger">
      <level value="ALL" />
      <appender-ref ref="RollingFileAppender" />
      <appender-ref ref="EventLogAppender" />
    </logger>
  </log4net>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
</configuration>

The following configurations can be made in the SCOMConnector.exe.config file:

  • Logging type : The file logging and event logging are by default enabled. The file logging setting is in the <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> section while the event logging section is in the <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >.

  • Logging level : The log level of the SCOM can be changed in the <filter> section of the file logging as well as event logging. In this section navigate to <filter type="log4net.Filter.LevelRangeFilter"> and within its tags, change the <levelMin value= ""/> and the <levelMax ""value=/> . The values entered here include messages from all the log levels, from the defined min level to the defined max level. For example, If "DEBUG" is entered in <levelMin value= ""/> and "FATAL" in <levelMax ""value=/> , then the messages of the log levels from DEBUG , INFO , WARN , ERROR and FATAL will be logged in the log file. The following log levels from max level to min level are as follows:

    • OFF
    • FATAL
    • ERROR
    • WARN
    • INFO
    • DEBUG
    • ALL

    Note

    If OFF is entered in <levelMin value= ""/> then no log messages will be added to log, and if ALL is entered in <levelMin value= ""/> then the messages from all the log levels are included in the log.

  • Logging path : The path where the log will be generated for the file logger can be changed in the file value field of the <log4net> section, e.g. <file value="C:\Logs\SCOMConnector.log" />.

    Note

    Only the logging level and the logging path can be changed in this file.

    Note

    By default, only the log levels from INFO to FATAL are included in logs. If the DEBUG level is to be included, then change accordingly as described above.

Note

Before making any changes in the SCOMConnector.exe.config file, stop the SCOM Connector service. After saving the changes, start the service again.

Note

While restarting the SCOM connector, always make sure that it has stopped completely before starting the SCOM Connector again. There should be a gap of 3-4 minutes before starting the connector.

Uninstalling the SCOM Connector

To uninstall the SCOM Connector:

  1. Click the Windows button, and then search for uninstall SCOM connector.
  2. Click Uninstall SCOM Connector.

  3. Click Yes to uninstall the connector, else click No .



Note

Alternatively, the user can also uninstall the Connector from Windows Programs and Features in Control Panel . Uninstall the program ScomConnectorInstaller.

Note

The Uninstall SCOM Connector can also be accessed from the shortcut present on the desktop.

Hosting the Status Page on IIS

The status page provides information of the up and down status of the SCOM Connector, SCOM Server, and the SCOM LAM. To host the status page on IIS (Internet Information Services) proceed as follows:

  1. Navigate to the ScomConnectorInstaller > WebUI folder.

    Note

    ScomConnectorInstaller is the same folder that was unzipped and copied to the machine for installing the SCOM connector.

  2. Open the Index.html file in notepad.
  3. Replace the port "8085" present in the file with the port given in the Connector URL field of the installer GUI. Refer the above Installing the SCOM Connector section in this guide.

    Note

    This is the port of the REST server which is installed on the machine by the Connector installer.

  4. Click the Windows Start button and then select the Administrative Tools.


  5. Double click the Internet Information Services (IIS) Manager . The Internet Information Services (IIS) Manager view will appear as shown below:



  6. Navigate to Default Web Site in the Connection section, then open the context menu and select Add Virtual Directory . The Add Virtual Directory dialog will appear as shown below:



  7. Enter an alias e.g. Connector-status in the Alias field, then browse and select the WebUI folder. The WebUI folder is present in the ScomConnectorInstaller folder in the Physical path field. After selecting the path, append "\" at the end of the path.



  8. Click the Browse *:80(http) to open the status page.

The status page is hosted on the Internet Information Services (IIS) Manager.

Viewing the status of SCOM Server, SCOM Connector, and SCOM LAM

The status page provides the following information:

  • The number of alerts processed and sent to Moogsoft AIOps by the SCOM Connector in a session is shown in the Total Alerts Processed field.
  • The number of events processed and sent to Moogsoft AIOps by the SCOM Connector in a session is shown in the field Total Events Processed field.
  • The status of the connected Moogsoft AIOps SCOM LAM is shown in the MOOG Server Status section.
  • The status of the SCOM Servers connected with the SCOM Connector is shown in the SCOM Server Status section.


Note

The user can open this page by entering http://localhost/ alias name> in a browser on the machine where the SCOM Connector is installed. In the above screenshot, the alias name for the status page is test5 , therefore, the URL used is http://localhost/test5 .

Note

The user can open the status page in the same domain as SCOM server and connector, with administrative privileges.

Note

The user can open the status page only on the machine on which it was hosted.

MOOBOT Configuration

The MOOBOT sends update about the status change in alerts/events to the SCOM Connector. The SCOM Connector then updates the changes to alerts/events on SCOM Server.

The MOOBOT is configured as follows:

  1. Uncomment the AlertMgr section in the Moog_farmd.conf file in the /usr/share/moogsoft/config directory.

                        {
                             name                 : "AlertMgr",
                             classname            : "CEmptyMoolet",
                             run_on_startup       : true,
                             persist_state        : false,
                             metric_path_moolet   : false,
                             moobot               : "AlertMgr.js",
                            
                             Listens for alerts events (on the /alerts
                             topics).
                            
                             event_handlers    : [
                                                    "AlertClose",
                                                    "AlertUpdate",
                                                    "Alert"
                                                 ]
                        }
  2. Update the function updateAlert in the MOOBOT AlertMgr.js in the directory /usr/share/moogsoft/bots/moobots according to the example mentioned below:

    function updateAlert(alert)
    {
        //
        // Post change to remote service
        //
        var alertId = alert.value("signature");
        var customInfo = alert.getCustomInfo();
        var alrt_status = alert.value("state");
        var sql = "select name from status where status_id='"+alrt_status+"'"; 
        var entities = moogdb.query(sql); 
        while(entities && entities.hasNext())
         {
            var entity = entities.next();
            var name = entity.value('name');
         } 
        if (customInfo !== null)
         {
            var remoteId = customInfo.remoteId;
            if (remoteId !== null)
            {
                var info =
                {
                    id: alertId,
                    externalId:alert.value("external_id"),
                    description:alert.value("description"),
                    detail: name
                };
    
                var response = rest.sendPost("http://10.142.24.20:8085/event_post/", JSON.stringify(info));
                var text =  JSON.stringify(response);
                var obj = JSON.parse(text);          
            }
        }
        alert.set("description", "New description here");
        alert.set("severity", "3");
        alert.set("manager", "New manager here");
    
        var result=moogdb.updateAlert(alert);
    
        if (result === false)
        {
            logger.warning("Alert ID: " + alert.value("alert_id") + " update attempt was not successful");
        }
    }

    Note

    The IP address mentioned in the AlertMgr.js file has to be changed to the IP Address of the REST Server of SCOM connector.

    Enter the SCOM Connector address in the line var response = rest.sendPost(" http://10.142.24.20:8085/event_post/ ", JSON.stringify(info));.

    The above MOOBOT configuration is for SCOM Connector,  the line var response = rest.sendPost(" http://10.142.24.20:8085/event_post/ ", JSON.stringify(info)); sends the update to the SCOM Connector.

SSL Configuration

To configure SSL, following configurations are required:

  1. Create a new folder. Open command prompt and navigate to the newly created folder.

  2. Run the following command in the command prompt. A Server certificate and a server.key file is generated in the above created folder.

    openssl req -new -x509 -days 365 -nodes -subj "/C=''/ST=''/L=''/O='moogsoft'/OU=''/CN=localhost" -out server.crt -keyout server.key > /dev/null 2>&1
    

    Note

    In the above command, for the part /CN=localhost, instead of localhost, enter the hostname of the machine where the SCOM LAM is running.

    Note

    Copy the generated certificates on the machine where the SCOM LAM is running.

  3. Enter the following parameters in the monitor section of the SCOM LAM:
    • Enter the port on which the SSL communication will be done in the field port, e.g. 48002.
    • Set the field use_ssl to true.
    • Enter the path of the directory where the Server certificate is copied, in the path_to_ssl_files, e.g.  "../config".
    • Enter the name of the Server certificate in the field ssl_key_filename, e.g. "server.key".
    • Enter the name of the Server certificate in the ssl_cert_filename, e.g. "server.crt".
    • Set the field use_client_certificates to false.
    • Select TLSv1.2 in ssl_protocols.

The SSL is configured for SCOM.

Upgrading the SCOM Connector

To upgrade the SCOM Connector proceed as follows:

  1. Take the backup of the following SCOM configuration files:
    • SCOMConnectorConfig.json file located at C:\Program Files (x86)\SCOMConnectorInstaller.
    • SCOMConnector.exe.config file located at C:\Program Files (x86)\SCOMConnectorInstaller.

  2. Uninstall the existing connector using the Uninstall SCOM Connector uninstaller. Alternatively, The user can also uninstall the Connector from Windows Programs and Features in Control Panel . Uninstall the program ScomConnectorInstaller .
  3. Install the connector using the installer from the newly delivered connector installer folder.
  4. Host the status page from the newly delivered connector installer folder.
  5. Edit the newly created configuration file, if any configuration changes are to be made. The user can refer the backed up configuration file for any previous configuration that is to be made in the new configuration file.

    Note

    Do not replace the newly created configuration file with the backed up configuration file.

The SCOM Connector is upgraded.

Version Information

Connector Version

Tool Version

Tested?

Expected to Work

1.0

SCOM 2012 & SCOM 2016

Yes

Yes

2.0 SCOM 2012 & SCOM 2016 Yes Yes
2.1 SCOM 2012 & SCOM 2016 Yes Yes
2.2 SCOM 2012 & SCOM 2016 Yes Yes
3.0 SCOM 2012 & SCOM 2016 Yes Yes
3.1 SCOM 2012 & SCOM 2016 Yes Yes
3.2 SCOM 2012 & SCOM 2016 Yes Yes
3.3 SCOM 2012 & SCOM 2016 Yes Yes
4.0 SCOM 2012 & SCOM 2016 Yes Yes

New Features in SCOM Connector (Basic) v4.0

  • Enhanced User Interface to provide URL/FQDN for Moog Server (e.g.: https://example.moogsoft.io/scom )

  • Enhanced User Interface to specify ssl certificate per moog server.

  • Option to bypass ssl certificate authentication in https mode.

New Features in SCOM Connector (Basic) v3.3

  • All the implementations will now get signed by using a Moogsoft Certificate.
  • An auth token support bug has been fixed.

New Features in SCOM Connector (Basic) v3.2

  • Timezone issue in which the SCOM does not receive alerts for timezones having time greater than UTC time is fixed.

New Features in SCOM Connector (Basic) v3.1

  • Bi-Directional flow issue with the SCOM Connector is fixed.

New Features in SCOM Connector (Basic) v3.0

  • New UI for SCOM (Basic)
  • HA now supported in SCOM (Advanced)

New Features in SCOM Connector (Basic) v2.2

  • Automatic Service Restart of the SCOM Connector service
  • Separate config file to save the last poll time stamp. The name of this config file is SCOMLastPollTime.json

New Features in SCOM Connector(Basic) v2.1

  • SCOM Connector supports communication through proxy with SCOM LAM.
  • New uninstaller for the SCOM Connector.
  • Windows Event Logging is now supported by the SCOM Connector.
  • During installation the user can select to stop SCOM Connector from starting automatically after installation.
  • Alert Storm Threshold can be entered during installation.
  • Configurations entered during installation can be edited from the GUI.
  • Support for Multiple Moog.
  • Alert sent to Moog if any of the added SCOM Server goes down.
  • Alert is sent to other Moogs if one of the Moog in a Multi Moog setup goes down.