For example we have a reply from the test script "2 unprocessed messages in my_queue_table" which will trigger an alert action sending an mail using the %Reply% in the body.
The end of the current VB script which will pass the %status% and %reply% back to Hostmonitor:
Code: Select all
WScript.StdOut.Write statusBad 'const statusBad = "scriptRes:Bad:"
WScript.StdOut.Write replyText 'variable replyText filled from query result in first part of the script
But only %status% and %reply% can be used.
For example, I'm looking at some kind of this output with record details in the mail fetched by the query in the VB script:
I was trying to use WScript.StdOut.WriteLine instead of Write. But only 1 line will be passed back to HM.2 unprocessed messages in my_queue_table:
#1 11:09:53 Sender1 Destionation22 MsgTypeXYZ
#2 11:10:16 Sender2 Destionation33 MsgTypeABC
I thought another option was to use <BR> into the replyText. But this will result in unreadable / dirty reply values in HM it selves (with a whole list of 'lines'). And also the <BR> will be encoded as <br> into the mail body and shown as <BR> in the text instead of give a linefeed
I'm looking into a solution to pass more details into the alert email like an extra variable which could be set. For example set a variable like %ReplyFullDetails% with all the details build up in the script containing CR's. And then be used this %ReplyFullDetails% in the mail template. But as far I know you can not set any other variable (or misuse an existing one) in a test script.
Any suggestions?