Run Script to get DCI Data
-
Hi,
trusted nodes settings are used only when you set "source node" in DCI. It is irrelevant for SSH proxy settings. You don't need to create action for data collection - you correctly configured your DCI with SSH as data source.
Make sure that SSH subagent is loaded and can connect to target (you can set debug level to 6 and check agent log for messages with prefix SSH).
When you say your test DCI is not working - do you get data collection error, unsupported, or just empty value?Best regards,
Victor -
What is the SSH subagent and how do I load it or configure it. What machine does that go on? The Proxy, or the machine I want to SSH into? Maybe that is the last step to getting this to work. My DCI came back unsupported.
I only setup the Trusted Node because another thread had it. I'll remove that setting.
-
In agent configuration file (nxagentd.conf) on your NetXMS server make sure you have line
SubAgent = ssh.nsm
This will load SSH subagent. For SSH DCIs connection chain is following:
server --- NXCP protocol ---> agent with SSH subagent --- SSH protocol ---> target system
where agent can be on same machine as server or any different machine. This is why server do not connect directly over SSH but use agent instead.
Best regards,
Victor -
-
Seems to be packaging error. We will check.
Best regards,
Victor -
-
Hi,
we just published release 2.2.3 which should include ssh.nsm.
Best regards,
Victor -
-
Hi,
packages for Ubuntu 14.04 (trusty) are published. Please check that you have correct source - should be:
deb https://packages.netxms.org/ubutu trusty mainBest regards,
Victor -
I'm up to date now and the ssh.nsm is loaded.
On the properties for my client where I want to run the script, I have SSH with proper credentials and the Proxy set to my NetXMS server.
On the General Tab of the DCI for my client I have Origin SSH, Data Type String, Parameter uname -a.
I have not done anything to the NetXMS server other than confirm ssh.nsm is loaded.
I get a "Not supported" for the DCI configuration. Have I done all of the steps?
-
Hi,
description looks correct. Please send your nxagentd.conf (from server machine) and check agent log file on debug level 6 for any messages with prefix "SSH".
Best regards,
Victor -
nxagentd.conf from NetXMS Agent
# Log File LogFile=/var/log/nxagentd DebugLevel=6 # IP white list, can contain multiple records separated by comma. # CIDR notation supported for subnets. MasterServers=127.0.0.0/8 SubAgent = ssh.nsmcat /var/log/nxagentd | grep ssh from NetXMS Agent which acts as Proxy
2018.02.01 13:33:25.204 *E* Error loading subagent module "ssh.nsm": /usr/lib/x86_64-linux-gnu/netxms/ssh.nsm: cannot open shared object file: No such file or directory 2018.02.06 09:37:39.437 *E* Error loading subagent module "ssh.nsm": /usr/lib/x86_64-linux-gnu/netxms/ssh.nsm: cannot open shared object file: No such file or directory 2018.02.06 13:57:35.483 *I* Subagent "SSH" (ssh.nsm) loaded successfully (version 2.2.3) 2018.02.06 15:02:40.687 *I* Subagent "SSH" (ssh.nsm) loaded successfully (version 2.2.3) 2018.02.07 16:05:19.093 *I* Subagent "SSH" (ssh.nsm) loaded successfully (version 2.2.3) 2018.02.07 16:09:25.185 *D* SSH: using libssh version 0.6.1/openssl/zlib 2018.02.07 16:09:25.185 *I* Subagent "SSH" (ssh.nsm) loaded successfully (version 2.2.3)Am I correct that you were not asking for any logs on the server that the script is stored? That doesn't have the agent on it as I didn't think it was needed.
Thanks for your continued help and patience on this.
-
I noticed that on my NetXMS server, where the agent is installed, and the machine I want to be a proxy, where it says isagent it says no. Is that a display bug, or is my NetXMS server not seeing itself as an agent. As shown above, my agent service is running.
Could this be the issue?
-
Hi,
yes, that's definitely an issue. Check that you have NetXMS server's external address in MasterServers on local agent.
Best regards,
Victor -
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