Re: nagios.log (null)
Posted: Tue Oct 15, 2013 5:17 pm
Code: Select all
ls -la /usr/local/nagios/var/nagios.log
-rw-r--r-- 1 nagios nagios 4200 Oct 15 16:41 /usr/local/nagios/var/nagios.log
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
ls -la /usr/local/nagios/var/nagios.log
-rw-r--r-- 1 nagios nagios 4200 Oct 15 16:41 /usr/local/nagios/var/nagios.log
Code: Select all
chmod g+w /usr/local/nagios/var/nagios.log
Code: Select all
vc70:/usr/local/nagios/var>ll nagios.log
-rw-rw-r-- 1 nagios nagios 5040 Oct 16 12:17 nagios.log
vc70:/usr/local/nagios/var>sudo /etc/rc.d/nagios restart
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.
vc70:/usr/local/nagios/var>tail -4 nagios.log
[1381943945] (null)
[1381943945] (null)
[1381943945] (null)
[1381943945] (null)
What were these upgrades that you did? Did you make any changes to the system such as adding a new logging system?I know it worked in the past but have not had a need to check the logs for some time. I've done some upgrades since.
Code: Select all
/* write the buffer to the log file */
fprintf(fp, "[%lu] %s\n", log_time, buffer);
fprintf(fp, "here %s\n", buffer);
Code: Select all
#make nagios
cd ./base && make
gcc -Wall -g -O2 -DHAVE_CONFIG_H -DNSCORE -c logging.c
logging.c: In function 'write_to_log':
logging.c:235:2: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'time_t'
logging.c:235:2: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'time_t'
logging.c: In function 'log_debug_info':
logging.c:558:2: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'time_t'
logging.c:558:2: warning: format '%06lu' expects type 'long unsigned int', but argument 4 has type 'suseconds_t'
logging.c:558:2: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'time_t'
logging.c:558:2: warning: format '%06lu' expects type 'long unsigned int', but argument 4 has type 'suseconds_t'
gcc -Wall -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o ../common/shared.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.o notifications.o sehandlers.o skiplist.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o -Wl,-export-dynamic -lm -lpthread
Code: Select all
fprintf(fp, "[%llu] %s\n", log_time, buffer);