question

TSchneider-3686 avatar image
0 Votes"
TSchneider-3686 asked ·

Store value collected by performance collection for monitor to pick up, i.e. share results between perf collection and monitor

Hi all,

I was tasked by our Linux admins to create a performance collection to see how many nodes in a system are busy at a time. The script for that uses vmstat and lscpu and takes some time to run. The script is executed every five minutes and the results are returned ok and can be displayed as graph in SCOM.
Now they want to get alerted when a certain threshold is reached. I could create a monitor for that using the very same script. I was wondering if there is a smarter way of doing that by temporarily storing the number the performance collection script has already gathered so that the monitor could pick that up. That would reduce the load on the system to collect the data. One way would be to store it somewhere in the filesystem. Not sure, if that is a good approach though.
How does the other monitors and performance collections like cpu and disk space, do that ?

Thanks in advance
Thorsten

msc-operations-manager-authoring
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CyrilAzoulay avatar image
0 Votes"
CyrilAzoulay answered ·

What you're looking for is implementing Cookdown : basically, when multiple rules or monitors use the same datasource and run at the same time (so with same interval and sync time) and with the same config (ie. parameters are identic), the datasource only run once.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TSchneider-3686 avatar image
0 Votes"
TSchneider-3686 answered ·

ok, I wasn't aware that Cookdown is gonna work across monitors and rules. Thanks for pointing me in that direction, I'll give that a try

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yep, it works both for providing data to multiple instances of the same monitor/rule and for providing data to multiple, distinct monitors/rules... its simply a matter of properly configuring the Filter ConditionDetections you use in the rest of the workflows :)
Very useful for example when you are monitoring something through a REST API : you can use one single properly designed datasource to fetch all data in a single pass and then create as many discoveries/monitors/rules that will consume data from that datasource !


However, note that this will query the data once but store it multiple times in the database/datawarehouse. As far as I know you can't store the data only once.

0 Votes 0 ·