LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Root partition warning (https://www.linuxquestions.org/questions/linux-newbie-8/root-partition-warning-884768/)

Shahnawaz Uqaili 06-06-2011 03:51 AM

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

kirukan 06-06-2011 05:08 AM

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?

Shahnawaz Uqaili 06-06-2011 05:13 AM

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.

kirukan 06-06-2011 05:16 AM

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$
        }


kirukan 06-06-2011 05:21 AM

Local server itself you don't need NRPE

brownie_cookie 06-06-2011 05:23 AM

Quote:

Originally Posted by Shahnawaz Uqaili (Post 4377618)
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

brownie_cookie 06-06-2011 05:24 AM

Quote:

Originally Posted by kirukan (Post 4377622)
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.

Shahnawaz Uqaili 06-06-2011 05:25 AM

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%!

kirukan 06-06-2011 05:31 AM

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

brownie_cookie 06-06-2011 05:31 AM

Quote:

Originally Posted by Shahnawaz Uqaili (Post 4377628)
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...

Shahnawaz Uqaili 06-06-2011 06:05 AM

Thanks for your help brownie_cookie & kirukan

I may now manage my server.

Thanks a lot

brownie_cookie 06-06-2011 06:08 AM

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

:hattip:

Shahnawaz Uqaili 06-06-2011 07:04 AM

Thanks brownie_cookie

brownie_cookie 06-06-2011 07:07 AM

no problem :p

yeah, my 400th post xD

Shahnawaz Uqaili 06-06-2011 07:22 AM

Quote:

Originally Posted by brownie_cookie (Post 4377685)
no problem :p

yeah, my 400th post xD

and mine 30th ;)

brownie_cookie 06-06-2011 07:26 AM

gratz to us both :p

Shahnawaz Uqaili 06-06-2011 07:39 AM

When my status will become MEMBER? ;) :p

---------- Post added 06-06-11 at 05:40 PM ----------

Ohhhhhh I became a Member :D :D

brownie_cookie 06-06-2011 07:41 AM

lol :p


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