Hi,
I need to parse data from a SNMP Get.
This is the result:
MFG:HP;MDL:Officejet Pro 8500 A909g;CMD:MLC,PCL,PML,DWPCL,DESKJET,DYN;1284.4DL:4d,4e,1;CLS:PRINTER;DES:CB023A;SN:CN06F7R25P;
In this case, I need the model and serial number (in bold)
Can this be done?
parse SNMP results
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You may use "Tune up Reply value" option, located on Test properties dialog.
This option allow you to modify test reply.
In your case, you may use the following expression:
[substr('%SuggestedReply%',indexof('%SuggestedReply%','MDL:')+4, indexof('%SuggestedReply%',';CMD:')-indexof('%SuggestedReply%','MDL')-4)] [substr('%SuggestedReply%',indexof('%SuggestedReply%',';SN:')+1, 100)]
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... uneupreply
This option allow you to modify test reply.
In your case, you may use the following expression:
[substr('%SuggestedReply%',indexof('%SuggestedReply%','MDL:')+4, indexof('%SuggestedReply%',';CMD:')-indexof('%SuggestedReply%','MDL')-4)] [substr('%SuggestedReply%',indexof('%SuggestedReply%',';SN:')+1, 100)]
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... uneupreply
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: