Featured Worklog

Price Search



PC Apex Sponsor


PC Apex Sponsors



PC Apex RSS Feeds

RSS Feed for PC Apex Reviews & ArticlesRSS Feed for PC Apex PC Modding WorklogsRSS Feed for the PC Apex Daily DisturbanceRSS Feed for the latest PC Apex Site NewsRSS Feed for PC Apex Affiliate and Web NewsRSS Feed for PC Apex Deals and Steals

Go Back   Apex Community Forums // Other Forums // Designers Corner // Coding / Scripting / Programming

Coding / Scripting / Programming Discussions on all manner of coding and scripting.

Reply
 
LinkBack Thread Tools Display Modes
Old 28-March-08, 08:04 PM   #1 (permalink)
Apex Techie Wannabe
Default Nagios How-To

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_information=nagios
# CONFIGURATION INFORMATION ACCESS
authorized_for_configuration_information=nagios
# GLOBAL HOST/SERVICE VIEW ACCESS
authorized_for_all_services=nagios
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
lessjunkless is offline     Reply With Quote
Sponsored Links
Old 29-March-08, 12:51 AM   #2 (permalink)
Da Hammer Man
EstwingMan's Avatar
Default Re: Nagios How-To

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 ?
EstwingMan is offline     Reply With Quote
Old 29-March-08, 02:23 AM   #3 (permalink)
Apex Tech Demi-God
RBIEZE's Avatar
Default Re: Nagios How-To

What is the point of all this???

Can someone with linux knowledge post on this...
RBIEZE is offline     Reply With Quote
Old 29-March-08, 04:02 AM   #4 (permalink)
Apex Techie II
Default Re: Nagios How-To

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.
degu22 is offline     Reply With Quote
Old 30-March-08, 09:41 PM   #5 (permalink)
PCApex Corr-Hoe-spondent
BeetleMan's Avatar
Default Re: Nagios How-To

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...

Quote:
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 ?

Where did you get this information Eastwing?
BeetleMan is offline     Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -5. The time now is 06:54 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5
Copyright PCApex.com, GameApex.com, ForumApex.com 2001 - 2008
Advertisements

Page generated in 0.34769 seconds with 9 queries