parse SNMP results

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Kris
Posts: 375
Joined: Wed May 12, 2010 3:22 am

parse SNMP results

Post by Kris »

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?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

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
Kris
Posts: 375
Joined: Wed May 12, 2010 3:22 am

Post by Kris »

Brilliant! Works a treat....

Thanks!
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome!
Post Reply