<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.apoyar.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=152.57.23.64</id>
	<title>Apoyar Wiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.apoyar.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=152.57.23.64"/>
	<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Special:Contributions/152.57.23.64"/>
	<updated>2026-07-21T04:12:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.apoyar.eu/index.php?title=Adding_Linux_Host_in_Nagios&amp;diff=156</id>
		<title>Adding Linux Host in Nagios</title>
		<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Adding_Linux_Host_in_Nagios&amp;diff=156"/>
		<updated>2021-02-03T06:36:13Z</updated>

		<summary type="html">&lt;p&gt;152.57.23.64: Created page with &amp;quot;Adding Unix host to Nagios:   1.	Connect to Nagios server  #cd /usr/local/etc/nagios/objects/machines         #vi apoyar.cfg (depending on whether we are adding host for Apoya...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adding Unix host to Nagios:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.	Connect to Nagios server&lt;br /&gt;
&lt;br /&gt;
#cd /usr/local/etc/nagios/objects/machines&lt;br /&gt;
&lt;br /&gt;
       #vi apoyar.cfg (depending on whether we are adding host for Apoyar or other customers)&lt;br /&gt;
&lt;br /&gt;
2.	We did for apoyar unix server hostname (test-Linux)&lt;br /&gt;
&lt;br /&gt;
3.	Copy the configuration format for linux server added before and e.dit the hostname and address for new host.&lt;br /&gt;
&lt;br /&gt;
4.	Add the host name in member list to recognize Nagios probe for checks&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Save file (:wq!) and exit vi editor&lt;br /&gt;
 &lt;br /&gt;
Go to below path&lt;br /&gt;
 &lt;br /&gt;
• cd /usr/local/etc/nagios/objects&lt;br /&gt;
 &lt;br /&gt;
• vi services.cfg&lt;br /&gt;
&lt;br /&gt;
5.	Add the new hostname to the services, which we need for new server in Nagios, for those services, which we need to monitor.&lt;br /&gt;
&lt;br /&gt;
6.	Go to that particular service configuration and enter new server name manually&lt;br /&gt;
 &lt;br /&gt;
Save file (:wq!) and exit vi editor&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
	Host machine should ping from Nagios server to confirm that servers are communicating each other.&lt;br /&gt;
&lt;br /&gt;
	One more thing that it can be SSH to test-Linux server from Nagios server without password.&lt;br /&gt;
