ExternalParameterShellExec runs multiple times
-
Hi,
I have set up one node to run a file via ExternalParameterShellExec on the agent but when it executes the file it runs it 3 times, any known related problems to this?
Searched the bugtracker but could not find any.Tested both forced DCI poll and scheduled.
Agent version 2.0.5
Windows 2012 R2 -
Please increase debug level to 5, reproduce problem and send us agent log
-
This is not the real file, i tested different scenarios and this test.exe is only a while loop so it stays active
[10-Oct-2016 11:01:16.251] [DEBUG] [session:0] Requesting parameter "test" [10-Oct-2016 11:01:16.251] [DEBUG] H_ExternalParameter called for "test" "Sc:\test.exe" [10-Oct-2016 11:01:16.251] [DEBUG] RunExternal called for "test" "Sc:\test.exe" [10-Oct-2016 11:01:16.251] [DEBUG] RunExternal: command line is "c:\test.exe" [10-Oct-2016 11:01:16.251] [DEBUG] RunExternal (shell exec): worker thread created [10-Oct-2016 11:01:18.266] [DEBUG] RunExternal (shell exec): execution timeout [10-Oct-2016 11:01:18.266] [DEBUG] RunExternal (shell exec): execution status 2 [10-Oct-2016 11:01:18.266] [DEBUG] [session:0] Requesting parameter "test" [10-Oct-2016 11:01:18.266] [DEBUG] H_ExternalParameter called for "test" "Sc:\test.exe" [10-Oct-2016 11:01:18.266] [DEBUG] RunExternal called for "test" "Sc:\test.exe" [10-Oct-2016 11:01:18.266] [DEBUG] RunExternal: command line is "c:\test.exe" [10-Oct-2016 11:01:18.266] [DEBUG] RunExternal (shell exec): worker thread created [10-Oct-2016 11:01:20.266] [DEBUG] RunExternal (shell exec): execution timeout [10-Oct-2016 11:01:20.266] [DEBUG] RunExternal (shell exec): execution status 2 [10-Oct-2016 11:01:20.266] [DEBUG] [session:0] Requesting parameter "test" [10-Oct-2016 11:01:20.266] [DEBUG] H_ExternalParameter called for "test" "Sc:\test.exe" [10-Oct-2016 11:01:20.266] [DEBUG] RunExternal called for "test" "Sc:\test.exe" [10-Oct-2016 11:01:20.266] [DEBUG] RunExternal: command line is "c:\test.exe" [10-Oct-2016 11:01:20.266] [DEBUG] RunExternal (shell exec): worker thread created [10-Oct-2016 11:01:22.282] [DEBUG] RunExternal (shell exec): execution timeout [10-Oct-2016 11:01:22.282] [DEBUG] RunExternal (shell exec): execution status 2 -
Well, it behaves as expected.
If you need to handle long-running command - use ExternalParameterProvider (https://wiki.netxms.org/wiki/ExternalParametersProvider) -
That seems logical, though this external does not return data by itself it consolidates data in an external sql db for faster queries.
Can run it in windows schedule but felt more right to run it from the agent that uses it on set schedule.The answer though solved a few other data collection dilemmas i had so thanks for that, time to rethink my data providers

-
Problem with slow external parameters is that server retrieve values in a single thread (per agent) and it can block data collection from the agent
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login