NetXMS Support Forum

English Support => General Support => Topic started by: malexishp on December 18, 2012, 11:28:07 PM

Title: Usage of nxpush to load values in a new DCI over a node
Post by: malexishp on December 18, 2012, 11:28:07 PM
Hi

We installed NetXMS 1.2.4 few days ago. Very good tool thanks!

We create a node called Switch_1 and add a new push DCI called Time (Push Integer).

We are loading values into Time using command

nxpush -u admin -P ******** localhost Switch_1:Time="c:\netXMS\bin\nxget localhost Icmp.Ping(10.194.133.1)"

When we check Last Values in node, the DCI took the string c:\netXMS\bin\nxget localhost Icmp.Ping(10.194.133.1) not the value itself. We replace " by ', remove c:\netXMS/bin and do many possible variations but nothing happen.

Thanks for your support
Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: Victor Kirhenshtein on December 19, 2012, 01:15:36 PM
Hi!

It's not so simple to use command's output in Windows as in UNIX shell. You can achieve this using FOR command:


for /F %x in ('nxget localhost Icmp.Ping(10.194.133.1)') do @nxpush -u admin -P ******** localhost Switch_1:Time=%x


However, there are easier way to achieve what you want using proxy DCI: create DCI on node Switch_1, set origin to "NetXMS Agent", enter Icmp.Ping(10.194.133.1) as name, and set proxy node to your NetXMS server node. This way system will show collected data for node Switch_1, but real data collection will occur from NetXMS server node. You will also need to add Switch_1 to list of trusted nodes in NetXMS server node's properties, or set server configuration variable "CheckTrustedNodes" to 0.

Best regards,
Victor

Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: malexishp on December 19, 2012, 05:41:23 PM
Hi

Thanks to clarify my mistake using UNIX instructions in Windows

We use your solution but still it does not work; Last value is <<ERROR>>. This is what we did

- We modify server parameter CheckTrustedNodes to 0 and restart server.

- We check that nxagentd.conf in server have line SubAgent = ping.nsm and define timeout, packetrate and target values

- We finally create new DCI as NetXMS Agent in swtich_1 and in server node
     - Description Icmp.Ping(10.194.133.1) as description (There is no name field, right?)
     - No parameters
     - Proxy for Switch_1 SERVER; No Proxy for SERVER NODE

Thanks for your help
Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: Victor Kirhenshtein on December 19, 2012, 08:09:35 PM
Sorry, my mistake - I mean "Parameter" field. "Name" was an old name for it. See attached screenshot for example. Description is a human-readable text to be displayed in UI, and "parameter" is an actual parameter name to be collected (it will be SNMP OID for SNMP parameters).

Best regards,
Victor
Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: malexishp on December 19, 2012, 09:00:35 PM
I forgot to mention I suppossed you made a mistake when saying name so I put it in parameters but it does not work.

Maybe I missed some setup?
Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: Victor Kirhenshtein on December 19, 2012, 11:01:01 PM
Did you restart agent after adding ping subagent? Also, can you check that you can get required value via nxget?
And maybe post here screenshot of your DCI config, this can help identifying the problem.

Best regards,
Victor
Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: malexishp on December 20, 2012, 12:04:48 AM
Yes I restart both server and agent. And I obtain a positive answer using nxget

This is the agent text

MasterServers = netxms.demo
SubAgent = ping.nsm

*PING
Timeout = 1000
PacketRate = 12
Target = 10.194.133.1


This is the answer from nxget
C:\Users\marlon.hurtado>nxget localhost icmp.ping(10.194.133.1)
50


DCI config is in attachment



Title: Re: Usage of nxpush to load values in a new DCI over a node
Post by: Alex Kirhenshtein on January 11, 2013, 12:56:58 PM
1) Check that "primary IP" on overview tab for node "MARLONHURTADO" is listed in MasterServers
2) Check again with nxget, but use external IP instead of loopback.