Linux Agent

Started by gokiwi, June 10, 2020, 04:48:47 PM

Previous topic - Next topic

gokiwi

Hi,

Is there a detailed set of instructions to install the agent on Linux, specifically Linux Mint 19 (I'm a complete Linux newbie) ?

I downloaded a Linux agent from the website and unarchieved it but all it has is /opt/netxms/bin and /opt/netxms/lib  - there are files in both directories but no sort of installer or instructions on what to do next.

I should add that I have installed net-snmp on the same box and set the rocommunity string but this does not seem to work (probably because I havnt a clue what I'm doing) (Learning when youre old can be a bit painful)

regards

Filipp Sudanov

Mint is Ubuntu based, so you can go ahead with Ubuntu installation instructions: https://www.netxms.org/documentation/adminguide/installation.html#installing-on-debian-or-ubuntu

Installation is done via packaging system - on first stage information about NetXMS is added into package manager, then you can install the necessary package, netxms-agent in your case.

When agent package is installed, it should get configured for autostart (so when Mint starts, the agent starts as well). If this does no happen, issue
systemctl enable nxagentd.service


tolimanjo

I did an agent install on Mint 19.2 recently. Here are my notes - hope they help:


In '/etc/apt/sources.list.d' create new file 'netxms.list' and add the following line:

   deb http://packages.netxms.org/debian/ stretch main
   
Install NetXMS agent with:

   wget -q -O - http://packages.netxms.org/netxms.gpg | sudo apt-key add -
   apt-get update
   apt-get install netxms-agent

(In my case I got the following error:

      The following packages have unmet dependencies:
      netxms-agent : Depends: netxms-base (= 3.3.350-1) but it is not going to be installed
            Depends: netxms-dbdrv-sqlite3 (= 3.3.350-1) but it is not going to be installed
            Depends: libcurl3 (>= 7.16.2) but it is not going to be installed
            Depends: libssl1.0.2 (>= 1.0.2d) but it is not installable

   ...so downloaded the libssl1.02 package from 'https://packages.debian.org/stretch/libssl1.0.2' and ran the following:

      apt install ./libssl1.0.2_1.0.2u-1_deb9u1_amd64.deb
      apt-get install libcurl3
      apt-get install netxms-agent
)

In '/etc/nxagentd.conf' uncomment the 'MasterServers' attribute and change its value to the NetXMS server DNS or IP address

Set the agent to start at boot, and then start it:

   systemctl enable nxagentd
   systemctl start nxagentd

Make sure it's running:

   service nxagentd status
   
Should now be able to register the agent on the server as per section 6.5.1 of the admin guide.

gokiwi

#3
Hi,

Unfortunately my newness to Linux has seen me fail at the first hurdle !!,

when running sudo apt-get update it fails with
W: GPG error: http://packages.netxms.org/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 179C0A80CDFADDB1
E: The repository 'http://packages.netxms.org/debian stretch InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I tried reading the manpage as recommended but failed badly..

Not sure what to do next, beginning to think this learning curve is too steep for someone in their late 50's

Resolved the above but now get

The following information may help to resolve the situation:

The following packages have unmet dependencies.
netxms-agent : Depends: netxms-base (= 3.3.350-1) but it is not going to be installed
                Depends: netxms-dbdrv-sqlite3 (= 3.3.350-1) but it is not going to be installed
                Depends: libssl1.0.2 (>= 1.0.2d) but it is not installable
E: Unable to correct problems, you have held broken packages.

tolimanjo

#4
Looks like you struck the same issue with Mint that I did, where 'libssl1.0.2' isn't installed.

Assuming you are on an Intel/AMD 64-bit platform then you can download its Debian package from the command line using:

      wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2u-1~deb9u1_amd64.deb

then run:

      sudo apt-get install ./libssl1.0.2_1.0.2u-1~deb9u1_amd64.deb
      sudo apt-get install netxms-agent

That should get the agent installed.

gokiwi

You are a genius  - that did it ! - Very many thanks for your help , most appreciated.

gokiwi

Was too hasty - still not working.

Error message when trying to poll

[12.06.2020 17:33:08] **** Poll request sent to server ****
[12.06.2020 17:33:08] Poll request accepted
[12.06.2020 17:33:09] Starting configuration poll for node Hampton-Downs
[12.06.2020 17:33:09] Checking node's capabilities...
[12.06.2020 17:33:09]    Checking NetXMS agent...
[12.06.2020 17:33:14]    Cannot connect to NetXMS agent (Connect failed)
[12.06.2020 17:33:14]    Checking EtherNet/IP...
[12.06.2020 17:33:19]    Cannot get device identity via EtherNet/IP (CONNECT FAILED)
[12.06.2020 17:33:19] Capability check finished
[12.06.2020 17:33:19] Checking interface configuration...
[12.06.2020 17:33:28] Unable to get interface list from node
[12.06.2020 17:33:28] Interface configuration check finished
[12.06.2020 17:33:28] Checking node name
[12.06.2020 17:33:28] Node name is OK
[12.06.2020 17:33:28] Updating general system hardware information
[12.06.2020 17:33:42] Finished configuration poll for node Hampton-Downs
[12.06.2020 17:33:42] Node configuration was not changed after poll
[12.06.2020 17:33:42] **** Poll completed successfully ****

Error message from service status

xagentd.service - NetXMS Agent
   Loaded: loaded (/lib/systemd/system/nxagentd.service; enabled; vendor preset:
   Active: active (running) since Fri 2020-06-12 13:53:37 BST; 3h 39min ago
  Process: 12387 ExecStart=/usr/bin/nxagentd -d (code=exited, status=0/SUCCESS)
Main PID: 12388 (nxagentd)
    Tasks: 18 (limit: 4915)
   CGroup: /system.slice/nxagentd.service
           └─12388 /usr/bin/nxagentd -d

Jun 12 13:53:34 Hampton-Downs systemd[1]: Starting NetXMS Agent...
Jun 12 13:53:34 Hampton-Downs systemd[1]: nxagentd.service: Can't open PID file
Jun 12 13:53:37 Hampton-Downs systemd[1]: Started NetXMS Agent.

tolimanjo

The key line in the output here is:

   [12.06.2020 17:33:14]    Cannot connect to NetXMS agent (Connect failed)

This means the server was not able to talk to the agent. Things to check:

   - does the server have connectivity to the agent, e.g. can it ping it
   - make sure you have 'MasterServers=<server_ip_address>' in the '/etc/nxagentd.conf' file
   - if the box the agent is running on has a firewall then make sure TCP port 4700 is open to the server

If the agent isn't directly addressable from the server (e.g. it's NATed), or if there's firewalling involved you can't change, then you would need to use the agent in the 'Agent to server connection' mode discussed in the Administrator Guide.

gokiwi

Hi,

Was Firewall on Linux machine  - for some reason although the rule was set for both directions it wasnt working inbound - created two seperate rules inbound and outbound and it started working !!.