SCOM Regular Expressions

Need help on following using Regular expressions (Regex):

  • Scan the antivirus log file for the timestamp. Do date -1 or check if timestamp is old and generate an alert.
  • Build a logic to find % Memory utilization
  • Build a logic to find % Bandwidth utilization
February 14th, 2015 9:04am

Hi,

Thanks for your posting!

It seems like that you are tring to monitor whether the antivirus log is updated for a specific time, this may need to create a script based monitor to check the log file's lastwritetime.

There is a powershell command named get-childitem which can get the lastwritetime of a file:

$date=(get-date).addhours(-1)

$lastwritetime=(Get-Item d:\test\antivirus.log).LastWriteTime

if($date -gt $lastwritetime)

{

code to set the state to error

}

For more how to creat powershell script based monitor, please check the link below:

https://technet.microsoft.com/en-us/video/how-do-i-create-a-rule-and-monitor-using-a-windows-powershell-script-in-a-system-center-operations-manager-management-pack.aspx

  • Build a logic to find % Memory utilization
  • Build a logic to find % Bandwidth utilization

As far as I know, there are built-in performance collection rules in Windows operating system management packs, when we run performance report under Microsoft generic report library, you can add those rules by searching using key words.

Regards,

Yan Li 

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 3:45am

Hi Yan,

Thanks for your revert.

I could able to achieve the antivirus update from powershell.

However for calculated items the percent memory used is a collection rule and not able to generate alert from the same.

Also need to do calculations for similar scenarios e.g. %Used disk space = 100 - %free space and generate alert.

Is there a way to get the live performance counter value in order to do the mathematical operations on them and generate required alerts?

February 20th, 2015 4:42pm

Hi,

We may first create a custom performance rule that will collect the performance counter on every server. Then create a monitor, which will alert when the performance exceeds the specified threshold.

I would like to suggest you go through the below article:

https://sites.google.com/site/scomblogs/journal-blog/processperformancemonitoringinscom

Regards,

Yan Li

Free Windows Admin Tool Kit Click here and download it now
February 22nd, 2015 9:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics