Hello,
I have been trying to add additional items in the same Low level discovery trigger. The twist is that i dont need the items for the trigger, but want to include it in the operational data field for "more informasjon" about the problem itself.
I can start by showing a little (I will censor some info). BTW i use modbus, but the idea is the same. This is the items in the discovery:

after that i would like to add it to a trigger and the expression itself just include the error_code if it hit a int that is predefined in the relevant document, ERROR_NUMBER and PRIORITY is just additional data i want to give to operational field without impact of problem expression.
This is the first thing i tried for in operational data field.
This didnt work, just outputet the whole code itself to the alarm system.
After trying many different i just simply added this to the problem expression:
and did this in the operational data
This worked OK, but not good practice.
If you read this i think the point is clear, just want to add additional latest data in the same Low level disocvery to the trigger in operational data field, and not iclude it in the problem expression. Just want to know good practice to do this.
Thank you for reading
I have been trying to add additional items in the same Low level discovery trigger. The twist is that i dont need the items for the trigger, but want to include it in the operational data field for "more informasjon" about the problem itself.
I can start by showing a little (I will censor some info). BTW i use modbus, but the idea is the same. This is the items in the discovery:
after that i would like to add it to a trigger and the expression itself just include the error_code if it hit a int that is predefined in the relevant document, ERROR_NUMBER and PRIORITY is just additional data i want to give to operational field without impact of problem expression.
This is the first thing i tried for in operational data field.
Code:
Error_code: {?last(/xxx Modbus/modbus.get[MB1,,3,{#ERROR_CODE},1,int16,be,0])}
Error_number: {?last(/xxx Modbus/modbus.get[MB1,,3,{#ERROR_NUMBER},1,int16,be,0])}
Priority: {?last(/xxx Modbus/modbus.get[MB1,,3,{#PRIORITY},1,int16,be,0])}
After trying many different i just simply added this to the problem expression:
Code:
min(/xxx Modbus/modbus.get[MB1,,3,{#ERROR_CODE},1,int16,be,0],#100)=zz and
last(/xxx Modbus/modbus.get[MB1,,3,{#ERROR_CODE},1,int16,be,0])=yy and
last(/xxx Modbus /modbus.get[MB1,,3,{#ERROR_NUMBER},1,int16,be,0])>0 and
last(/xxx Modbus/modbus.get[MB1,,3,{#PRIORITY},1,int16,be,0])>0
Code:
error_code: {ITEM.LASTVALUE2} error_number: {ITEM.LASTVALUE3} prrity: {ITEM.LASTVALUE4}
If you read this i think the point is clear, just want to add additional latest data in the same Low level disocvery to the trigger in operational data field, and not iclude it in the problem expression. Just want to know good practice to do this.
Thank you for reading
Comment