Page 1 of 1

Unable to rename

Posted: Fri Jan 25, 2019 9:21 am
by Lieta
Hi.
I'm getting this kind of errors in Nagios log:
[1548425844] Error: Unable to rename file '/usr/local/nagios/var/nagios.tmpupAw8J' to '/var/run/nagios/status.dat': No such file or directory
[1548425844] Error: Unable to update status data file '/var/run/nagios/status.dat': No such file or directory
[1548425854] Error: Unable to rename file '/usr/local/nagios/var/nagios.tmprmhzCK' to '/var/run/nagios/status.dat': No such file or directory
[1548425854] Error: Unable to update status data file '/var/run/nagios/status.dat': No such file or directory
Indeed there are no files of /usr/local/nagios/var/nagios.tmp...
Permissions of

Code: Select all

drwxrwsr-x 5 nagios nagios 4096 jan 25 16:20 /usr/local/nagios/var

Re: Unable to rename

Posted: Fri Jan 25, 2019 4:51 pm
by npolovenko
Hello, @Lieta. Is the nagios process running? Whats the output of these commands?
ps -ef | grep nagios.cfg
cat /usr/local/nagios/etc/nagios.cfg | grep status.dat

Re: Unable to rename

Posted: Sat Jan 26, 2019 3:53 pm
by Lieta
Hi npolovenko. Thanks for helping. Here's the stuff you asked for:

Code: Select all

lieta@lieta:~$ ps -ef | grep nagios.cfg
nagios    1000     1  0 22:08 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    1188  1000  0 22:08 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
lieta     8473  3186  0 22:50 pts/1    00:00:00 grep nagios.cfg
lieta@lieta:~$ cat /usr/local/nagios/etc/nagios.cfg | grep status.dat
status_file=/var/run/nagios/status.dat
# service status data.
lieta@lieta:~$ ll /var/run/nagios/status.dat
ls: cannot access '/var/run/nagios/status.dat': No such file or directory

Re: Unable to rename

Posted: Mon Jan 28, 2019 3:16 pm
by npolovenko
@ Lieta, What version of Nagios are you running? What are the permissions on the /var/run/ folder?
ls -ld /var/run/
ls -ld /var/run/nagios/
Try restarting nagios and seing is the status.dat file shows up:
ls -l /var/run/nagios/status.dat

Re: Unable to rename

Posted: Tue Jan 29, 2019 1:14 am
by Lieta
The issue was nonexisting /var/run/nagios/ directory.
Thanks for solving!

Re: Unable to rename

Posted: Tue Jan 29, 2019 8:55 am
by scottwilkerson
Lieta wrote:The issue was nonexisting /var/run/nagios/ directory.
Thanks for solving!
Great! Glad to hear it is resolved!

Locking thread