On Fri, Feb 18, 2011 at 02:33:01PM +0100, [email protected] wrote:
> but there is no field [description] => xxxxx
[...]
> So I'm looking for where this field is extract, apparently from the class 
> interfaces, part of the class jffnms. And I'm totally lost now.
The description comes from an interface type field. There is a bug in
the current version of JFFNMS and its around the indexing.
If you ask for a list of interfaces and set an index so the array
returned has, for example, the interface ID as an index the code doesn't
properly match the extra fields list to the interface list.

The problem is around line 333 of api.interface.inc.php:

  $data = interface_values(array_keys($ids),array("exclude_types"=>array(20)));
  while (list ($id, $aux) = each ($data["values"]))
    foreach ($ids[$id] as $id_real)
      $result[$id_real]=array_merge($result[$id_real],$aux);
 
Sometimes $ids has keys of 0,1,2,... and sometimes it has keys of the
interface ID. On the second case, you don't get any matches.

You might be able to move the array_rekey line below this code block.
It's a little unclear what that may change. Another way is to look for
matches dependent on $index being NULL (no rekeying) or not.

The next release of 0.9.0 doesn't have this problem but its a rewrite.

 - Craig

-- 
Craig Small VK2XLZ    http://www.enc.com.au/       csmall at : enc.com.au
Debian GNU/Linux      http://www.debian.org/       csmall at : debian.org
GPG fingerprint:       1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5

------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to