Author Topic: NetXMS cluster configuration  (Read 12569 times)


  • Newbie
  • *
  • Posts: 25
    • View Profile
NetXMS cluster configuration
« on: February 14, 2013, 05:47:53 pm »
Just wanted to share how to configure a NetXMS cluster (on Ubuntu in my case).
I've used DRBD + Corosync + Pacemaker to do this, the underlying database is PostgreSQL, although it is not much different for any other database.
I won't describe how to configure DRBD and Corosync here, there are a lot of materials in the Web about this. I used this, it is very thorough. Only change that I did, is that I restarted corosync on both nodes after configuration.

So assume you configured DRBD and have NetXMS installed. First you need to get netxms LSB-compatible init script. Good that it is already exist in the .deb packages on the site. We just need to make some changes in it (I attached the script to the post).
1. Add -e to the DAEMON_ARGS parameter like this DAEMON_ARGS="-d -e -D 5". -e option will automatically unlock the database locked by previous primary server.
2. Change path to the netxmsd in the DAEMON=/usr/local/bin/$NAME
Now that init script is ready place it in the /etc/init.d/ . Don't forget to make it executable (chmod +x /etc/init.d/netxmsd)

With that done we can create a crm primitive for netxms:
Code: [Select]
crm configure primitive netxmsd_lsb lsb:netxmsd \
        op monitor interval="30" timeout="60" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60" \
        meta target-role="Started"

This primitive needs to be added to our crm group. That is easy.
Code: [Select]
crm(live)# cib new fixgroup
crm(live)# configure delete PGServer
crm(live)# configure group PGServer pg_lvm pg_fs pg_lsb pg_vip netxmsd_lsb
crm(live)# cib commit fixgroup
crm(live)# quit

And that's all. You have working NetXMS cluster now.