/
Provisioning a new "Scaleworks" box for Nagios

Provisioning a new "Scaleworks" box for Nagios

Steps remain same till "Add the environment variables" /wiki/spaces/BAH/pages/18415622

After that,

1.) Add the environment variables

  • /root/.bashrc
  • export FACTER_bahmni_user_name=bahmni
  • export FACTER_implementation_name=default
  • export FACTER_bahmni_nagios_server_ip=<the machine ip in which nagios is installed>
  • export FACTER_bahmni_nagios_machine_type="server"
  • export FACTER_bahmni_active_machine_ip=<active machine ip>
  • export FACTER_bahmni_active_machine_host_name=<Active host name>
  • export FACTER_bahmni_support_email=<support mail id>
  • export FACTER_db_server_ip=<server in which mysql is present>
  • ----optional ---
    • export FACTER_bahmni_passive_machine_ip=<passive machine ip>
    • export FACTER_bahmni_passive_machine_host_name=<passive host name>

2.) Create the logs folder

  • sudo mkdir -p /bahmni_temp/logs

3.) ** Only if Nagios is installed in a separate machine (not in active/passive) **

  • useradd <same value as FACTER_bahmni_user_name>
  • passwd <same value FACTER_bahmni_user_name>
  • add this user to /etc/sudoers

4.) Run puppet Module

  • scripts/run-puppet-module.sh bahmni_nagios
  • if there are any errors check if config is fine - /usr/bin/nagios -v /etc/nagios/nagios.cfg

5.) ** Only if Nagios is installed in a separate machine (not in active/passive) **: Step to open ports for nagios to check services

  • sudo iptables -I INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
  • sudo service iptables save
  • sudo iptables -I INPUT -p tcp -m tcp --dport 5666 -j ACCEPT
  • sudo service iptables save

6.) Run the below command to set the password for nagiosadmin (Set password to nagiosadmin)

  • htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

7.) Restart httpd

  • service httpd restart

8.) Access https://<ip of machine in which nagios is installed>/nagios  and access it with the password set above.

9.) Edit pb_hba.conf (on db server) to add FACTER_bahmni_nagios_server_ip

10.) Install postgres

  • yum install postgresql92

 


-----------------------------------------------

Set up clients for Nagios to monitor:

1.) Add environmental variables:

  • /root/.bashrc
  • export FACTER_bahmni_nagios_server_ip=<the machine ip in which nagios is installed>
  • export FACTER_bahmni_nagios_machine_type="client"
  • export FACTER_bahmni_active_machine_ip=<active machine ip>
  • export FACTER_bahmni_active_machine_host_name=<Active host name>
  • ----optional ---
    • export FACTER_bahmni_passive_machine_ip=<passive machine ip>
    • export FACTER_bahmni_passive_machine_host_name=<passive host name>

2.) Run puppet Module

  • scripts/run-puppet-module.sh bahmni_nagios
  • if there are any errors check if config is fine - /usr/bin/nagios -v /etc/nagios/nagios.cfg

 

In /etc/nagios/objects/localhost.cfg, change the Active, Passive Ips






 

Related content

Production (or test) environment setup
Production (or test) environment setup
More like this
Environment Variables to be set for Implementation
Environment Variables to be set for Implementation
More like this
Setting up monitoring with Prometheus and Grafana
Setting up monitoring with Prometheus and Grafana
More like this
Frequently Asked Questions(FAQs) - Bahmni Mart
Frequently Asked Questions(FAQs) - Bahmni Mart
More like this
Bahmni-Mart Configuration (docker)
Bahmni-Mart Configuration (docker)
More like this
Bahmni Mart Installation Setup
Bahmni Mart Installation Setup
More like this

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)