Summarize other node properties in addition to DCIs

Started by Brough, November 02, 2018, 05:54:56 PM

Previous topic - Next topic

Brough

We make extensive use of Summary Tables but only for DCI values.  Is there a way to get similar summaries for node properties like location?  Ideally we'd like to configure a Summary Table that includes both DCI values and other node properties as different columns in the same report, but any path to getting a summary of manually entered Latitude and Longitude values would be useful.

MAboudi

Hi;
this is my suggestion;
on the node use an internal  DCI of type Dummy that return a string
on the tranformation use :



return $node->country;



(for example to get the country property)
you can acces all the properties from the $node class and its parent "NetObjclass".
for the "NetObjclass":
https://wiki.netxms.org/wiki/NXSL:NetObj
for the Node class:
https://wiki.netxms.org/wiki/NXSL:Node

best regards


meshnet

Quoteon the node use an internal  DCI of type Dummy that return a string

yes, that works for some values and for some cases. But for summary tables it, it may be asking too much for a per-object and/or per-dummy field. You can see here in the screenshot the dummy values column holds values which are all over the place.

Process
- automatically/manually collect GPS coords (LAT/LON) for a given device
- take above GPS coords, install via: right-click object -> properties -> Location -> (Latitude / Longitude)
- Apply, and perform re-poll on device (or wait a bit)

DCI Transformation
- create 2 DCIs for both Latitude and Longitude and enter Transformation script
- no delta calculation

Latitude

nodeLoc = $node->geolocation;
return nodeLoc->latitude;


Longitude

nodeLoc = $node->geolocation;
return nodeLoc->longitude;



This works great when collecting all nodes, plus their last values -- This works correctly saves time because of code that filters for Jython code, where node.isWireless() then simply continue to aggregate a list of nodes and last-values. simple.

The issue is summary tables.. It would be great to have this work there, vs. other methods.



Victor Kirhenshtein

This is because when summary table is built, DCI name is used for matching (and I suppose you have other dummy DCIs). You can use script DCI with unique name instead (it can be one library script that accepts parameters or multiple scripts).

Best regards,
Victor

meshnet

I wanted to follow up on how we fixed it.

The radio devices have SNMP for virtual AP interfaces. We don't really care about these OIDs, plus they are all unique across formfactors/firmwares. So the trick is to use a working SNMP OID endpoint, poll it, then use a transformation script to replace the value.

Example for geoLatitude_DMS:


nodeLoc = $node->geolocation;
return nodeLoc->latitudeText;