Nagios Log Archive error
-
harsha.s.aryan
- Posts: 52
- Joined: Fri Nov 13, 2015 9:05 am
Nagios Log Archive error
Hi,
Nagios Log is not getting archive
Please let me know how to resolve
there is no archives directory created under /usr/local/nagios/var/
Nagios Log is not getting archive
Please let me know how to resolve
there is no archives directory created under /usr/local/nagios/var/
Regards,
Harsha
Harsha
Re: Nagios Log Archive error
Can you run the following commands and post the output here?
Can you post your nagios.cfg file so we can check the log rotation settings?
Code: Select all
ls -l /usr/local/nagios/var/
ls -l /usr/local/nagios/var/archivesBe sure to check out our Knowledgebase for helpful articles and solutions!
-
harsha.s.aryan
- Posts: 52
- Joined: Fri Nov 13, 2015 9:05 am
Re: Nagios Log Archive error
root@Nagios:~# ls -l /usr/local/nagios/var/
total 41060
-rw-r--r-- 1 nagios nagios 34 Jul 1 01:59 nagios.configtest
-rw-r--r-- 1 nagios nagios 6 Jul 1 00:03 nagios.lock
-rw-r--r-- 1 nagios nagios 40538731 Jul 1 01:59 nagios.log
-rw-rw-r-- 1 nagios nagios 13460 Sep 10 2015 nagios.tmp5f4sAZ
-rw-rw-r-- 1 nagios nagios 13468 Sep 14 2015 nagios.tmpZBA7pf
-rw-r--r-- 1 nagios nagios 312362 Jul 1 01:59 objects.cache
-rw-r--r-- 1 nagios nagios 312362 Jul 1 01:59 objects.precache
-rw------- 1 nagios nagios 409496 Jul 1 01:59 retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Jul 1 01:59 rw
drwxrwxrwx 3 nagios nagios 4096 Sep 10 2015 spool
-rw-rw-r-- 1 nagios nagios 407353 Jul 1 02:51 status.dat
root@Nagios:~#
and
root@Nagios:~# ls -l /usr/local/nagios/var/archives
ls: cannot access /usr/local/nagios/var/archives: No such file or directory
root@Nagios:~#
total 41060
-rw-r--r-- 1 nagios nagios 34 Jul 1 01:59 nagios.configtest
-rw-r--r-- 1 nagios nagios 6 Jul 1 00:03 nagios.lock
-rw-r--r-- 1 nagios nagios 40538731 Jul 1 01:59 nagios.log
-rw-rw-r-- 1 nagios nagios 13460 Sep 10 2015 nagios.tmp5f4sAZ
-rw-rw-r-- 1 nagios nagios 13468 Sep 14 2015 nagios.tmpZBA7pf
-rw-r--r-- 1 nagios nagios 312362 Jul 1 01:59 objects.cache
-rw-r--r-- 1 nagios nagios 312362 Jul 1 01:59 objects.precache
-rw------- 1 nagios nagios 409496 Jul 1 01:59 retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Jul 1 01:59 rw
drwxrwxrwx 3 nagios nagios 4096 Sep 10 2015 spool
-rw-rw-r-- 1 nagios nagios 407353 Jul 1 02:51 status.dat
root@Nagios:~#
and
root@Nagios:~# ls -l /usr/local/nagios/var/archives
ls: cannot access /usr/local/nagios/var/archives: No such file or directory
root@Nagios:~#
Regards,
Harsha
Harsha
Re: Nagios Log Archive error
The archive folder is gone for sure.
Run this to create is and set the permissions.
Check these settings in the nagios.cfg file for the archive folder and to setup daily log rotation.
If you have to change these settings, restart nagios by running
Run this to create is and set the permissions.
Code: Select all
mkdir /usr/local/nagios/var/archives
chown nagios.nagios /usr/local/nagios/var/archives
chmod 775 /usr/local/nagios/var/archives Code: Select all
log_archive_path=/usr/local/nagios/var/archives
log_rotation_method=dCode: Select all
service nagios restartBe sure to check out our Knowledgebase for helpful articles and solutions!
-
harsha.s.aryan
- Posts: 52
- Joined: Fri Nov 13, 2015 9:05 am
Re: Nagios Log Archive error
The archives get created at midnight so you will have to wait until tomorrow for the first archive file to be created.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
harsha.s.aryan
- Posts: 52
- Joined: Fri Nov 13, 2015 9:05 am
Re: Nagios Log Archive error
Do you mean that your nagios.log file has all of the data in it since the server was running?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
harsha.s.aryan
- Posts: 52
- Joined: Fri Nov 13, 2015 9:05 am
Re: Nagios Log Archive error
I found this example that you can try out for splitting the file.
http://stackoverflow.com/questions/2667 ... s-log-file
http://stackoverflow.com/questions/2667 ... s-log-file
Be sure to check out our Knowledgebase for helpful articles and solutions!