SCOM 2012 To Nagios Connector

**DEVELOPMENT OF THIS PLUGIN HAS CEASED AS OF 14/6/2014, IF YOU WOULD LIKE TO TAKE OVER THIS PROJECT PLEASE SEE THE CONTACT US PAGE**

Description:

A complex script for forwarding SCOM 2012 alerts to Nagios.

Download:

https://github.com/jsmroshamboot/STTNC/archive/master.zip

Known Issues:

  • Powershell v3 currently has a limit of 2MB on JSON data imports, which means if you have a huge amount of alerts on a daily basis flowing through to Nagios then the script will stop working until you purge the tracking file. There is a Microsoft work around for this problem but I wasn’t able to get it to work properly…

Patch Notes:

v0.4:

  • INI file now supports config file names with spaces.

v0.3:

  • Complete re-write of the tracking file code.

  • Tracking file format has changed.

  • *NEW* Experimental scombag.config.special.drop command

  • Complete re-write of the logic processing engine.

  • Slight changes to the map file format.

  • *NEW* Logic debugging mode.

v0.1:

  • First release

Usage:

A README FILE IS INCLUDED IN THE ZIP FILE. READ IT CAREFULLY.

Below are the installation instructions and usage:-

=========================================

Installation

=========================================

  1. Extract the contents of this zip file to a directory on your SCOM 2012 server.

  2. Open Windows task scheduler (Run taskschd.msc in a powershell command prompt).

  3. Select the “Task scheduler library” heading and then select “Create Task…” from the right hand menu.

  4. Give it a meaningful name (i.e. SCOM To Nagios).

  5. Click the “Change User or Group…” button and select a user with at least full read access to SCOM.

  6. Select the “Run whether user is logged on or not” radio box.

  7. Change to the “Triggers” tab and click the “New…” button.

  8. Set the following options and click OK:

  • Begin the task: On a schedule

  • Daily radio box selected

  • Recur every 1 days

  • Repeat task every 10 minutes for duration of 1 day

  • Stop task if it runs longer than 10 minutes.

  • Enabled

  1. Change to the “Actions” tab and click the “New…” button.

  2. Set the following options and click OK:

  • Action: Start a program

  • Program/Script: powershell

  • Add arguments (optional): -file “C:pathtoscriptdirectoryscombag.ps1”

  1. Click OK to save the new scheduled task.

*NOTE* For those with multiple SCOM 2012 servers, the script will ONLY execute on the server with the RMS Emulator role to prevent it executing on

multiple SCOM servers simultaneously.

=========================================

Upgrading

=========================================

  1. Replace the scombag.ps1 file and the scombag_map.ini file. Version 0.1 configuration is not compatible with version 0.3.

=========================================

Usage

=========================================

./scombag.ps1 [-validate_map] [-enable_tracingĀ [-trace_guid ]] [-logic_debugging]

-help

Display this help text.

-validate_map

Validate the JSON in the map configuration.

-enable_tracing

Execute the script and output information without actually committing anything to Nagios.

-trace_guid

Run the trace on a specific SCOM alert Id.

-logic_debugging

Enable debugging of the pattern matching logic.