Steps to Add Machines to Icinga/Nagios

Steps to Add Machines to Icinga/Nagios

1.     Log onto root@nagios.starp.bnl.gov

2.     Go to /root/bin/icinga to see the icinga_script.pl and subdirectories

3.     The /root/bin/icinga/services/parameters file holds the parameters for each node. The icinga_script.pl reads through the file and uses the ‘:’ to split the lines and creates configuration files in the needed format.
         The 1’s and 0’s are on and off switches. See the /root/bin/icinga/README file and you will see what each section specifies.

README

Ip Address : Hostname : Cpu  : Procs : Users : Ping : SSH : Root : Scratch : SWAP : NTP : SMART_ATA : SMART_SCSI

 

Parameters file

130.199.60.12:onl01.starp.bnl.gov:1:1:1:1:1:1:1:1:1:1

 

4.     Once you have added your machine(s) as noted. Run /root/bin/icinga/icinga_script.pl

(This is an example of the output)

This script will create new configuration files for Icinga
The files will be placed in /etc/icinga/servers.

 

***Curent configuration files are good :)***
Recommended to backup! 

Would you like to backup the current configuration files in /etc/icinga/servers to /etc/icinga/old_configs?
Everything in /etc/icinga/old_configs will be overwritten. 

(If the current configuration files are bad this is not a good idea.) Y|N|Q: y 

Copying current configuration files to /etc/icinga/old_configs...
Creating new configuration files...
New configuration files created... 

Things look okay - No serious problems were detected during the pre-flight check 

Everything looks good!

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

Everything looks good!

Would you like to restart Icinga? Y|N: y

Restarting Icinga service.

Running configuration check...OK

Stopping icinga: .Stopping icinga done.

Starting icinga: Starting icinga done.

 

Notes:

5.     When the script asks if you would like to “backup” the current configuration files, it will overwrite anything in the current backup directory (/etc/icinga/old_configs). If you do not want to create a backup of the files, enter N

6.     If there are problems with the new configuration files, the script will check if there is a problem and will prompt you if you would like to put the old configuration files back. If there are still problems with the configuration files, the script will show you how to further troubleshoot. If everything is good, the script will ask you if you would like to restart the Icinga service. Now check the web interface and watch the node you added propagate.