Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - aristosv

#1
The raspberry pi is creating a reverse ssh tunnel on my ssh server.
I am accessing the raspberry pi through that ssh server, using iptables rules.

I think the problem is that the netxms server is communicating with the ssh server (which does not have the nextxms agent installed)
It is not communicating with the raspberry pi.
#2
#
# Sample configuration file for NetXMS agent
#

#
# Servers
#
# List of management servers which have read access to this agent.
# Both IP addresses and DNS names can be used. Multiple servers can be
# specified in one line, separated by commas. If this parameter used more
# than once, servers listed in all occurences will have access to agent.
#
# Examples:
# Servers = 10.0.0.1
# Servers = 127.0.0.1, srv1.domain.com, srv2.domain.com

#
# ControlServers
#
# List of management servers which can execute actions on agent. Hosts
# listed in this parameter also have read access to the agent. Both
# IP addresses and DNS names can be used. Multiple servers can be specified
# in one line, separated by commas. If this parameter used more than
# once, servers listed in all occurences will have access to agent.
#
# Examples:
# ControlServers = 10.0.0.1
# ControlServers = 127.0.0.1, srv1.domain.com, srv2.domain.com

#
# MasterServers
#
# List of management servers which have full access to agent. Hosts listed
# in this group can change agent's config, upload files to agent and initiate
# agent upgrade, as well as perform any task allowed for hosts listed in
# Servers and ControlServers. Both IP addresses and DNS names can be used.
# Multiple servers can be specified in one line, separated by commas.
# If this parameter used more than once, servers listed in all occurences
# will have access to agent.
#
# Examples:
MasterServers = 192.168.0.26, 192.168.0.28
# MasterServers = 127.0.0.1, srv1.domain.com, srv2.domain.com

#
# ListenPort
#
# Defines the port number for the agent to listen on incoming connections.
# Default values is 4700
#
# Examples:
# ListenPort = 4700

#
# LogFile
#
# Agent's log file. To write log to syslog (or Event Log on Windows),
# use {syslog} as file name.
#
# Examples:
# LogFile = {syslog}
# LogFile = /var/log/nxagentd.log

#
# RequireAuthentication
#
# If set to "yes", host connected to agent have to provide correct shared
# secret before issuing any command. Default value is "no".
#
# Example:
# RequireAuthentication = no

#
# RequireEncryption
#
# If set to "yes", host connected to agent will be forced to use encryption,
# and if encryption is not supported by remote host, connection will be
# dropped. Default value is "no". This parameter has no effect if agent
# was compiled without encryption support.
#
# Example:
# RequireEncryption = no

#
# EnabledCiphers
#
# Control what ciphers agent can use for connection encryption. Value for
# this parameter is a cipher code. To enable more than one cipher, they
# codes should be added. By default, all possible ciphers are enabled.
#
# Possible cipher codes:
# 1  =  AES-256
# 2  =  BLOWFISH
# 4  =  IDEA
#       8  =  Triple DES
#
# Example (enable AES-256 and IDEA):
# EnabledCiphers = 5

#
# SharedSecret
#
# Agent's shared secret. Used only if RequireAuthentication set to "yes".
#
# Example:
# SharedSecret = secret

#
# MaxSessions
#
# Maximum number of simultaneous communication sessions. Possible value can
# be in range from 2 to 1024. Default value is 32.
#
# Example:
# MaxSessions = 32

#
# SessionIdleTimeout
#
# Communication session's idle timeout in seconds. If agent will not receive
# any command from peer within specified timeout, session will be closed.
# Default value is 60 seconds.
#
# Example:
# SessionIdleTimeout = 60

#
# FileStore
#
# Directory to be used for storing files uploaded by installation server(s).
#
# Example:
# FileStore = /var/nxagentd

#
# TimeOut
#
# GET request timeout in seconds. If GET request cannot be completed for
# specified amount of time, agent will return an error to server.
# Default value is 5 seconds.
#
# Example:
# TimeOut = 5

#
# StartupDelay
#
# Number of seconds agent should wait on startup before start servicing
# requests. This parameter can be useful to prevent false reports about
# missing processes or failed services just after monitored system startup.
# Default value is 0, i.e. no startup delay.
#
# Example:
# StartupDelay = 0

#
# PlatformSuffix
#
# String to be added as suffix to value of System.PlatformName parameter.
#
# Example:
# PlatformSuffix = dbg

#
# EnableSubagentAutoload
#
# Enable or disable autoloading of platform subagent(s).
# Default value is "yes".
#
# Example:
# EnableSubagentAutoload = yes

#
# EnableProxy
#
# Allow requests forwarding
# Default value is "no"
#
# Example:
# EnableProxy = no

#
# EnableSNMPProxy
#
# Allow SNMP requests forwarding
# Default value is "no"
#
# Example:
# EnableSNMPProxy = no

