Yeah, I saw that section was for CentOS, but I figured I'd check anyway. So what are the next steps?Box293 wrote:So the doc is created with multiple sections for different OS's to remove confusion.
It might be that the doc is now outdated if Ubuntu has updated PHP to 7 and the doc is built around older PHP versions.
Error: Could not read host and service status information!
Re: Error: Could not read host and service status informatio
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Error: Could not read host and service status informatio
What do the apache logs say?
Code: Select all
tail -n 20 /var/log/apache2/error.log
tail -n 20 /var/log/apache2/access.logAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Error: Could not read host and service status informatio
Just did a page refresh prior to grabbing the logs:Box293 wrote:What do the apache logs say?
Code: Select all
tail -n 20 /var/log/apache2/error.log tail -n 20 /var/log/apache2/access.log
Code: Select all
tail -20 /var/log/apache2/error.log
[Fri Jan 24 06:25:03.714439 2020] [mpm_prefork:notice] [pid 19323] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Fri Jan 24 06:25:03.714472 2020] [core:notice] [pid 19323] AH00094: Command line: '/usr/sbin/apache2'
Code: Select all
tail -20 /var/log/apache2/access.log
127.0.0.1 - - [24/Jan/2020:07:51:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:07:56:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:01:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:06:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:11:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:16:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:21:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:26:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:31:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:36:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:41:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:46:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:51:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:08:56:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:09:01:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:09:06:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:09:11:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:09:16:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:09:21:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"
127.0.0.1 - - [24/Jan/2020:09:26:56 -0600] "GET / HTTP/1.1" 200 11595 "-" "check_http/v2.1.2 (monitoring-plugins 2.1.2)"-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error: Could not read host and service status informatio
Can we see the permissions of the following dirs to verify the www-data user or nagios group has access to read all
Code: Select all
ls -l /var/cache/nagios3
ls -l /var/cache
ls -l /varRe: Error: Could not read host and service status informatio
scottwilkerson wrote:Can we see the permissions of the following dirs to verify the www-data user or nagios group has access to read allCode: Select all
ls -l /var/cache/nagios3 ls -l /var/cache ls -l /var
Code: Select all
ls -l /var/cache/nagios3
total 204
-rw-r--r-- 1 nagios www-data 69939 Jan 20 17:31 objects.cache
-rw-rw-r-- 1 nagios www-data 66516 Jan 24 17:07 status.dat
-rw-rw-r-- 1 nagios www-data 63308 Jan 20 16:51 status.dat.backCode: Select all
ls -l /var/cache
total 48
drwxr-xr-x 3 root root 4096 Jun 12 2019 apache2
drwxr-xr-x 2 root root 4096 Apr 12 2016 apparmor
drwxr-xr-x 3 root root 4096 Jan 24 06:28 apt
drwxr-xr-x 3 root root 4096 Jun 12 2019 dbconfig-common
drwxr-xr-x 2 root root 4096 Jan 22 06:25 debconf
drwxr-xr-x 2 root root 4096 Jun 12 2019 fontconfig
drwx------ 2 root root 4096 Jan 24 06:07 ldconfig
drwxr-sr-x 27 man root 4096 Jan 24 06:25 man
-rw-r--r-- 1 root root 0 Jan 24 07:18 motd-news
drwxr-s--- 2 nagios www-data 4096 Jan 24 17:08 nagios3
drwxr-xr-x 2 root root 4096 May 23 2019 samba
drwxr-xr-x 2 root root 4096 Jan 20 15:28 snapd
drwxr-xr-x 2 www-data www-data 4096 Apr 4 2016 tcpdfCode: Select all
ls -l /var
total 52
drwx------ 2 root root 4096 Jan 20 15:28 agentx
drwxr-xr-x 2 root root 4096 Jan 24 06:25 backups
drwxr-xr-x 14 root root 4096 Oct 23 12:55 cache
drwxrwxrwt 2 root root 4096 Jun 22 2019 crash
drwxr-xr-x 55 root root 4096 Nov 7 12:43 lib
drwxrwsr-x 2 root staff 4096 Apr 12 2016 local
lrwxrwxrwx 1 root root 9 Jun 12 2019 lock -> /run/lock
drwxrwxr-x 14 root syslog 4096 Jan 24 06:25 log
drwxrwsr-x 2 root mail 4096 Apr 20 2016 mail
drwxr-xr-x 2 root root 4096 Apr 20 2016 opt
lrwxrwxrwx 1 root root 4 Jun 12 2019 run -> /run
drwxr-xr-x 2 root root 4096 Apr 19 2016 snap
drwxr-xr-x 5 root root 4096 Jun 12 2019 spool
drwxrwxrwt 6 root root 4096 Jan 24 16:39 tmp
drwxr-xr-x 3 root root 4096 Jun 12 2019 wwwCode: Select all
total 212K
drwxr-s--- 2 nagios www-data 4.0K Jan 24 17:11 .
drwxr-xr-x 14 root root 4.0K Oct 23 12:55 ..
-rw-r--r-- 1 nagios www-data 69K Jan 20 17:31 objects.cache
-rw-rw-r-- 1 nagios www-data 65K Jan 24 17:11 status.dat
-rw-rw-r-- 1 nagios www-data 62K Jan 20 16:51 status.dat.back
-rw-rw-r-- 1 nagios www-data 0 Jan 24 17:10 test.txt
Re: Error: Could not read host and service status informatio
Any other suggestions, ideas, or things to check?
Re: Error: Could not read host and service status informatio
Make sure that the nagios user account is still active and not expired.
Run this to check it.
What is the user account you are using to login to the web interface?
Is it setup in the cgi.cfg to access the system status data?
Try editing the /etc/groups file and add the nagios user account to www-data group.
Restart Nagios and Apache.
Run this to check it.
Code: Select all
chage -l nagiosIs it setup in the cgi.cfg to access the system status data?
Try editing the /etc/groups file and add the nagios user account to www-data group.
Restart Nagios and Apache.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error: Could not read host and service status informatio
chage -l nagios output:tgriep wrote:Make sure that the nagios user account is still active and not expired.
Run this to check it.What is the user account you are using to login to the web interface?Code: Select all
chage -l nagios
Is it setup in the cgi.cfg to access the system status data?
Try editing the /etc/groups file and add the nagios user account to www-data group.
Restart Nagios and Apache.
Code: Select all
Last password change : Jun 12, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7The nagios user is already part of the www-data group:
Code: Select all
nagios:x:1001:www-data,nagiosRe: Error: Could not read host and service status informatio
Actually, what you have shown, these users www-data,nagios are part of the nagios group, not the other way around.
If you login as the nagiosadmin, does the system display the same error?
If you login as the nagiosadmin, does the system display the same error?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error: Could not read host and service status informatio
Good point! The nagios user was not in the www-data group. I added it, but no difference, sadly. Here is my current /etc/group file:tgriep wrote:Actually, what you have shown, these users www-data,nagios are part of the nagios group, not the other way around.
If you login as the nagiosadmin, does the system display the same error?
Code: Select all
cat /etc/group | grep www
www-data:x:33:nagios
nagios:x:1001:www-data,nagios
nagcmd:x:1002:nagios,www-data