Shows Receiving from only 1

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Shows Receiving from only 1

Post by BanditBBS »

So rebuilt my log server(s) for prod usage now. I can clearly see I am receiving logs from 5 different IPs inthe dashboard but the main page says only receiving from 1 source. Am I missing something or did I find a bug?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Shows Receiving from only 1

Post by jolson »

I am under the impression that where the home screen displays:
Send More Logs - Receiving logs from X hosts
It is parsing the last 1 day of activity for the 'host' field. Have you received logs from more than 1 host in the past 1 day?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Shows Receiving from only 1

Post by BanditBBS »

jolson wrote:I am under the impression that where the home screen displays:
Send More Logs - Receiving logs from X hosts
It is parsing the last 1 day of activity for the 'host' field. Have you received logs from more than 1 host in the past 1 day?
Just the past hour :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Shows Receiving from only 1

Post by jolson »

If you select a log event and press 'Raw', does the 'host' field display properly? Has the field been renamed or anything of that nature?
2015-05-14 13_00_25-Dashboard • Nagios Log Server.png
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Shows Receiving from only 1

Post by BanditBBS »

jolson wrote:If you select a log event and press 'Raw', does the 'host' field display properly? Has the field been renamed or anything of that nature?
2015-05-14 13_00_25-Dashboard • Nagios Log Server.png
Looks just like your picture except mine are IPs but at least 3 or 4 different ones between everything I'm receiving.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Shows Receiving from only 1

Post by jolson »

Bandit,

Are you certain that your timezones are all set up properly on NLS?

Code: Select all

grep timezone /etc/php.ini
date
ls -l /etc/localtime
We include a script that you can use to change your timezone.

Code: Select all

/usr/local/nagioslogserver/scripts/change_timezone.sh -z UTC
The detected amount of 'hosts' isn't guaranteed to be 100% accurate, but it is supposed to increase beyond one. On the backend, NLS is running a simply 24h query for the different 'hosts' that have logged to NLS - the 'host' field is responsible for this generated number.

Let us know if the timezones were incorrect anywhere - thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Shows Receiving from only 1

Post by BanditBBS »

Code: Select all

[root@iss-chi-nag07 ~]# grep timezone /etc/php.ini
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = America/Chicago
[root@iss-chi-nag07 ~]# date
Thu May 14 16:27:45 CDT 2015
[root@iss-chi-nag07 ~]# ls -l /etc/localtime
-rw-r--r--. 1 root root 3543 Apr 29 17:40 /etc/localtime
Looks proper to me
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Shows Receiving from only 1

Post by Fred Kroeger »

There's another file that you need to update for timezone - /etc/sysconfig/clock
All my logs copied across OK except the Linux server logs which were always 12hrs behind.
Once I updated that config file all logs are received immediately.

Regards.... Fred
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Shows Receiving from only 1

Post by BanditBBS »

Fred Kroeger wrote:There's another file that you need to update for timezone - /etc/sysconfig/clock
All my logs copied across OK except the Linux server logs which were always 12hrs behind.
Once I updated that config file all logs are received immediately.

Regards.... Fred
It is set properly as well, so that's not it :(

Code: Select all

[jclark@iss-chi-nag07 ~]$ cat /etc/sysconfig/clock
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="America/Chicago"
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Shows Receiving from only 1

Post by BanditBBS »

I came in this morning and everything is displaying properly, so can't really test things anymore :( But at least its working!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked