![]() |
![]() |
|
Newsletter | Forum | Contact Us | News | Products | Downloads | Support | Partners |
|
|
Using SNMP virtual object and LUA scripting for NEWTEC device exploitationNewtec is a hardware and software designer of satcom solution. The Professional Equipment business line offers off -the-shelf equipment for broadcasters, network operators and service providers. Newtec’s Broadband Systems offer high-speed 2-way satellite connectivity to large numbers of remote sites. The following document explains How To use the advanced feature of the LoriotPro Extended Edition for collecting statistics and status information from Newtec Devices by using SNMP and the virtual SNMP object concept of LoriotPro. The concept of SNMP virtual object in LoriotPro allows the LoriotPro SNMP Manager to query SNMP objects that are not real and existing SNMP object in a device. Instead the objects are script files written with the LUA language. The script perform any kind of tasks but it is use to make one or multiple SNMP request that are real this time. The Newtec device SNMP functionalities and the associated MIB provide a rich set of information on the device working status and statistics. One of the MIB table used in this example provide for one of its indexed SNMP objet (ntcdevsmod01dmmodcodstatstruct) a full set of information returned as a string. The string is a set a value separated with coma.
A request to a NewTec device for this table is given below:
The string return by the ntcdevsmod01dmmodcodstatstruct object should be decoded Example : 21,1,0,3089,0,1,10.08,1,10.98,1,29.76
To be able to exploit this value and check threshold or use it in graphs it is necessary to get the full value and to extract one by one the interesting information. This is where LUA scripting and SNMP virtual object are very useful. The steps to performs to solve this problems consists of : · Creating a MIB file with all necessary virtual objects. · Creating for each virtual object a corresponding script file.
Lua script files are defined for each SNMP virtual object. The script name is exactly the same as the object name in the MIB file (next in the document).
The Script files are defined first. They can and should be tested before using it through virtual object. Use the Script Editor Development environment of LoriotPro for developing and testing
To test the script you should specify a valid Newtec IP address in the lp_host field and a valid index in the lp_index filed of the development environment.
The index value should be the one displayed in the ntcdevsmod01dmmodcodstatstruct table. The index is composed of three values (exemple .1.1.3 line 3 in the table)
The device should be in the directory and should be in green status else the script will not return values. When done press the F5 key or select the Compiler menu option and the Run Script option. Example of trace.
When all the scripts are defined and tested, you can start to write the MIB file The MIB file is created with a simple text editor. The MIB contains the IMPORT of the Father MIB containing the father object ntcMIB. Anther object is created as a container of all the virtual snmp object that we create (NewTecLPScripts). The ACCESS keyword must contain the reserved value lp_acccess_script. With this keyword LoriotPro will try to find a lua script file to execute with the same object name. Variable name and oid number are in green for a better understanding of the structure.
When the MIB is finished it is necessary to compile it and the other required MIB file required for the project.
Quit the compiler, but do a Database->Save To Startup Database in the main menu of the Compiler
When done you should ckeck that all the entries are present in the MIB tree. To find the entry of Newtec object open the search Tool Bar and type
The object below can be used in LoriotPro in other module now. ntcDevsMod01DmModCodStatStructBasebandFramesCount ntcDevsMod01DmModCodStatStructUncorrectableBasebandFrames ntcDevsMod01DmModCodStatStructChannelQualityEstimation ntcDevsMod01DmModCodStatStructCDEstimation ntcDevsMod01DmModCodStatStructLinkMarginEstimation
We will use them to do a linear graph Select the device in the directory and do an Insert Task Linear Graph. Enter the ntcDevsMod01DmModCodStatStructChannelQualityEstimation and add the required index (.1.1.1 and .1.1.2 in the example below) Select gauge in the graph type
Can also be used the virtual object in an Active View A matrix of vu-meter is used to display the first 3 index of in the table.
For each Vu-meter the properties are define as defined below (Vu-meter object Channel Quality .1.1.1)
The background of the vu-meter color is defined by comparing the returned value to a threshold. The same threshold can be use to trigger an Event to LoriotPro event receiver.
Using
script in the RRD collector graph solution
The
script defined before can also be used in the RRD Collector.
They
should be slightly modified and place in the directory
/bin/config/script/RRDscript
The
modification consist of the two lines below that should be added at the
beginning of the script
--<SCRIPT_NAME>Channel Quality Estimation</SCRIPT_NAME> --<SCRIPT_DESCRIPTION>NewTec
Demodulator Channel Quality Estimation</SCRIPT_DESCRIPTION>
This
lines are for the ntcDevsMod01DmModCodStatStructChannelQualityEstimation.lua script
In the RRD collector we use the LUA script tab in the configuration. If you press insert you will see the script in the list. Choose the line Channel Quality estimation by double click.
You should specify the ip address and the SNMP index as in our example. You should change the description, to identify the entry (channel) here because this one will become the legend of the graph entry Example : Channel 1 Quality estimation The current description is initialized with a default value declare in the script file. You can do a run to check that values are returned. Proceed for each graph entry you need for each index. You should get a list of entries.
Initialize the database when all your entries are defined.
After a while you should see your graph. You need to click on View Report And either should a report (web page) or a graph image file.
A click on the Report display WEB page with the report
End of document |
| Newsletter | Forum | Contact Us | News | Products | Downloads | Support | Partners | |||||
|
|||||