PG detect script probes the cluster from the database server that is the primary database for Siemplify servers. This keeps Siemplify servers updated. The script has a parameter that stores the value of the primary database. The script updates when the primary database changes.

  1. Edit siemplify_pg_detect.sh by updating the following details before exit :set ff=unix.
    1. V_SERVER_NODE_1=”{primary_db_ip}”
    2. V_SERVER_NODE_2=”{slave_db_ip}”
    3. PRIMARY_NODE_1=$(PGPASSWORD={Your_Password_Here} psql -t -h $V_SERVER_NODE_1 -p 5432 -d postgres -U repuser -c “select conninfo from repmgr.nodes where type = ‘primary’ and active = ‘true’” | xargs)
    4. PRIMARY_NODE_2=$(PGPASSWORD={Your_Password_Here} psql -t -h $V_SERVER_NODE_2 -p 5432 -d postgres -U repuser -c “select conninfo from repmgr.nodes where type = ‘primary’ and active = ‘true’” | xargs)
  1. Once the file is updated, upload HA APP rpms.zip and siemplify_pg_detect.sh to both apps machines.
  1. Unzip HA APP rpms.zip and install the rpms on both apps machines.
    1. Unzip HA APP rmps.zip using the command:
      unzip HA APP rpms.zip
    2. Continue to install the rpms using the command:
      yum install postgresql10*P
  2. Configure the crontab job on both app machines with the following commands. Change to “root” user to execute the commands for the siemplify_pg_detect.sh script to run:
    chmod +x /home/siemplify/siemplify_pg_detect.sh
    crontab -l > /root/tmpjobs
    echo reboot /home/siemplify/siemplify_pg_detect.sh >> /root/tmpjobs
    crontab /root/tmpjobs
    rm -f /root/tmpjobs
    reboot – both nodes
  1. Verify that the process was completed successfully using the command:
    ps -aux | grep siemplify*

Need more help with this?
Click here to open a Support ticket

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.