Community discussions

 
bstedh
newbie
Topic Author
Posts: 32
Joined: Tue Feb 16, 2010 12:30 am

Create custom oid information table

Thu Nov 25, 2010 5:22 am

I am looking to build an information table similar to the SNMP tab for devices. I have tried using the oid_column command but the data comes in an unusable string. If this data where able to be run vertically instead of horizontally you could actually read the information. :shock:

What I need would be to add custom columns to the snmp tab. I need to see the if_alias of a port so that I know whats pugged in where.

Here are a couple of things I have tried with limited to no success.

I tried this in tool tip but it is unreadable in this format.
[oid_column("1.3.6.1.2.1.31.1.1.1.18")][oid_column("1.3.6.1.2.1.2.2.1.7")][oid_column("1.3.6.1.2.1.2.2.1.8")]

This works but you need to reproduce this for every port manually. This gives me the PORT -- SPEED -- OPER UP/DOWN -- ADMIN UP/DOWN -- PORT ALIAS.
if (string_size(oid("1.3.6.1.2.1.31.1.1.1.1.1")),concatenate (oid("1.3.6.1.2.1.31.1.1.1.1.1")," ",oid("1.3.6.1.2.1.31.1.1.1.15.1")," ",oid("1.3.6.1.2.1.2.2.1.8.1")," ",oid("1.3.6.1.2.1.2.2.1.7.1")," ",oid("1.3.6.1.2.1.31.1.1.1.18.1")),"")

Anybody have any ideas on how to make this information available automatically without having to customize every single device I add or how to create a custom table of information?
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Create custom oid information table

Thu Nov 25, 2010 11:59 am

Anybody have any ideas on how to make this information available automatically without having to customize every single device I add or how to create a custom table of information?
If you realy need it, you can do it. In my sample I have 4 functions for 3 interfaces, you will need 25 or 49 function, may be more, depending on interface count on your switch. :)
25.png
27.png
Note: there is no for or foreach statement in a dude functions.

<?xml version="1.0" ?>
<dude version="4.0beta2">
 <Function>
  <sys-type>57</sys-type>
  <sys-id>11355794</sys-id>
  <sys-name>PortInfo_3</sys-name>
  <code>if (string_size(oid("1.3.6.1.2.1.31.1.1.1.1.3")),concatenate (oid("1.3.6.1.2.1.31.1.1.1.1.3")," ",oid("1.3.6.1.2.1.31.1.1.1.15.3")," ",oid("1.3.6.1.2.1.2.2.1.8.3")," ",oid("1.3.6.1.2.1.2.2.1.7.3")," ",oid("1.3.6.1.2.1.31.1.1.1.18.3"),"\0d\0a"),"")\0d\0a</code>
 </Function>
 <Function>
  <sys-type>57</sys-type>
  <sys-id>11355285</sys-id>
  <sys-name>PortInfo_2</sys-name>
  <code>if (string_size(oid("1.3.6.1.2.1.31.1.1.1.1.2")),concatenate (oid("1.3.6.1.2.1.31.1.1.1.1.2")," ",oid("1.3.6.1.2.1.31.1.1.1.15.2")," ",oid("1.3.6.1.2.1.2.2.1.8.2")," ",oid("1.3.6.1.2.1.2.2.1.7.2")," ",oid("1.3.6.1.2.1.31.1.1.1.18.2"),"\0d\0a"),"")\0d\0a</code>
 </Function>
 <Function>
  <sys-type>57</sys-type>
  <sys-id>11355275</sys-id>
  <sys-name>PortInfo_1</sys-name>
  <code>if (string_size(oid("1.3.6.1.2.1.31.1.1.1.1.1")),concatenate (oid("1.3.6.1.2.1.31.1.1.1.1.1")," ",oid("1.3.6.1.2.1.31.1.1.1.15.1")," ",oid("1.3.6.1.2.1.2.2.1.8.1")," ",oid("1.3.6.1.2.1.2.2.1.7.1")," ",oid("1.3.6.1.2.1.31.1.1.1.18.1"),"\0d\0a"),"")\0d\0a</code>
 </Function>
 <Function>
  <sys-type>57</sys-type>
  <sys-id>11355290</sys-id>
  <sys-name>Allports</sys-name>
  <code>concatenate(PortInfo_1(),PortInfo_2(),PortInfo_3())</code>
 </Function>
</dude>
You do not have the required permissions to view the files attached to this post.
 
bstedh
newbie
Topic Author
Posts: 32
Joined: Tue Feb 16, 2010 12:30 am

Re: Create custom oid information table

Mon Nov 29, 2010 5:18 pm

This is similar to my second attempt but with 48 port switches it just doesn't work on the map. That is why I was hoping to have the information come up in a table similar to the snmp tab for a device. I had the information come up in the tool tip and it worked but for the fact that all non switch equipment would have 48 blank lines in the tool tip. Otherwise you have to manually edit the tool tip for every single switch.
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Create custom oid information table

Tue Nov 30, 2010 9:33 am

Otherwise you have to manually edit the tool tip for every single switch.
Just must say, that settings for individual device tooltip is not supported by The Dude.

If I did realy needed such a functionality I would extend The Dude by external python QT application, which will be run as custom Tool for The Dude.

So, ask your programmers or write it by yourself.

Who is online

Users browsing this forum: No registered users and 10 guests