Add description (query_ifalias) in data query

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
manel
Posts: 12
Joined: Sun Aug 12, 2012 4:59 am

Add description (query_ifalias) in data query

Post by manel »

Hello,
We have a dataquery to obtain the values of power tx/rx into the transceiver. Now I need that in this power tx/rx puts de description of interface. I tried to confgure if_alias in the dataquery but currently doesn't put in this interface. Atach the dataquery.

<interface>
<name>Get Cisco Switch Sensors</name>
<description>Populates sensors available on Cisco Switch</description>
<oid_index>.1.3.6.1.4.1.9.9.91.1.1.1.1.1</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]+)$</oid_index_parse>
<index_order>entPhysicalDescr</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>

<fields>
<Index>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</Index>

<entPhysicalDescr>
<name>Description</name>
<method>get</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.47.1.1.1.1.2</oid>
</entPhysicalDescr>

<entSensorType>
<name>Sensor Type</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<rewrite_value>a:14:{i:1;s:5:"other";i:2;s:7:"unknown";i:3;s:3:"Vac";i:4;s:3:"Vdc";i:5;s:1:"A";i:6;s:1:"W";i:7;s:2:"Hz";i:8;s:1:"C";i:9;s:3:"%RH";i:10;s:3:"rpm";i:11;s:3:"cmm";i:12;s:4:"bool";i:13;s:11:"specialEnum";i:14;s:3:"dBm";}</rewrite_value>

<oid>.1.3.6.1.4.1.9.9.91.1.1.1.1.1</oid>

</entSensorType>

<entSensorScale>
<name>Exponent Units</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<rewrite_value>a:17:{i:1;s:5:"yocto";i:2;s:5:"zepto";i:3;s:4:"atto";i:4;s:1:"f";i:5;s:1:"p";i:6;s:1:"n";i:7;s:1:"u";i:8;s:1:"m";i:9;s:1:" ";i:10;s:1:"k";i:11;s:1:"M";i:12;s:1:"G";i:13;s:1:"T";i:14;s:3:"exa";i:15;s:4:"peta";i:16;s:5:"zetta";i:17;s:5:"yotta";}</rewrite_value>

<oid>.1.3.6.1.4.1.9.9.91.1.1.1.1.2</oid>

</entSensorScale>

<entSensorStatus>

<name>Sensor Status</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<rewrite_value>a:3:{i:1;s:2:"ok";i:2;s:11:"unavailable";i:3;s:14:"nonoperational";}</rewrite_value>
<oid>.1.3.6.1.4.1.9.9.91.1.1.1.1.5</oid>

</entSensorStatus>

Thank you in advance
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Add description (query_ifalias) in data query

Post by gandalf »

Sorry, the rewrite stuff was not yet implemented (yes, I know, the docs say it will work).
Then, please post output of snmpwalk against that table
R.
manel
Posts: 12
Joined: Sun Aug 12, 2012 4:59 am

Re: Add description (query_ifalias) in data query

Post by manel »

Hi,
I attach another data query and the response of snmpwalk.
The problem it is that i would like to add description of interface (query_if_alias) like automatic parameter.
I put an example

Data Query [Potencia transceiver]
Index Description Sensor Type Exponent Units Sensor Status Alias (IF-MIB)
7213 TenGigabitEthernet11/2 Module Temperature Sensor 8 9 1
7214 TenGigabitEthernet11/2 Supply Voltage Sensor 4 9 1
7215 TenGigabitEthernet11/2 Bias Current Sensor 5 8 1
7216 TenGigabitEthernet11/2 Transmit Power Sensor 14 9 1
7217 TenGigabitEthernet11/2 Receive Power Sensor 14 9 1

In all of four index put the description query_if_alias of te 11/2 .
I don't know if it is possible.

Thanks
Attachments
cisco-entity-snmpwalk.txt
(11.85 KiB) Downloaded 132 times
data_query.txt
(2.66 KiB) Downloaded 139 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Add description (query_ifalias) in data query

Post by gandalf »

Please try XML attached.
Perform a verbose query and report results
R.
Attachments
data_query.txt
(1.92 KiB) Downloaded 154 times
manel
Posts: 12
Joined: Sun Aug 12, 2012 4:59 am

Re: Add description (query_ifalias) in data query

Post by manel »

Hi Gandalf,
With this dataquery doesn't obtain the description of sensor type. furthermore the interface doesn't assign query_ifalias in all interfaces of sensor type.
I put an instance,

Eventually with the old dataquery in tab new graph i obtained this information
Data Query [Potencia transceiver]
Index Description Sensor Type Exponent Units Sensor Status Alias (IF-MIB)
7213 TenGigabitEthernet11/2 Module Temperature Sensor 8 9 1
7214 TenGigabitEthernet11/2 Supply Voltage Sensor 4 9 1
7215 TenGigabitEthernet11/2 Bias Current Sensor 5 8 1
7216 TenGigabitEthernet11/2 Transmit Power Sensor 14 9 1
7217 TenGigabitEthernet11/2 Receive Power Sensor 14 9 1

And i would like to obtain the following information. If the description of interfaces is called description

Data Query [Potencia transceiver]
Index Description Sensor Type Exponent Units Sensor Status Alias (IF-MIB)
7213 TenGigabitEthernet11/2 Module Temperature Sensor 8 9 1 description
7214 TenGigabitEthernet11/2 Supply Voltage Sensor 4 9 1 description
7215 TenGigabitEthernet11/2 Bias Current Sensor 5 8 1 description
7216 TenGigabitEthernet11/2 Transmit Power Sensor 14 9 1 description
7217 TenGigabitEthernet11/2 Receive Power Sensor 14 9 1 description

thanks again
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Add description (query_ifalias) in data query

Post by gandalf »

Then, please remove

Code: Select all

<index_order>ifAlias</index_order>
	<index_order_type>numeric</index_order_type>
	<index_title_format>|chosen_order_field|</index_title_format>
and change method to "walk" for description.
An, please, post output of a verbose query of this XML
R.
manel
Posts: 12
Joined: Sun Aug 12, 2012 4:59 am

Re: Add description (query_ifalias) in data query

Post by manel »

Hi,
With change method to "walk" for description I obtain the description of sensor type.
I have added the verbose query in attach. I put only the query_if alias of TenGigabitEthernet11/2,11/3 because the next index are consecutive. I need that this index 108 is assigned to 7201 7202 7203 7204 7205, the index 109 is assigned to 7212,7213,7214,7215 so on....

Regards
Attachments
verbquery.txt
(114 KiB) Downloaded 127 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests