Debian package installation [SOLVED]

Started by sperlm, July 04, 2014, 01:18:08 PM

Previous topic - Next topic

sperlm

Hello, after some reconsiderations we decided to try installing NetXMS on Debian from packages.

- made fresh Debian installation
- updated apt, dist-upbrade, configured ssh, iptables
- installed mysql and set up DB for NetXMS
- added "deb https://www.netxms.org/apt wheezy main" to sources.list
- tried to install NetXMS (apt-get install netxms-agent netxms-server netxms-server-mysql netxms-base)

And this is where my problems start, I am not fully used to debian and packages installation so this is where the problem might lie but I have got questions that need to be answered:

1) how can I add options to apt-get install command to specify the configuration ? (is it needed ?)
--with-server --with-mysql (--with-agent) --prefix=/opt/netxms
(never added the --with-agent option, is it really needed ? always had the agent anyway)

2) where can I get sample config files ? (I suppose these should be present in contrib directory, but there is no such)
- is copy from old installation safe option ? (without fear something was changed in newer versions)

3) is it safe to migrate only some DBs from old installation if we want to keep only list of found IPs with old IDs so that we can later import old network maps and hierarchy structure for example ?

Can you please help me by answering these questions?
(the third one is not mandatory, will experiment on it as soon as I get the server running)

With regards,

Milan Sperl

edit: the server is up and running, questions still stand (are there options available when installing via packages?, where to get up-to-date config files and how to migrate only infrastructure + network maps)

p.s. for testing purposes I need block all netxms comunication going outside, is it sufficient to block only outgoing ports 161 and 162 ?

Victor Kirhenshtein

Hi!

Quote from: sperlm on July 04, 2014, 01:18:08 PM
1) how can I add options to apt-get install command to specify the configuration ? (is it needed ?)
--with-server --with-mysql (--with-agent) --prefix=/opt/netxms
(never added the --with-agent option, is it really needed ? always had the agent anyway)

It's not possible. Debian packages are pre-built binary packages. You select database option by installing appropriate package (netxms-server-mysql, netxms-server-pgsql, netxms-server-odbc, or netxms-server-oracle).

Quote from: sperlm on July 04, 2014, 01:18:08 PM
2) where can I get sample config files ? (I suppose these should be present in contrib directory, but there is no such)
- is copy from old installation safe option ? (without fear something was changed in newer versions)

It is not recommended to mix manually built binaries with pre-built binaries. It may work and may not work. But all necessary binaries should be included into debian packages. Samle configs seems to be missing from deb packages, it's just was forgotten. We will fix that.

Quote from: sperlm on July 04, 2014, 01:18:08 PM
3) is it safe to migrate only some DBs from old installation if we want to keep only list of found IPs with old IDs so that we can later import old network maps and hierarchy structure for example ?

You won't be able to do that without manually tweaking database or creating own migration tools. You can either migrate whole database and then clean it up or start from scratch. However, you can use Java API or nxshell to create a tool that will connect to old and new servers and migrate only data you need. Also, you can export event definitions, SNMP trap definitions, event processing rules, templates, and dashboards from old system and import into new system.

Quote from: sperlm on July 04, 2014, 01:18:08 PM
p.s. for testing purposes I need block all netxms comunication going outside, is it sufficient to block only outgoing ports 161 and 162 ?

For SNMP you have to block UDP port 161 (162 is for incoming traps, so server only listens on it), and TCP port 4700 for communications with agents. Also you might want to block outgoing ICMP echo requests.

Best regards,
Victor

sperlm

Hello, thanks for the clarifications.

As for
1) I used "apt-get install netxms-agent netxms-server netxms-server-mysql netxms-base", and it installed nicely with agent and mysql backend so my question was if the options are needed at all.
SOLVED

2) yes, that was the question - deb packages were missing sample config files so I copied the ones I had from previous instalation and the question was if the config files are persistent so the copy is safe way of getting it right. It works so I suppose it is safe
SOLVED

