Forum Discussion
What Mike and Stuart stated, all of the above is true. Sad but true. However....what caught my attention -
is it possible to pass the error message from a variable into the alarm message...in the same way that tokens work.
And the answer is unequivocally yes! We do it all the time here. Now, it takes little of bit elbow grease but it works great.
And it is all based on the fact you can use ##<DEVICEPROPERTYNAME>## as one of the DataSource Tokens in your alert message. Yeap, it is stated so right there on Tokens Available in LogicModule Alert Messages support website. So then, why not craft your own custom Device Property name that you can pass to the alert message?
In your DataSource you define a customized Alert message for one of the DataPoints and you can pass the value of your device property (ie token) into the Subject and/or Description. Like this;
Subject:
##LEVEL## - ##HOST## ##DATASOURCE## ##DATAPOINT## ##VALUE##
Description:
This alert will be raised when the reported value of Autoclient State is other than STARTED (value 1). See command output below for detailed description of error.
Possible State values;
1=STARTED <-- all good
0=STOPPED <-- alert raised
AutoClient command output:
##MB.SWIFT.AUTOCLIENT.SUMMARY##
Host: ##HOST##
Datasource: ##DATASOURCE##
Datapoint: ##DATAPOINT##
Level: ##LEVEL##
Start: ##START##
Duration: ##DURATION##
Value: ##VALUE##
ClearValue: ##CLEARVALUE##
Reason: ##DATAPOINT## ##THRESHOLD##
Notice I use ##MB.SWIFT.AUTOCLIENT.SUMMARY## custom token that I manipulate in my DataSource to update its value with free text. The trick is - you need to update this property BEFORE you output whatever DPs you are collecting in your DataSource.
And how do you do that? Use LM API and /device/devices/{device_id}/properties/{prop_name} endpoint.
Maybe little bit kludgy but again, once you figure out the syntax and workflow in your script it works remarkably well.
That's true. Which only goes to show how little effort it would take for logic monitor to actually implement this.
I still say it's not really doable. Possible, but not doable. You could do it for one, but there are quite a few that I would need it on. Building that into 30 plus data sources would be a real pain. Not to mention maintenance.
Related Content
- 8 months ago
- 6 months ago
- 2 years ago
- 2 months agoAnonymous