News:

We really need your input in this questionnaire

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jamie

#1
What do you setup on the server side to recieve a nxevent or nxpush?

Is there are API for nxevent and/or nxpush in Java?

I have a user interface script running and I want to send events such as timing thresholds or up/down alerts...
#2
Both server and agent are on localhost (Windows2003 VMWare).

I changed the IP address in the Communication Tab to localhost and it works now.

Thank you for your help.
#3
The script  is nonsense and only for testing. The problem is the test file does get created with nxget but does not get created from server.
In the screenshot above can you see problem in server configuration? Is there a step on the server I am missing?

Using config below the agent is working fine. I am missing something on the server side and still get a timestamp of 1/1/70

C:\NetXMS\bin>nxget localhost Test
2

#
# NetXMS agent configuration file
# Created by server installer at Tue Feb 21 09:46:30 2012
#

LogFile = {syslog}
Servers = 127.0.0.1
InstallationServers = 192.168.74.128
FileStore = C:\NetXMS\var
RequireAuthentication = no
SubAgent = winperf.nsm
SubAgent = portcheck.nsm
ExternalParameterShellExec = Test:"Echo 2"

Agent running. Press ESC to shutdown.
[25-Feb-2012 10:28:55] Incoming connection from 127.0.0.1
[25-Feb-2012 10:28:55] Connection from 127.0.0.1 accepted
[25-Feb-2012 10:28:55] [session:0] Received control message CMD_GET_NXCP_CAPS
[25-Feb-2012 10:28:55] [session:0] Sending message CMD_NXCP_CAPS (size 16)
[25-Feb-2012 10:28:55] [session:0] Received message CMD_KEEPALIVE
[25-Feb-2012 10:28:55] [session:0] Sending message CMD_REQUEST_COMPLETED (size 3
2)
[25-Feb-2012 10:28:55] [session:0] Received message CMD_GET_PARAMETER
[25-Feb-2012 10:28:55] [session:0] Requesting parameter "Test"
[25-Feb-2012 10:28:55] H_ExternalParameter called for "Test" "S"Echo 2""
[25-Feb-2012 10:28:55] H_ExternalParameter: command line is ""Echo 2""
[25-Feb-2012 10:28:55] H_ExternalParameter (shell exec): worker thread created
[25-Feb-2012 10:28:55] H_ExternalParameter/POpenWorker: worker thread pipe read
result: 00B79EB0
[25-Feb-2012 10:28:55] H_ExternalParameter (shell exec): execution status 0
[25-Feb-2012 10:28:55] [session:0] Sending message CMD_REQUEST_COMPLETED (size 4
8)
[25-Feb-2012 10:28:55] [session:0] Session with 127.0.0.1 closed


#4
OK I will use cmd/ c

The CMD file contains
echo "Test" > C:\test.txt
exit 1


I am happy agent runs CMD file now via nxget.
So remaining problem is why server does not run agent CMD.
#5
I see that is the result of the dir. I noticed it is not returning files from C:\ so I put "" around the command and it works as expected with NXGET.
I then tried to run a CMD file and that did not work then I prefix it with the START command and it now runs the batch file.
ExternalParameterShellExec = Test:"Start C:\NetXMS\Test\Launch.cmd"

I still have problem that nothing shows in Last Values.
#6
C:\NetXMS\bin>nxget localhost Test
WINNT.NSM
#7
Below is a paste of the nxagentd.conf and text from nxagentd.exe window.
I have entered the word Test as a Parameter in the Data Collection Configuration window.
In the Last Values window it shows Test with timestamp 1/1/70 with the Value field empty.
I've also tried a .cmd file with no sign the agent is running the cmd.


C:\NetXMS\bin>nxagentd -c C:\NetXMS\etc\nxagentd.conf -D 9
[24-Feb-2012 09:40:46] Additional configs was loaded from C:\nxagentd.conf.d
[24-Feb-2012 09:40:46] Debug level set to 9
[24-Feb-2012 09:40:46] Subagent API initialized
[24-Feb-2012 09:40:46] Subagent "WINNT.NSM" loaded successfully
[24-Feb-2012 09:40:46] Debug callback set for DB library
[24-Feb-2012 09:40:46] Subagent "winperf.nsm" loaded successfully
[24-Feb-2012 09:40:46] Subagent "portcheck.nsm" loaded successfully
[24-Feb-2012 09:40:46] Counter set B is empty, collector thread for that set wil
l not start
[24-Feb-2012 09:40:46] Counter set C is empty, collector thread for that set wil
l not start
[24-Feb-2012 09:40:47] External parameters providers poller thread will not star
t
[24-Feb-2012 09:40:47] Trying to bind on 0.0.0.0:4700
[24-Feb-2012 09:40:47] Listening on socket 0.0.0.0:4700
[24-Feb-2012 09:40:48] NetXMS Agent started
Agent running. Press ESC to shutdown.


#
# NetXMS agent configuration file
# Created by server installer at Tue Feb 21 09:46:30 2012
#

LogFile = {syslog}
Servers = 127.0.0.1
InstallationServers = 192.168.74.128
FileStore = C:\NetXMS\var
RequireAuthentication = no
SubAgent = winperf.nsm
SubAgent = portcheck.nsm
ExternalParameterShellExec = Test:dir c:\ | wc -l



#8
I am getting "External parameters providers poller thread will not start" in the netXMS Win32 Agent log file.

I am having trouble get the agent to run a CMD file is this message connected to that?
#9
With the example above : ExternalParameterShellExec = company.ParameterChecker:"C:\Program Files\...\Check.cmd"

What should be entered under Data Collection Configuration origin NetXMS agent?

Does the Parameter field contain company.ParameterChecker