NetXMS Support Forum

English Support => General Support => Topic started by: Mortymer on March 04, 2019, 03:50:29 PM

Title: Data collection from different devices
Post by: Mortymer on March 04, 2019, 03:50:29 PM
Hello,

I have some different meters what I want to monitoring with netXMS. (electricity, gas, water, temperature ...)
I made a simple application to get the current measures from the meters.
With parameters I give the ip address and more others.
How can I configure the NetXMS server and Agent to collect the measures from more than 200 meters.
Not need to check the amounts on every seconds but I have to check every hours.
This meters aren't support SNMP and I can't install any third party application but with this app l can collect the current amounts.
The netxms agent can execute this app but I don't know how can I use one Agent to check all meters.
Thank you for any help.
Title: Re: Data collection from different devices
Post by: Mortymer on March 05, 2019, 06:02:02 PM
So after I read what I found:
1/ Now I know that I have to register the data collection items under an Agent. I can't use the Meter-node for this.
2/ I setup the Agent config with the external application

ExecTimeout = 5000
FileStore = C:\NetXMS\var
LogFile = c:\NetXMS\Log\agent.log
RequireAuthentication = no
SubAgent = winperf.nsm
SubAgent = portcheck.nsm
SubAgent = ping.nsm
SubAgent = ssh.nsm

ExternalParameterShellExec=EMC_Getbalance(*):C:\NetXMS\scripts\EMCCommunication.exe $1 $2

I register one meter under and Agent (I attached the screesnhot) where I set the parameters for this meter.
(http://emc_060-02.png)

But at "Last values" tab I see "<<ERROR>>"
I know that I did something wrong I have no idea what.

Thank you for any help!
Title: Re: Data collection from different devices
Post by: Tursiops on March 05, 2019, 11:16:51 PM
I believe you need to separate the parameters with a ",", i.e. EMC_Getbalance(--ip=10.12.60.42,--port=80).
Not sure how exactly your tool works, but if it always expects --ip= and --port, you could probably add that to your ExternalParameter and only pass the actual IP and port number, e.g. ExternalParameterShellExec=EMC_Getbalance(*):C:\NetXMS\scripts\EMCCommunication.exe --ip=$1 --port=$2.
Title: Re: Data collection from different devices
Post by: Mortymer on March 06, 2019, 10:26:56 AM
I modified the parameters but the problem is same :(
I see ERROR message.
But the strange things that if I set the debug mode on Agent, I don't find any related information about the the Agent want to start this application.
Title: Re: Data collection from different devices
Post by: Tursiops on March 07, 2019, 12:46:21 PM
How long does it take your script to run?
More than the 5 second timeout?
Have you restarted the agent and did you run a Configuration Poll after adding the External Parameter?
Title: Re: Data collection from different devices
Post by: Mortymer on March 09, 2019, 12:07:10 AM
I increased the timeout from 5 seconds to 7 seconds and it works.
Thank you!