Forum Discussion

Fursel's avatar
Fursel
Copper Contributor
Mar 12, 2025

SCOM Linux Parameter for Expression/Alert Description

Hi,

I would like to know if there is a way to get more information from //*[local-name()="StdOut"] parameter. I know that it can be used in this way in Expression and $Data/Context///*[local-name()="StdOut"]$ in Alert. But I would like to forward little bit more info into Alert and Expression itself. 

For example got script which returns two values Uptime and LastBoot. And I would like to build the Expression based on Uptime and provide LastBoot into Alert description. 

I wonder if this is even possible in SCOM.

Script itself :

#!/bin/bash # Get uptime in seconds uptime_seconds=$(cat /proc/uptime | cut -d'.' -f1) # Get last boot time last_boot=$(who -b | awk '{print $3, $4}') # Output in the required format echo "Uptime : $uptime_seconds" echo "LastBoot : $last_boot"

So I tried with 

//*[local-name()="StdOut"][contains(., "last_boot")]/text() $Data/Context///*[local-name()="StdOut"][contains(., "last_boot")]/text()$

 But it doesn't work. Please support.

No RepliesBe the first to reply

Resources