3) yes, we have full backup of old DB with MySQL Admin which has very simple output which allows us to select parts to restore, there should not be problem with selecting and restoring parts of the DB
- the question is if we can get to migrate "just" hierarchy and network maps
- as these are dependent on IDs of discovered nodes this all boils down to - how to migrate discovered nodes
- everything else is nicely visible in the DB and can be "copy-pasted" many ways, there is no problem migrating scripts, events, rules, filters, templates...
- I would like to avoid migrating whole database for the purpose of "fresh" start as I think the old one might have too many unnecessary parts which caused troubles in the past

That should get us started on new machine all over again.


Thanks for your support, very appreciated.
With regards,

Milan Sperl

Victor Kirhenshtein

Quote from: sperlm on July 07, 2014, 02:05:23 PM
3) yes, we have full backup of old DB with MySQL Admin which has very simple output which allows us to select parts to restore, there should not be problem with selecting and restoring parts of the DB
- the question is if we can get to migrate "just" hierarchy and network maps
- as these are dependent on IDs of discovered nodes this all boils down to - how to migrate discovered nodes
- everything else is nicely visible in the DB and can be "copy-pasted" many ways, there is no problem migrating scripts, events, rules, filters, templates...
- I would like to avoid migrating whole database for the purpose of "fresh" start as I think the old one might have too many unnecessary parts which caused troubles in the past

To migrate only nodes and containers you can try to import the following tables:

nodes
interfaces
network_services
vpn_connectors
vpn_connector_networks
containers
container_members
trusted_nodes
items
dc_tables
dc_table_columns
dct_column_names
dct_thresholds
dct_threshold_conditions
dci_schedules
raw_dci_values
thresholds
object_custom_attributes
object_properties

and all tables with names started with idata_ or tdata_.

Tricky part is object_properties and object_custom_attributes tables - you should delete any records with object_id not in nodes, interfaces, network_services, vpn_connectors, and containers tables.

Best regards,
Victor

sperlm

Hello, just to close this topic:

tried several scenarios with importing fewer tables, or without the xdata_
- ended up with various levels of "desired result", all lacking (mainly missing functional maps)

about the "tricky part"... was not worth the hassle  :-\
- simply recreated everything from scratch

Now we have nice and tidy fresh setup (hope it stays that way).

Just a question regarding system requirements - previous installation had 2G RAM, new one has only 1G. Would you suggest adding more ?
Considering on both setups we had (have) "problems" with Tomcat webservice hanging now and then (when it literally inflates ram usage (and eventually hits swap file) for no reason).

Right now NetXMS stats with final number of objects:
Total number of objects:     23413
Number of monitored nodes:   918
Number of collectable DCIs:  928

CPU E31220 @ 3.10GHz

Memory at the moment:
MemTotal:        1027020 kB
MemFree:           69964 kB
Buffers:           13112 kB
Cached:           181620 kB
SwapCached:        11516 kB

Using virtual server, right now I'm considering adding up to more than 2GB RAM, not sure if it helps or not though.

With regards,

Milan Sperl

Victor Kirhenshtein

Hi,

if Tomcat is on same server I would definitely suggest add more RAM. I would give 1GB to Tomcat alone. For netxmsd 1 GB is more then enough. You may also move Tomcat to separate machine if you want to isolate it and prevent it from accidentally affecting netxmsd.

Best regards,
Victor

sperlm

Thanks, one last question (I know it is not about Debian anymore but I do not want to create unnecessary topics, or should I?).

Is it possible to create standalone page showing one dashboard ?
- either by autologin pointing directly to the needed dashboard
- or by configuring webpage itself to display dashboard using present Tomcat
(though I am not sure if I can do such a thing and definitely need some pointers...)

I was kind of hoping something like this was already discussed but did not find any clue on the forum.

With regards

Milan Sperl

Victor Kirhenshtein

Currently it's not possible with web UI. For 1.2.17 I've added new command line / URL option "dashboard=" to both desktop and web console to automatically open given dashboard (specified by dashboard object ID or name). It is already described in Autologin for Management Console on our wiki.

Best regards,
Victor