FixOrionVolume.ps1

Script: FixOrionVol.ps1

Author: Ben Scherer

Description:  This script will fix monitoring of volumes that are reporting down in orion due to being formatted, having label changed,etc..

Resources:

    http://vwiki.co.uk/SNMP_and_PowerShell

    http://sharpsnmplib.codeplex.com/releases/view/78947

    https://thwack.solarwinds.com/community/labs_tht/orion-sdk

3/28/2016 - Updated regex

3/28/2016 - added debug

FixOrionVolume.ps1
Parents
  • Ahh, OK, running it as an Alert Action, got it.  That makes sense.  I will probably add to it to loop through all of the nodes and volumes that it pulls back so that I can run it as a scheduled task.  The problem I found with using alerts to make updates like this is that it adds a bunch of events and alert history entries to those respective tables.  In small to medium sized environments that wouldn't be a big deal, but our environment is pretty large and it adds a ton of bulk to those tables.  I had alerts that were updating a couple of custom properties for us every hour and after just a couple of weeks we had several million event AlertObjects and hundreds of thousands of AlertHistory and Events table entries which was slowing down any resources, reports, alerts, etc. that queried that table.  I converted all of it to Powershell scripts that run as scheduled tasks and deleted all of those entries from the SQL tables and that fixed a lot of slow down we had been experiencing due to the sudden table size growth.

    I just got an idea for a Feature Request after writing this.  Assuming it hasn't been suggested already, they should setup an Admin Jobs console (kind of like the NCM Jobs console) where you can run different automated tasks like updating custom properties or running SDK scripts like yours.  I'm sure there are other things I'm not thinking of as well that could be done.

    Anyways, thanks again for your help, this is a truly great script that I really wanted but was never sure how to create.

Reply
  • Ahh, OK, running it as an Alert Action, got it.  That makes sense.  I will probably add to it to loop through all of the nodes and volumes that it pulls back so that I can run it as a scheduled task.  The problem I found with using alerts to make updates like this is that it adds a bunch of events and alert history entries to those respective tables.  In small to medium sized environments that wouldn't be a big deal, but our environment is pretty large and it adds a ton of bulk to those tables.  I had alerts that were updating a couple of custom properties for us every hour and after just a couple of weeks we had several million event AlertObjects and hundreds of thousands of AlertHistory and Events table entries which was slowing down any resources, reports, alerts, etc. that queried that table.  I converted all of it to Powershell scripts that run as scheduled tasks and deleted all of those entries from the SQL tables and that fixed a lot of slow down we had been experiencing due to the sudden table size growth.

    I just got an idea for a Feature Request after writing this.  Assuming it hasn't been suggested already, they should setup an Admin Jobs console (kind of like the NCM Jobs console) where you can run different automated tasks like updating custom properties or running SDK scripts like yours.  I'm sure there are other things I'm not thinking of as well that could be done.

    Anyways, thanks again for your help, this is a truly great script that I really wanted but was never sure how to create.

Children
No Data