Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. monitoring space on remote HDD over SSH

monitoring space on remote HDD over SSH

Scheduled Pinned Locked Moved Support
9 Posts 3 Posters 31.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z
    Z
    ZAJDAN
    wrote on last edited by
    #1

    Hi...
    I have remote HDD and I have not possibility install Agent on the machine where is the HDD.
    Is anyhow possible create SSH connection to such drive and run there command or script?

    Thank You for any hint
    Regards ZAJDAN

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      Absolutely, please check NetXMS docs on that: https://www.netxms.org/documentation/adminguide/ssh-monitoring.html
      Make sure you add ssh.nsm subagent to the configuratio file of netxms agent running on your netxms server and restart the agent afterwards.

      1 Reply Last reply
      0
      • Z
        Z
        ZAJDAN
        wrote on last edited by
        #3

        OK...

        1. On the NetXMS server I found /etc/nxagentd.conf and added new line SubAgent=ssh.nsm, then restarted the agent.
        2. On the server node I opened 'Data Collection Configuration' and there created new parameter.
          Parameter: SSH.Command(192.168.10.1,admin,mypass,ls)
          Origin: NetXMS Agent  Data Type: String
          Source Node: myserver

        Then I go into Object Details of the Node(myserver) and tab 'Last Values'.
        Here I see the my parameter, but value is <<ERROR>> , Timestamp is empty.

        thank You for any hint

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          You do not need source node if you have configured it on NetXMS server node. It defines where actual data collection will happen, in case of "agent" origin - what agent will be queried. You'll need source node to be set in the opposite case - when you configure DCI on "myserver" node but SSH subagent is on NetXMS server - then you'll have to set source node to NetXMS server node.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • Z
            Z
            ZAJDAN
            wrote on last edited by
            #5

            the myserver in my case means the NetXMS server itself.
            So I deleted the source node on the parameter, but it doesnt soved it.

            1 Reply Last reply
            0
            • F
              F
              Filipp Sudanov
              wrote on last edited by
              #6

              The could be an issue that first SSH.Command since agent start is failing (https://track.radensolutions.com/issue/NX-1852), but is should start working when polled again.

              1 Reply Last reply
              0
              • Z
                Z
                ZAJDAN
                wrote on last edited by
                #7

                for sure I restarted the agnetd a checked his status:

                ~# systemctl status nxagentd
                ● nxagentd.service - NetXMS Agent
                   Loaded: loaded (/lib/systemd/system/nxagentd.service; disabled; vendor preset
                   Active: active (running) since Fri 2020-05-08 13:25:58 CEST; 7min ago
                  Process: 1658 ExecStart=/usr/bin/nxagentd -d (code=exited, status=0/SUCCESS)
                 Main PID: 1659 (nxagentd)
                    Tasks: 19 (limit: 3480)
                   Memory: 13.9M
                   CGroup: /system.slice/nxagentd.service
                           └─1659 /usr/bin/nxagentd -d
                
                May 08 13:25:55 info21-srv-monitor systemd[1]: Starting NetXMS Agent...
                May 08 13:25:55 info21-srv-monitor systemd[1]: nxagentd.service: Can't open PID
                May 08 13:25:58 info21-srv-monitor systemd[1]: Started NetXMS Agent.
                

                Configuration Poll (Full)

                08.05.2020 13:26:12] **** Poll request sent to server ****
                [08.05.2020 13:26:25]    Checking EtherNet/IP...
                [08.05.2020 13:26:25]    Cannot get device identity via EtherNet/IP (CONNECT FAILED)
                [08.05.2020 13:26:25] Capability check finished
                [08.05.2020 13:26:25] Checking interface configuration...
                [08.05.2020 13:26:25] Interface configuration check finished
                [08.05.2020 13:26:25] Checking node name
                [08.05.2020 13:26:25] Node name is OK
                [08.05.2020 13:26:25] Updating general system hardware information
                [08.05.2020 13:26:25] Finished configuration poll for node info21-srv-monitor
                [08.05.2020 13:26:25] Node configuration was not changed after poll
                [08.05.2020 13:26:25] **** Poll completed successfully ****
                

                but it doesn´t seems to be, that it helped 😞

                1 Reply Last reply
                0
                • F
                  F
                  Filipp Sudanov
                  wrote on last edited by
                  #8

                  Ok, can set DebugLevel=7 in agent configuration file and show an extract from agent log file when the SSH command is executed.

                  Also, you can use nxget command - it requests data from the agent, e.g.:

                  nxget 127.0.0.1 "SSH.Command(host,user,password,ls)"
                  
                  1 Reply Last reply
                  0
                  • Z
                    Z
                    ZAJDAN
                    wrote on last edited by
                    #9

                    ok ...

                    1. I have added the log level
                    2. Then I restarted the agent
                    3. Then I restarted the pool on the server
                    4. Jumped into the log a here it is:
                    2020.05.08 14:34:30.615 *D* [                   ] Event sender thread started
                    2020.05.08 14:34:31.616 *I* [                   ] NetXMS Agent started
                    2020.05.08 14:35:23.876 *D* [                   ] Incoming connection from 10.6.6.17
                    2020.05.08 14:35:23.876 *D* [                   ] Connection from 10.6.6.17 rejected
                    2020.05.08 14:35:30.615 *D* [dc                 ] DataCollector: sleeping for 60 seconds
                    

                    10.6.6.17 is the NetXMS server self
                    so I again opened the nxagentd.conf and I have put there:

                    MasterServers=127.0.0.0/8,10.6.6.17
                    before was just:
                    MasterServers=127.0.0.0/8

                    and problem is SOLVED! super Thank You :_)

                    1 Reply Last reply
                    0

                    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
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    Powered by NodeBB Contributors
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups