Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had nagios running on centOS. when i restart the nagios with

/etc/init.d/nagios restart

it not showing any error. But when i check the status with

/etc/init.d/nagios status

it showing nagios not running.

I run nagios with the help of

/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg

i getting following error

Nagios 3.3.1 starting... (PID=12179)

Local time is Tue Jul 16 10:08:17 CEST 2013

Error: my_fcopy() failed to write to '/usr/local/nagios/var/spool/checkresults/nebmod2CKuKY': No space left on device

Error: my_fcopy() failed to write to '/usr/local/nagios/var/spool/checkresults/nebmodMmhs0U': No space left on device

In the webconsole home page working properly.But when i click service or host i getting following error

There doesn't appear to be any service status information in the status log...

Make sure that Nagios is running and that you have specified the location of you status log correctly in the configuration files.

What would be the error?

EDIT

output of *df -h* 

Filesystem                  Size   Used   Avail  Use% Mounted on
/dev/mapper/VolGroup-lv_root 5.5G  5.3G     0    100%  /
tmpfs                       939M     0     939M   0%   /dev/shm
/dev/sda1                   485M   37M     423M   8%   /boot
share|improve this question
1  
That "No space left on device" error is suspect... Did you check the free space? –  Lacek Jul 16 '13 at 9:18
    
Please post the output of df -h. –  SvW Jul 16 '13 at 9:19
    
its working now thanks @SvW –  sujin Jul 16 '13 at 10:04
add comment

2 Answers

up vote 3 down vote accepted

You don't have any more room on your disc (see the 100% on that df output for /dev/mapper/VolGroup-lv_root), so all sorts of things will start to break, including this.

Free up some space.

Specifically in this case, nagios tries to write to some (temp?) file, but can't

Error: my_fcopy() failed to write to '/usr/local/nagios/var/spool/checkresults/nebmod2CKuKY': No space left on device

You could, if you would have another device, change the setting for the checkresults path with (see http://nagios.sourceforge.net/docs/3_0/configmain.html for the setting) but then other things (like logging and who knows what) will fail because of no space.

Other services will also be affected by the way, so it is important to clean up some.

share|improve this answer
    
You are right. But still I can able to create new file in my PC and able write data on that file. Why nagios not able to copy files –  sujin Jul 16 '13 at 9:47
    
Some filesystems reserve some space for special usage by e.g. root. (that's probably why you see 0 available, while you use 5.3 out of 5.5 G) The fact of the matter is that your disk is full according to both the error AND your df output. That means, your disk is full and the way to fix it would be to clean up some disk space. –  Nanne Jul 16 '13 at 9:50
    
it working now. thanks –  sujin Jul 16 '13 at 10:04
    
you could remove reserved space by tune2fs -m 0 /dev/mapper/VolGroup-lv_root. Did you install nagios from source? –  ALex_hha Jul 16 '13 at 10:14
    
I would advice against setting minfree to 0, it's there for a reason :) –  Nanne Jul 16 '13 at 10:23
add comment

From the comment of @SvW and answer of @Nanne

Nagios server make the log in /var/log/messages file in PC. This take more disk space, after i clear the all the data from /var/log/messages file.

Out put of df -h

Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root   5.5G  4.2G  1.1G  81% /
tmpfs                          939M     0  939M   0% /dev/shm
/dev/sda1                      485M   37M  423M   8% /boot

After i disabled nagios log in configuration file (/usr/local/nagios/etc/nagios.cfg)

Then i restart nagios, it working fine.

Thanks.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.