#
# SubAgent
#
# Subagent to load. To load multiple subagents, you should use multiple
# SubAgent parameters. Subagents will be loaded in the same order as they
# appears in configuration file.
#
# UNIX example:
# SubAgent = [path_to_netxms_install_dir]/lib/libnsm_linux.so
#
# Windows example:
# SubAgent = winperf.nsm

#
# ExternalParameter
#
# Add parameter handled by external command. To add multiple parameters, you
# should use multiple ExternalParameter entries. Please note that on Windows
# agent uses system process execution API for execution of specified
# command, so you cannot use pipes or shell commands. If you need to
# execute command via shell, use ExternalParameterShellExec instead.
#
# Syntax:
# ExternalParameter = <parameter_name>:<command_line>
# If you specify parameter name as "name(*)", then you can use $1 .. $9 in
# command line to substitute actual arguments passed from server.
#
# Examples:
# ExternalParameter = Test:echo test
# ExternalParameter = LineCount(*):cat $1 | wc -l
# ExternalParameter = Test2(*):myprog $1 $2

#
# ExternalParameterShellExec
#
# Add parameter handled by external command. To add multiple parameters, you
# should use multiple ExternalParameterShellExec entries. This is similar
# to ExternalParameter with exception that agent will use shell to execute
# specified command instead of system process exeution API. This difference
# presented only on Windows system, on other systems ExternalParameter and
# ExternalParameterShellExec behaves identically.
#
# Syntax:
# ExternalParameterShellExec = <parameter_name>:<command_line>
# If you specify parameter name as "name(*)", then you can use $1 .. $9 in
# command line to substitute actual arguments passed from server.
#
# Examples:
# ExternalParameterShellExec = Test:dir c:\ | wc -l
#3
I forgot to mention, this is the output from the configuration poll

[25.03.2015 22:17:34] **** Poll request sent to server ****
[25.03.2015 22:17:34] Poll request accepted
[25.03.2015 22:17:34] Starting configuration poll for node ClientX
[25.03.2015 22:17:34] Checking node's capabilities...
[25.03.2015 22:17:34]    Checking NetXMS agent...
[25.03.2015 22:17:35]    Checking SNMP...
[25.03.2015 22:17:49] Capability check finished
[25.03.2015 22:17:49] Checking interface configuration...
[25.03.2015 22:17:49] Unable to get interface list from node
[25.03.2015 22:17:49]    Interface "unknown" is no longer exist
[25.03.2015 22:17:49] Interface configuration check finished
[25.03.2015 22:17:49] Checking node name
[25.03.2015 22:17:49] Node name is OK
[25.03.2015 22:17:49] Finished configuration poll for node ClientX
[25.03.2015 22:17:49] Node configuration was not changed after poll
[25.03.2015 22:17:49] **** Poll completed successfully ****
#4
Since there is no agent available for raspberry pi, I thought I'd give it a shot, and I tried to compile it myself. After reading a few forum posts, I run the following commands to compile the agent.

wget https://www.netxms.org/download/netxms-2.0-M2.tar.gz
tar -zxvf netxms-2.0-M2.tar.gz
apt-get update
apt-get install -y libssl-dev
cd netxms-2.0-M2/
./configure --with-agent --libdir=/usr/lib --disable-iconv
make
make install
cp netxms-2.0-M2/contrib/nxagentd.conf-dist /etc/nxagentd.conf
/usr/local/bin/nxagentd –D 9


Everything run without any errors, I only had to create the file /var/netxms/registry.dat because I was getting some errors that it didn't exist. After I created it, the agent run flawlessly.

My problem is that I can't get the agent to talk to the NetXMS server. I've entered the server's IP Address in /etc/nxagentd.conf as a master server, but no luck.

This is the output of the agent when I run it.

