Monitoring with NetXms (ssh commands)

Hello

Are there any fellow NetXms users in this forum? Been using NetXms after The Dude and so far very happy with it. But i would like to request some additional data from Mikrotik over ssh, but not sure how to do it in NetXms, perhaps someone has some working examples ?

Egert

Hello

There are two ways:

  1. load ssh.nsm subagent (e.g. add “Subagent=ssh.nsm” to nxagentd.conf), then open router’s node properties and set SSH credentials.
    Once configured, you can create DCIs with origin=SSH and actual command in the DCI name.
    You can also create DCI “SSH.Command” with origin=agent, but this way you’ll need to specify IP and credentials in the DCI itself.
    Example: SSH.Command(router_ip,user,password,put [/system resource get uptime])
    This method works with one-liner commands.

  2. Create script with some kind of automation tools like “expect”, simulate interactive session, then add your script to nxagnetd.conf as external parameter.
    Example:
    ExternalParamter=Custom.Metric:/usr/local/bin/custom_script