NetXMS Support Forum

English Support => General Support => Topic started by: jniland on July 16, 2021, 12:36:08 AM

Title: List Node IP in Summary Table
Post by: jniland on July 16, 2021, 12:36:08 AM
I am looking for a way to have the IP address for a node listed in its summary table. Alex K. suggested that I use an snmp oid for this, however for the devices that I need this for (Mikrotik RouterOS) this is not supported. So, based on an older thread for a similar topic (https://www.netxms.org/forum/general-support/summarize-other-node-properties-in-addition-to-dcis/), I had the idea of using an unused snmp oid and using a transform script to just have it return the IP address instead. This is what I am looking for assistance with.

I have already shown that I can get the IP and have it show up in a node's data collection config, but still not in the summary table. I did this by creating a dummy oid with the below parameters:

source=internal
name=Dummy(ip)
retention=do not save to the database
transformation script: $node->ipAddr

I would like to be able to apply a similar transform script in a way where the ipAddr will show up in a summary table. So I found an oid that we don't care about with an snmp walk and found .1.3.6.1.2.1.2.2.1.6.2, which returns a mac address. I tried applying the below transform script, however this still just returns the mac address and not the IP. This mac address is also not showing up in the summary table for the relevant template. So how can I get it to show up and replace the mac address with the ipAddr of the node?
Title: Re: List Node IP in Summary Table
Post by: Filipp Sudanov on July 16, 2021, 04:38:03 PM
Just tried this
- created a DCI, type: Internal, parameter: Dummy(ip), data type: string, transformation script: return $node->ipAddr;
- checked in last values that this DCI actually collects the IP address
- created summary table, added column named IP addr, DCI name: Dummy(ip)

so there's no need for an OID - DCIs are identified by parameter and parameter in this case is "Dummy(ip)"
Title: Re: List Node IP in Summary Table
Post by: jniland on July 20, 2021, 01:26:34 AM
How do I go about adding a column to a summary table? When I generate the table by right clicking infrastructure services, selecting summary tables, and then choosing the correct platform (in this case Mikrotik), it just generates the table with seemingly no way to add columns.
Title: Re: List Node IP in Summary Table
Post by: jniland on July 20, 2021, 01:28:24 AM
Actually, I just figured it out. Thank you for your help!