root@ClientX:/var/netxms# /usr/local/bin/nxagentd -D 9
[25-Mar-2015 22:26:51.282] [INFO ] Additional configs was loaded from /etc/nxagentd.conf.d
[25-Mar-2015 22:26:51.284] [INFO ] Debug level set to 9
[25-Mar-2015 22:26:51.285] [DEBUG] Data directory: /var/netxms
[25-Mar-2015 22:26:51.287] [DEBUG] Subagent API initialized
[25-Mar-2015 22:26:51.297] [DEBUG] Validating ciphers
[25-Mar-2015 22:26:51.300] [DEBUG]    AES-256 enabled
[25-Mar-2015 22:26:51.302] [DEBUG]    Blowfish-256 enabled
[25-Mar-2015 22:26:51.303] [DEBUG]    IDEA disabled (config)
[25-Mar-2015 22:26:51.304] [DEBUG]    3DES enabled
[25-Mar-2015 22:26:51.305] [DEBUG]    AES-128 enabled
[25-Mar-2015 22:26:51.307] [DEBUG]    Blowfish-128 enabled
[25-Mar-2015 22:26:51.309] [DEBUG] Crypto library initialized
[25-Mar-2015 22:26:52.427] [DEBUG] Linux: using /sys/block to distinguish devices from partitions
[25-Mar-2015 22:26:52.432] [DEBUG] Unable to parse /proc/drbd, DRBD data collector will not start
[25-Mar-2015 22:26:52.437] [DEBUG] ParseIoStat(): new device added (name=ram0 isRealDevice=1)
[25-Mar-2015 22:26:52.440] [DEBUG] ParseIoStat(): new device added (name=ram1 isRealDevice=1)
[25-Mar-2015 22:26:52.446] [DEBUG] ParseIoStat(): new device added (name=ram2 isRealDevice=1)
[25-Mar-2015 22:26:52.449] [DEBUG] ParseIoStat(): new device added (name=ram3 isRealDevice=1)
[25-Mar-2015 22:26:52.450] [DEBUG] ParseIoStat(): new device added (name=ram4 isRealDevice=1)
[25-Mar-2015 22:26:52.452] [DEBUG] ParseIoStat(): new device added (name=ram5 isRealDevice=1)
[25-Mar-2015 22:26:52.453] [INFO ] Subagent "linux.nsm" loaded successfully
[25-Mar-2015 22:26:52.454] [DEBUG] Debug callback set for DB library
[25-Mar-2015 22:26:52.456] [DEBUG] ParseIoStat(): new device added (name=ram6 isRealDevice=1)
[25-Mar-2015 22:26:52.458] [DEBUG] ParseIoStat(): new device added (name=ram7 isRealDevice=1)
[25-Mar-2015 22:26:52.460] [DEBUG] ParseIoStat(): new device added (name=ram8 isRealDevice=1)
[25-Mar-2015 22:26:52.461] [DEBUG] ParseIoStat(): new device added (name=ram9 isRealDevice=1)
[25-Mar-2015 22:26:52.463] [DEBUG] ParseIoStat(): new device added (name=ram10 isRealDevice=1)
[25-Mar-2015 22:26:52.464] [DEBUG] ParseIoStat(): new device added (name=ram11 isRealDevice=1)
[25-Mar-2015 22:26:52.466] [DEBUG] ParseIoStat(): new device added (name=ram12 isRealDevice=1)
[25-Mar-2015 22:26:52.467] [DEBUG] ParseIoStat(): new device added (name=ram13 isRealDevice=1)
[25-Mar-2015 22:26:52.469] [DEBUG] ParseIoStat(): new device added (name=ram14 isRealDevice=1)
[25-Mar-2015 22:26:52.470] [DEBUG] ParseIoStat(): new device added (name=ram15 isRealDevice=1)
[25-Mar-2015 22:26:52.472] [DEBUG] ParseIoStat(): new device added (name=loop0 isRealDevice=1)
[25-Mar-2015 22:26:52.473] [DEBUG] ParseIoStat(): new device added (name=loop1 isRealDevice=1)
[25-Mar-2015 22:26:52.475] [DEBUG] ParseIoStat(): new device added (name=loop2 isRealDevice=1)
[25-Mar-2015 22:26:52.476] [DEBUG] ParseIoStat(): new device added (name=loop3 isRealDevice=1)
[25-Mar-2015 22:26:52.478] [DEBUG] ParseIoStat(): new device added (name=loop4 isRealDevice=1)
[25-Mar-2015 22:26:52.479] [DEBUG] ParseIoStat(): new device added (name=loop5 isRealDevice=1)
[25-Mar-2015 22:26:52.481] [DEBUG] ParseIoStat(): new device added (name=loop6 isRealDevice=1)
[25-Mar-2015 22:26:52.482] [DEBUG] ParseIoStat(): new device added (name=loop7 isRealDevice=1)
[25-Mar-2015 22:26:52.484] [DEBUG] ParseIoStat(): new device added (name=mmcblk0 isRealDevice=1)
[25-Mar-2015 22:26:52.485] [DEBUG] ParseIoStat(): new device added (name=mmcblk0p1 isRealDevice=0)
[25-Mar-2015 22:26:52.487] [DEBUG] ParseIoStat(): new device added (name=mmcblk0p2 isRealDevice=0)
[25-Mar-2015 22:26:53.457] [DEBUG] External parameters providers poller thread will not start
[25-Mar-2015 22:26:53.458] [DEBUG] Session agent connector disabled
[25-Mar-2015 22:26:53.461] [DEBUG] Trying to bind on 0.0.0.0:4700
[25-Mar-2015 22:26:53.462] [INFO ] Listening on socket 0.0.0.0:4700
[25-Mar-2015 22:26:54.462] [INFO ] NetXMS Agent started
Agent running. Press Ctrl+C to shutdown.


Any idea why the agent is not communicating with the server? I'm I missing something here? Or I'm I in over my head?
#5
Can you please create an agent for arm processors?
I could really use one for the raspberry pi.

Thanks