Is there a way through scripting or other to do checks on nodes that dont either support SNMP or Agent but have ssh access. Since ssh supports running remote commands such as if i run "ssh me@remotenode uname -a " will give me system identification info could I create a DCI that could run these remote commands via SSH to gather data ? I have a switch that does not fully support SNMP and only way to gather interface,cpu or temp stats is either via web or login and run a custom executable which comminticates with switch chip ...so my only options is try and scrape the data from the gui or run the custom commands over ssh and return it to NETXMS but i dont see any way to do that in the DCI setup options...
Thanks
Hi,
actually, SSH data collection will be introduced in 2.1-M1 (it is already implemented in development branch). Right now you can try to build agent with SSH support (you'll need libssh development package installed) and use SSH subagent. It provides single parameter called SSH.Command with the following arguments:
SSH.Command(host,login,password,command).
For example, to get load average from AIX machine:
SSH.Command(10.10.1.1,root,password,"uptime | cut -d : -f 4 | cut -d , -f 1")
And server version 2.1 will hide these details and allow you to create DCIs with SSH source and convert them into requests to appropriate agents.
Best regards,
Victor
Do i need to build the server as well or just the client ? How stable is the current dev branch ?
Wow great, any ETA on the 2.1 release?
For using SSH.Command parameter you only need to build agent. Version 2.1 will also include new data source "SSH" which will simplify configuration.
First release in 2.1 branch - 2.1-M1 - will be available in few days.
Best regards,
Victor
Hello,
I installed the beta version on a new VM to try version.
I want to check over ssh command.
I did it on DCI, but changed the status to UNSUPPORTED.
I used same example you gave.
What I miss?
Check that metric is provided by the agent:
nxget -I VM_IP|grep SSH
Also check agent version:
nxget VM_IP Agent.Version
Hello,
Here´s the result .
root@ubuntu-test:~# nxget -I 10.31.1.97 | grep SSH
ServiceCheck.SSH(*) INT "Status of remote SSH service"
ServiceResponseTime.SSH(*) INT "Response time of remote SSH service"
root@ubuntu-test:~# nxget 10.31.1.97 Agent.Version
2.1-M1
I think my agent doesn´t support check by ssh.
How can i fix it?
Thanks
Hi,
make sure you have
SubAgent = ssh.nsm
in nxagentd.conf on 10.31.1.97.
Best regards,
Victor
Hi Victor.
I started using NetXMS and I need to get data over the SSH protocol. I'm wondering if the ssh sub-agent is included in release version 2.1 by default or I must to build it manually?
Hi,
it seems to be missing in deb packages. We will check and re-package them to include SSH subagent. On Windows SSH subagent is included.
Best regards,
Victor