I need an assistance regarding the alarm enrichment issue which I am facing currently. Actually I am trying to pass 2 variable as arguments in a single policy so that I can set it to 2 custom user attributes. However it looks like for single variable it works fine. For the 2nd one it is not printing the value instead it is appended with attrribute1. Please find the below screen shot and script for your reference.
A "Veritas Backup Failure" event has occurred, from Host_systemEDGE device, named MNDCEMSTND15.uidai.com.
clientserver1=WScript.Arguments(0)segments=Split(clientserver1," ")pstr=segments(0)client=Replace(pstr, " ", "")WScript.Echo "clientserver,",client
errorcode1=WScript.Arguments(1)segments1=Split(errorcode1," ")pstr1=segments1(0)error=Replace(pstr1, " ", "")WScript.Echo "errorcode,",error
Can you run the VB Script manually by passing the message and see if you are able to print both Variable 1 & Variable 2?
Or, you may update the VB Script to write the output into .log file and see if the script is working
1. The below VB code says, you are returning “errorcode” but isn’t “errorcode1” that you should return?
error=Replace(pstr1, " ", "")
1. Print this output into a .log file to see the return value
Yes, I can print both value. errorcode is mentioned custom attribute 10. Please see the previous screen shot in the post.
Md Mukul Hasan | UIDAI EMS Team
HCL Infotech Limited
Email: email@example.com<mailto:firstname.lastname@example.org> | email@example.com
If you are sure that the vb script runs from command line and printing expected value, then try with below syntax as the script expecting paired values, it should be in below format
Note: Variable retval1 gets “India”
Variable retval2 gets “USA”
Thanks Brahma. In that case nothing is printing. Please see the last print output.
Can you try with this…
No luck sirji. Let me open a case and will work on it tomorrow over webex.
Support Case raised: 01153639
The output has to be a paired list, separated by comma.
Thus, the (single) ECHO command in the script should be:
Per your example, the output of that line would be:
Remove the two single output lines from your script, e.g.