Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Category:Spi Nagios
Category
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[category: Spi Nagios ]] == Spi Nagios Client Configuration == == Client Configuration == Install Rpmforge Epelrepo #mkdir /downloads #cd /downloads #wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm #rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rp #wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm #wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm #rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm # vim /etc/yum.repos.d/remi.repo enable 1 #yum install nrpe nagios-plugins-all #vim /etc/nagios/nrpe.cfg allowed_hosts=127.0.0.1, your nagios server ip command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10 command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 command[check_disk_space]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -X tmpfs command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z command[check_cpu]=/usr/lib64/nagios/plugins/check_cpu.sh -w 20 -c 60 command[check_zimbra_queue]=/usr/lib64/nagios/plugins/check_zimbra_queue -w 30 -c 60 command[check_mem_avail]=/usr/lib64/nagios/plugins/check_mem_avail -w 20 -c 10 command[check_pop]=/usr/lib64/nagios/plugins/check_pop -w 10 -c 20 command[check_smtp]=/usr/lib64/nagios/plugins/check_smtp -w 10 -c 20 command[check_imap]=/usr/lib64/nagios/plugins/check_imap -w 10 -c 20 command[check_zimbra_lmtp]=/usr/lib64/nagios/plugins/check_smtp -H localhost -p 7025 -e '220 spimail.spi.com Zimbra LMTP server ready' Note: define all plugin in above given path. # chmod nagios.nagios /usr/lib64/nagios/plugins -R Now restart nrpe service == Server configuration == #vim /usr/local/nagios/etc/objects/linux-box.cfg == Define client details == define host{ use linux-server host_name spimail.spi.com alias Spi Mail Server address 64.128.141.50 hostgroups Tetra Clients ; Host groups } #cd ../services #vim spimail.spi.com.cfg define service{ use generic-service host_name spimail.spi.com service_description Current Users check_command check_nrpe!check_users contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Cpu Load check_command check_nrpe!check_load contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Cpu Utilization check_command check_nrpe!check_cpu contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Memory Utilization check_command check_nrpe!check_mem_avail contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Disk Check check_command check_nrpe!check_disk_space contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Zombie Process check_command check_nrpe!check_zombie_procs contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Mail Queue check_command check_nrpe!check_zimbra_queue contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Pop check_command check_nrpe!check_pop contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Smtp check_command check_nrpe!check_smtp contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Imap check_command check_nrpe!check_imap contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Http check_command check_http_spi // this is not define in client side , check in command.cfg contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } define service{ use generic-service host_name spimail.spi.com service_description Lmtp check_command check_nrpe!check_zimbra_lmtp contact_groups mailtest notification_options w,u,c,r normal_check_interval 3 } == Configuration Of Warning and Critical Mail send by Nagios: == #Vim /usr/local/nagios/etc/objects/contacts.cfg DEFINE CONTACT define contact{ contact_name mailtest ; Short name of user use generic-contact ; Inherit default values from generic-contact template (defined above) alias Nagios Admin ; Full name of user email test@tetrain.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ****** define contactgroup{ contactgroup_name client-group alias Nagios Administrators members mailtest } Note : Now the client have to see only there services not all clients services for that we made new contact group i.e mailtest and now we want that they can wacth there services but do not change any thing for that we do one entry in below : # vim /usr/local/nagios/etc/cgi.cfg #authorized_for_read_only=user1,user2 authorized_for_read_only=mailtest Note : Set password for user mailtest # htpasswd htpasswd.users mailtest Then check your mail. TROUBLESHOOTING---------------- 1. Check nagios port is open on client server #nc -z client ip 5666 2. check client server is connected or not #./usr/local/nagios/libexec/check_nrpe -n -H spimail.spi.com 3. check service #/usr/local/nagios/libexec/check_nrpe -n -t 50 -H spimail.spi.com -c check_mem_avail
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)