Advertisement
pebriana

nagios configuration

Apr 20th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. ref: https://dl-web.dropbox.com/get/Kuliah/NMS%20-%20Network%20Monitoring%20System/NMS-with-nagios.pdf?w=edccd96e&dl=1
  2.  
  3. useradd -s /bin/false -d /opt/nagios/ nagios
  4. groupadd nagcmd
  5. usermod -G nagcmd nagios
  6. usermod -G nagcmd apache
  7.  
  8. tar -xzvf nagios-3.3.1.tar.gz
  9.  
  10. ./configure --prefix=/opt/nagios --with-command-group=nagcmd
  11. make all
  12. make install
  13. make install-init
  14. make install-config
  15. make install-commandmode
  16.  
  17. make install-webconf
  18. htpasswd -c /opt/nagios/etc/htpasswd.users nagiosadmin
  19.  
  20.  
  21. tar -xzvf nagios-plugins-1.4.15.tar.gz
  22.  
  23. ./configure --prefix=/opt/nagios --with-nagios-user=nagios --with-nagios-group=nagios
  24. make
  25. make install
  26.  
  27. chkconfig --add nagios
  28. chkconfig nagios on
  29.  
  30. \\\\\sample configuration nagios\\\\
  31.  
  32. mkdir /opt/nagios/etc/hosts
  33. vim /opt/nagios/etc/hosts/proxy.cfg
  34.  
  35. \\\\\ here sample
  36.  
  37.  
  38. define host{
  39. use linux-server
  40. host_name SRV
  41. alias Server Rver Ver
  42. address 202.148.26.202
  43. }
  44.  
  45. define service{
  46. use local-service
  47. host_name SRV
  48. service_deskription ping
  49. check_command check_ping!100.0,20%!500.0,60%
  50. }
  51.  
  52. \\\\\
  53.  
  54. vim /opt/nagios/etc/nagios.cfg
  55.  
  56. \\\ add this line
  57. cfg_file=/opt/nagios/etc/hosts/proxy.cfg
  58. \\\
  59.  
  60. /opt/nagios/bin/nagios -v /opt/nagios/etc/nagios.cfg
  61.  
  62. /etc/init.d/nagios reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement