NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: Data collection from different devices  (Read 360 times)

Mortymer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Data collection from different devices
« 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.
Logged

Mortymer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Data collection from different devices
« Reply #1 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.


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!
Logged

Tursiops

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
Re: Data collection from different devices
« Reply #2 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.
Logged

Mortymer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Data collection from different devices
« Reply #3 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.
Logged

Tursiops

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
Re: Data collection from different devices
« Reply #4 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?
Logged

Mortymer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Data collection from different devices
« Reply #5 on: March 09, 2019, 12:07:10 am »

I increased the timeout from 5 seconds to 7 seconds and it works.
Thank you!
Logged