LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-06-2011, 03:51 AM   #1
Shahnawaz Uqaili
Member
 
Registered: May 2011
Location: Karachi, Sindh Pakistan
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46

Rep: Reputation: Disabled
Root partition warning


Hello all,

I am running Nagios on CentOS. Everything is working fine, all my clients status is ok. One thing which is confusing me is "Root Partition WARNING" on my own server which has Nagios installed.

I think that these things are controlled by nrpe, which is installed in clients servers. what i want to know is how i manage my own server, in which config files i have to make changes?

Kind Regards,

Shahnawaz Uqaili
 
Old 06-06-2011, 05:08 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Without knowing your cfg files and how you organized hosts and services, we can't answer your question. what are the cfg files you have on nagios?
 
Old 06-06-2011, 05:13 AM   #3
Shahnawaz Uqaili
Member
 
Registered: May 2011
Location: Karachi, Sindh Pakistan
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46

Original Poster
Rep: Reputation: Disabled
Thanks kirukan for replying.

cfg file of nagios server has warning if disk is 20% and critical if disk is 10% .

My question is should i increase these values or from somewhere else? As nrpe is not installed in Nagios server.
 
Old 06-06-2011, 05:16 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
This is the way, organized in my environment ....
hosts.cfg
Code:
# Generic host definition template - This is NOT a real host, just a template!

define host{
        name                            generic-host    ; The name of this host template
        notifications_enabled           1       ; Host notifications are enabled
        event_handler_enabled           1       ; Host event handler is enabled
        flap_detection_enabled          1       ; Flap detection is enabled
        failure_prediction_enabled      1       ; Failure prediction is enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
        }


# Since this is a simple configuration file, we only monitor one host - the
# local host (this machine).

define host{
        use                     generic-host            ; Name of host template to use
        host_name               RedHatLinux
        alias                   rax.wavex.com      ; localhost.localhostdomain
        address                 127.0.0.1
        check_command           check-host-alive
        max_check_attempts      10
        check_period            24x7
        notification_interval   120
        notification_period     24x7
        notification_options    d,r
        contact_groups          nagicmd
        }

services.cfg
Code:
#***********************************************************************************************
# Define a service to check the disk space of the root partition
# on the local machine.  Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       RedHatLinux
        service_description             Root Partition
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  nagicmd
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             24x7
        check_command                   check_local_disk!10%!5%!/dev/hda7
        }
Check_commands.cfg
Code:
# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }

Last edited by kirukan; 06-06-2011 at 05:18 AM.
 
Old 06-06-2011, 05:21 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Local server itself you don't need NRPE
 
Old 06-06-2011, 05:23 AM   #6
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
Quote:
Originally Posted by Shahnawaz Uqaili View Post
Thanks kirukan for replying.

cfg file of nagios server has warning if disk is 20% and critical if disk is 10% .

My question is should i increase these values or from somewhere else? As nrpe is not installed in Nagios server.
if it is controlled by NRPE (which i doubt) then check your config files and search for this (on the monitoring host):
Code:
define command{
use               template
check_command     check_nrpe!check_disk!10!20
}
or something like that!
and if you don't find anything like that, NRPE is not used to check your disk usage.

and when you ask that you would like to increase the values, imo we can't answer to that, because everyone has other configs concerning that, it's up to you to decide when Nagios should send a notification to someone
 
Old 06-06-2011, 05:24 AM   #7
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
Quote:
Originally Posted by kirukan View Post
Local server itself you don't need NRPE
It's like Kirukan says, when you check on your LOCAL server, you don't need to use/install NRPE
Only when you want to execute plugins on REMOTE servers.
 
Old 06-06-2011, 05:25 AM   #8
Shahnawaz Uqaili
Member
 
Registered: May 2011
Location: Karachi, Sindh Pakistan
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46

Original Poster
Rep: Reputation: Disabled
My nagiosserver.cfg


define service{
use local-service ; Name of service template to use
host_name mydomain.com
service_description Root Partition
check_command check_local_disk!20%!10%!


Should i increase this?


check_command check_local_disk!20%!10%!

Last edited by Shahnawaz Uqaili; 06-06-2011 at 05:29 AM.
 
Old 06-06-2011, 05:31 AM   #9
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Quote:
check_command check_local_disk!20%!10%!/
I think, Instead of "!/", you have to define "/dev/xxx", just check which partition mounted with root
 
Old 06-06-2011, 05:31 AM   #10
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
Quote:
Originally Posted by Shahnawaz Uqaili View Post
My nagiosserver.cfg


define service{
use local-service ; Name of service template to use
host_name mydomain.com
service_description Root Partition
check_command check_local_disk!20%!10%!


Should i increase this?


check_command check_local_disk!20%!10%!
with this we see that NRPE isn't being used.
Like i said, everyone has another reason to use check_local_disk so everyone has another setting (and another reason to config that plugin in a certain way).
Just see for yourself what is the best setting. Do you want to notified when only 5% is left or 80% left,... it just depends...
 
Old 06-06-2011, 06:05 AM   #11
Shahnawaz Uqaili
Member
 
Registered: May 2011
Location: Karachi, Sindh Pakistan
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46

Original Poster
Rep: Reputation: Disabled
Thanks for your help brownie_cookie & kirukan

I may now manage my server.

Thanks a lot
 
Old 06-06-2011, 06:08 AM   #12
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
no problem
if you have any more problems with Nagios, feel free to pm me or make a new thread
there are many people on LQ that have experience with Nagios

if you are satisfied with your answer or solution, please mark this thread as solved

have a nice day

 
Old 06-06-2011, 07:04 AM   #13
Shahnawaz Uqaili
Member
 
Registered: May 2011
Location: Karachi, Sindh Pakistan
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46

Original Poster
Rep: Reputation: Disabled
Talking

Thanks brownie_cookie
 
Old 06-06-2011, 07:07 AM   #14
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
no problem

yeah, my 400th post xD
 
Old 06-06-2011, 07:22 AM   #15
Shahnawaz Uqaili
Member
 
Registered: May 2011
Location: Karachi, Sindh Pakistan
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brownie_cookie View Post
no problem

yeah, my 400th post xD
and mine 30th
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] warning: group mockbuild does not exist - using root e3399 Linux - Newbie 2 03-29-2011 12:10 PM
/root/.ppprc warning ashwin_think Linux - Newbie 0 10-10-2008 02:01 AM
GRUB won't load windows partition - root (hd0,0), Filesystem type unknown partition.. cillm527 Linux - Software 4 04-27-2008 06:44 AM
colinux access to ext3 partition (opensuse root partition) billtracy1957 Linux - General 0 05-03-2007 10:29 PM
Partition warning message? kushalkoolwal Programming 4 10-19-2005 03:38 PM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration