| |||||||
| Coding / Scripting / Programming Discussions on all manner of coding and scripting. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) | |
| Apex Techie Wannabe | Sorry this is not to great of a how-to i will try and clean it up later. this how-to is for nagios and nagios is linux software to see what network services are up on your network. you can pretty much follow this step by step some of the directories need to be typed out in full though! After apache, perl, and php are installed ============================== DO ALL THIS IN THE EXTRACTED NAGIOS DIRECTORY ============================== sudo mkdir /opt/nagios-2.9 sudo /usr/sbin/useradd -s /sbin/nologin nagios sudo /usr/sbin/groupadd nagcmd sudo /usr/sbin/usermod -G nagcmd apache sudo ./configure --prefix=/opt/nagios-2.9/ --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios/ --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd sudo make all sudo make install sudo make install-commandmode sudo make install-config ============================== DO ALL THESE IN cd /opt/nagios-2.9/etc ============================== sudo mv cgi.cfg-sample cgi.cfg sudo mv commands.cfg-sample commands.cfg sudo mv localhost.cfg-sample localhost.cfg sudo mv nagios.cfg-sample nagios.cfg sudo mv resource.cfg-sample resource.cfg ============================== DO ALL THESE IN THE EXTRACTED NAGIOS PLUGIN DIRECTORY ============================== sudo ./configure --enable-perl-modules (now in /usr/local/nagios/libexec after the following commands) sudo make sudo make install ============================== NOW LOOK FOR EXAMPLE CONFIG ============================== cd ../nagios-2.9/sample-config sudo vim httpd.conf (copy its contents) cd sudo vim 00_default_vhost.conf (paste stuff above restart apache ============================== GETTING WEBACCESS ============================== sudo /usr/sbin/htpasswd -c /opt/nagios-2.9//etc/htpasswd.users nagios ============================== SETUP SOME BASIC NAGIOS BEFORE STARTING ============================== sudo vim cgi.cfg *********** STUFF TO EDIT # system/process information access authorized_for_system_informati # CONFIGURATION INFORMATION ACCESS authorized_for_configuration # GLOBAL HOST/SERVICE VIEW ACCESS authorized_for_all_services authorized_for_all_hosts=nagios sudo vim nagios.cfg******************* STUFF TO EDIT # ILLEGAL OBJECT NAME CHARACTERS illegal_object_name_chars=`~!$ # MAXIMUM SERVICE CHECK SPREAD max_service_check_spread=10 # MAXIMUM HOST CHECK SPREAD max_host_check_spread=10 # FLAP DETECTION OPTION enable_flap_detection=1 sudo vim resources.cfg ******************** STUFF TO EDIT # Sets $USER1$ to be the path to the plugins $USER1$=/usr/local/nagios CHECK FILE sudo /opt/nagios-2.9/bin/nagios -v /opt/nagios-2.9/etc/nagios.cfg START sudo ./nagios -d ../etc/nagios.cfg sudo /etc/init.d/apache2 restart ============================== ADD SERVICE HOST STUFF ============================== sudo vim cgi.cfg refresh_rate=60 sudo vim localhost.cfg EDIT/ADD (UNDER HOSTS HUGE COMMENT and UNDER 1ST DEFINE_HOST) define host{ use linux-server host_name gentoo alias gentoo address x.x.x.x } (UNDER SERVICES HUGE COMMENT and UNDER 1ST define service{ use local-service host_name gentoo service_description http check_command check_http } (UNDER LOCAL-SERVICE TEMPLATE) normal_check_interval 2 notification_interval 10 RESTART sudo /opt/nagios-2.9/bin/nagios -v /opt/nagios-2.9/etc/nagios.cfg (check after changes) ps -C nagios -o pid= | sudo xargs kill -HUP | |
| | | |
| Sponsored Links |
| | #2 (permalink) | |
| Well, I set up one of my rigs with openSuse 10.3 about two months ago to fold with because the Linux distro's are supposed to fold faster (my experience hasn't sold me yet) and also try to learn about Linux. It became very obvious that I needed to learn a lot more than just my 20 years of DOS prompt commands (Linux console stuff looks a lot like C.xx which I have forgotten most of). Anyway, the script you posted makes me suspicious and please accept my sincerest apologies if I'm out of line, but why didn't you make this post as SirDavisCarrots since you've been a member with that name since 1/16/03 and haven't posted since 12/18/05? And who's Jimi Jenga ? | ||
| | | |
| | #4 (permalink) | |
| Apex Techie II | Nagios: Home It's an app that monitors your network and the services running on it. This is just a guide on how to install it. | |
| | | |
| | #5 (permalink) | ||||||||||||||||||||
| I can agree with da Hammer man... it's kinda suspicious to have something like that as a first post ... but hmmm to each their own...
Where did you get this information Eastwing? | |||||||||||||||||||||
| | | ||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Slashdot // Nagios System and Network Monitoring | Gizmo | Slashdot RSS | 0 | 11-April-07 03:40 PM |