Unable to rename

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Lieta
Posts: 3
Joined: Fri Jan 25, 2019 8:45 am

Unable to rename

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Unable to rename

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Lieta
Posts: 3
Joined: Fri Jan 25, 2019 8:45 am

Re: Unable to rename

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Unable to rename

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Lieta
Posts: 3
Joined: Fri Jan 25, 2019 8:45 am

Re: Unable to rename

Post by Lieta »

The issue was nonexisting /var/run/nagios/ directory.
Thanks for solving!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to rename

Post by scottwilkerson »

Lieta wrote:The issue was nonexisting /var/run/nagios/ directory.
Thanks for solving!
Great! Glad to hear it is resolved!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked