Changes

Jump to: navigation, search

How to Setup and configure Nagios

1,280 bytes added, 16:17, 27 November 2010
no edit summary
== 4.0 IRC Notification Bot Configuration (Server configuration) ==
<pre>Note: please keep in mind this was done on Fedora 13 with Nagios 3.2.3 and NagIRCBot 0.0.30.</pre>
1. Become the root user.  <code>su – </code> 2. Install edition packages. <code>yum install openssl-devel </code> <code>yum nstall gcc </code> 3. After unpacking the tarball, in the make file you must change the following line: from:  <code>LDFLAGS+=$(DEBUG) -lssl -lstdc++ </code> to:  <code>LDFLAGS+= $(DEBUG) -lssl -lstdc++ -lcrypto </code> 4. When you change the make file from the step 3, issue make/make install. <code>make</code> <code>make install</code> 5. Once its installed you can start up nagircbot: <code>nagircbot -f /var/log/nagios/status.dat -s irc.freenode.net:6667 -c \#mathon -C -n test22283833 -u ident -U realname -I 900 </code> 6. Lets examine the command from step 5, which will be the main command for starting nagircbot: /var/log/nagios/status.dat Points to the log file it will readirc.freenode.net:6667 IRC servermathon Channel nameThe "-C" flag Allows it to send colored messagestest22283833 IRCnicknameident/realname The ident and real name string for the bot-I 900 How often to send a message to the channel in this case its 15min (900 seconds)         == 5.0 Client Installation ==
'''45.1 Create Account Information on Client Machine'''
SSH to Iraq machine (142.204.133.98) and issue the following commands:
<code>make install-plugin</code>
'''45.2 Compile and Configure Nagios Plugins'''
<pre>
<code>service xinetd start</code>
'''45.3 Downlad and Install NRPE Daemon'''
1. Create a forlder ~/Nagios/Nagios_NRPE.
<code>cd nrpe-2.12</code>
'''45.4 Compile and Configure NRPE'''
1. Install NRPE:
<code>make install-xinetd</code>
'''45.5 Post NRPE Configuration'''
1. Edit Xinetd NRPE entry:
<code>service xinetd restart</code>
'''45.6 Test NRPE Daemon Install'''
1. Check NRPE daemon is running and listening on port 5666:
<pre>NRPE v2.12</pre>
'''45.7 Open Port 5666 on Firewall'''
<pre>Note: Make sure to open port 5666 on the firewall of the remote server so that the Nagios monitoring server can access the NRPE daemon.
<code>service iptables save</code>
'''45.8 Congratulations'''
Congratulations! You have successfully completed the configuration of the Nagios Server/Client setup.
== 56.0 Demonstration ==
[[File:Network map.jpg|200px|thumb|left|Network map]]
1
edit

Navigation menu