&lt;br /&gt;
7.	Connect from test-Linux server from Nagios server using Nagios user account with password.&lt;br /&gt;
&lt;br /&gt;
8.	If user account is existing in test-Linux server it will access else it will not (due to Nagios user account doesn’t exist) &lt;br /&gt;
&lt;br /&gt;
9.	Once configuration changes done on Nagios server, connect machine which you are adding to Nagios (test-Linux) server.&lt;br /&gt;
&lt;br /&gt;
10.	Need to create user name with home folder for user&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#adduser nagios&lt;br /&gt;
&lt;br /&gt;
Set password for nagios to access from Nagios server &lt;br /&gt;
&lt;br /&gt;
#password nagios&lt;br /&gt;
&lt;br /&gt;
#cd /home/nagios&lt;br /&gt;
&lt;br /&gt;
#mkdir .ssh&lt;br /&gt;
&lt;br /&gt;
#mkdir bin&lt;br /&gt;
&lt;br /&gt;
11.	After that need to change owner of those folder which is created by root.&lt;br /&gt;
&lt;br /&gt;
#chown nagios:nagios .ssh/ -R&lt;br /&gt;
&lt;br /&gt;
#chown nagios:nagios bin –R&lt;br /&gt;
&lt;br /&gt;
12.	Run below command from Nagios server to copy public key file to access server password authentication less.&lt;br /&gt;
&lt;br /&gt;
#scp .ssh/id_rsa.pub user@remotehost:~/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
13.	Once key file copied into test-Linux server.&lt;br /&gt;
&lt;br /&gt;
14.	Need to install nagios packages on host machine&lt;br /&gt;
&lt;br /&gt;
#dpkg –l | grep nagios # to check which packages to be installed&lt;br /&gt;
&lt;br /&gt;
Monitoring-plugins&lt;br /&gt;
&lt;br /&gt;
Nagios-plugins&lt;br /&gt;
&lt;br /&gt;
Using below commands&lt;br /&gt;
&lt;br /&gt;
# apt-get install nagios-plugins&lt;br /&gt;
&lt;br /&gt;
# apt-get install monitoring-plugins&lt;br /&gt;
&lt;br /&gt;
15.	But we don’t copy those checks files into bin folder, because whenever doing updates it will use latest versions of plugins it will create on &lt;br /&gt;
issue. So just will create soft links from actual installed folder to newly created bin folder on Nagios folder path.&lt;br /&gt;
&lt;br /&gt;
# ln –s /usr/lib/nagios/plugins/check_load /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
# ln –s /usr/lib/nagios/plugins/check_users /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
# ln –s /usr/lib/nagios/plugins/check_uptime /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
# ln –s /usr/lib/nagios/plugins/check_disk /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
# ln –s /usr/lib/nagios/plugins/check_swap /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
# ln –s /usr/lib/nagios/plugins/check_procs /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
16.	After that we need to copy some files from nagios server plugins folder path to hosted server into bin folder.&lt;br /&gt;
Connect nagios server&lt;br /&gt;
&lt;br /&gt;
#su – nagios&lt;br /&gt;
&lt;br /&gt;
#cd plugins&lt;br /&gt;
&lt;br /&gt;
#scp check_debian_packages check_mem.pl check_uptime.sh test-Linux:/home/nagios/bin&lt;br /&gt;
&lt;br /&gt;
Once all these done change Nagios user account password on test-Linux server which we don’t use future as well it is more secure with password generator.&lt;br /&gt;
&lt;br /&gt;
17.	It will start checking service checks. If you want to add more services for monitoring like, Nginx, php, disk io status.&lt;br /&gt;
&lt;br /&gt;
18.	Copy check files from nagios server to test-Linux server bin path like above.&lt;br /&gt;
&lt;br /&gt;
#scp check_nginx_status.pl check_phpfpm_status.pl check_diskio.pl test-Linux:/home/nagios/bin&lt;br /&gt;
&lt;br /&gt;
19.	Once copied into test-Linux sevrer&lt;br /&gt;
&lt;br /&gt;
Execute those files&lt;br /&gt;
&lt;br /&gt;
# cd /home/nagios/bin&lt;br /&gt;
&lt;br /&gt;
#./check_nginx_status.pl       # .pl extension means perl programing language&lt;br /&gt;
&lt;br /&gt;
#./check_phpfpm_status.pl&lt;br /&gt;
&lt;br /&gt;
#./check_diskio.pl  # might be it will throw errors which is not installed supporting packages.&lt;br /&gt;
&lt;br /&gt;
Error will be Array/unique.pm missing&lt;br /&gt;
&lt;br /&gt;
# apt-cache search perl number::format             # to find pm extension packages list search using the above command format.&lt;br /&gt;
&lt;br /&gt;
# apr-cache search perl array::unique&lt;br /&gt;
&lt;br /&gt;
It will list package names and install it that.&lt;br /&gt;
&lt;br /&gt;
Similar way finds the missing packages and install it until there are no errors reported.&lt;br /&gt;
&lt;br /&gt;
# apt-get install libarray-unique-perl&lt;br /&gt;
&lt;br /&gt;
# ./check_diskio.pl     # without any error message it has to execute.&lt;br /&gt;
&lt;br /&gt;
20.	If Host server is using multi cores we have to copy check_cpu.py file from nagios to test-linux server&lt;br /&gt;
&lt;br /&gt;
#cd /home/nagios/bin/&lt;br /&gt;
&lt;br /&gt;
#. /check_cpu.py                   # py extension means python packages&lt;br /&gt;
&lt;br /&gt;
If the errors are reporting due to missing python packages install it.&lt;br /&gt;
&lt;br /&gt;
# apt-get install python-psutil&lt;br /&gt;
&lt;br /&gt;
Then it will be ok to monitor multiple cores which we did for Bleckmann MySQL which is having 32 cores.&lt;/div&gt;</summary>
		<author><name>152.57.23.64</name></author>
	</entry>
	<entry>
		<id>https://wiki.apoyar.eu/index.php?title=Main_Page&amp;diff=155</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Main_Page&amp;diff=155"/>
		<updated>2021-02-03T06:33:30Z</updated>

		<summary type="html">&lt;p&gt;152.57.23.64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Apoyar Wiki main page.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Infrastructure|Apoyar Infrastructure]]&lt;br /&gt;
* [[Complete step-by-step guides]]&lt;br /&gt;
* [[Developer guides]]&lt;br /&gt;
* [[Tips &amp;amp; Tricks]]&lt;br /&gt;
* [[Miscellaneous Information]]&lt;br /&gt;
* [[Installing Updates on Hyper V servers]]&lt;br /&gt;
* [[Connecting RDP servers, if license expired and extending grace period via regedit]]&lt;br /&gt;
* [[Website Hosting &amp;amp; SSL certificate installation]]&lt;br /&gt;
* [[Email Configuration and Issues (Windows)]]&lt;br /&gt;
* [[SSL Certification for Websites]]&lt;br /&gt;
* [[Installing SSL Certificate for Website on Linux &amp;amp; Windows]]&lt;br /&gt;
* [[Low Free Disk Space Issues (Windows, Linux, UNIX) &amp;amp; Resolution]]&lt;br /&gt;
* [[Zeb Live DB Restore Task]]&lt;br /&gt;
* [[Adding Windows Host in Nagios]]&lt;br /&gt;
* [[Adding Linux Host in Nagios]]&lt;/div&gt;</summary>
		<author><name>152.57.23.64</name></author>
	</entry>
</feed>