Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46
Rep:
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?
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
}
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
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.
Distribution: RHEL, CentOS, Debian/Ubuntu, Microsoft Windows
Posts: 46
Original Poster
Rep:
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.
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...
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.