Upgrade from 3.x to 4.0.8 - maps/trends not working

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.
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Hi there,

we've upgrade our Nagios installation to version 4.0.8. Everything is working like a charm, with the exception of Maps and Trends.
The OS is a Ubuntu 12.04.5 LTS.
For both I get the error: "Error: Could not read object configuration data!".
- The configuration has been verified with -v and no errors came up.
- There is also nothing noted in the nagios.log file.
- The user www-data is in the groups nagios,nagcmd and www-data.

So what else could be wrong?

Thanks for help!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by tmcdonald »

Was this a source install or an apt-get install?

What are the permissions on your .../nagios/var directory?
Former Nagios employee
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

It was an installation from source.
Permissions are blow. As www-data is in the nagios group, that should be fine, or not?

Thanks

Code: Select all

$ ls -lah /usr/local/nagios/var
drwxrwxr-x 5 nagios nagios 4,0K Aug 18 08:51 .
drwxr-xr-x 9 nagios nagios 4,0K Feb  4  2015 ..
drwxrwxr-x 2 nagios nagios  96K Aug 17 23:59 archives
-rw-r--r-- 1 nagios nagios    5 Aug 17 10:04 nagios.lock
-rw-rw-r-- 1 nagios nagios 117K Aug 18 08:04 nagios.log
-rw-r--r-- 1 nagios nagios 162K Aug 29  2014 nagios.log.old
-rw-r--r-- 1 nagios nagios 704K Aug 17 10:04 objects.cache
-rw-r--r-- 1 nagios nagios 613K Aug 29  2014 objects.cache.old
-rw-rw-r-- 1 nagios nagios 665K Mär 27 15:52 objects.cache.old2
-rw------- 1 nagios nagios 1,1M Aug 18 08:04 retention.dat
-rw-rw-r-- 1 nagios nagios 926K Aug 29  2014 retention.dat.old
-rw------- 1 nagios nagios 1,0M Mär 30 11:52 retention.dat.old2
drwxrwsr-x 2 nagios nagcmd 4,0K Aug 17 10:04 rw
drwxr-xr-x 3 root   root   4,0K Mär  5  2010 spool
-rw-rw-r-- 1 nagios nagios 1,1M Aug 18 08:51 status.dat
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by tgriep »

Could you confirm that Apache is running as www-data and if it isn't, add that account to the nagios group and see if that fixes it for you.
Also, could you check the Apache error_log file for any errors that can help us debug this?
Be sure to check out our Knowledgebase for helpful articles and solutions!
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

In the file /var/log/apache2/error.log no errors are listed.

The Access.log says this:

Code: Select all

Ip.ad.dr.es - nagiosadmin [19/Aug/2015:03:00:45] "GET /nagios/cgi-bin/statusmap.cgi?host=all HTTP/1.1" 200 1701 "http:// Ip.ad.dr.es /nagios/side.php" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/8.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)"
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by tgriep »

Can you run the following and post the results?

Code: Select all

grep nag /etc/passwd
grep nag /etc/group
ps aux
Be sure to check out our Knowledgebase for helpful articles and solutions!
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Sure, here you are:

Code: Select all

$grep nag /etc/passwd
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
nagios:x:1001:1001::/home/nagios:/bin/bash

Code: Select all

$grep nag /etc/group
nagios:x:1001:www-data,tomcat6
nagcmd:x:1002:nagios,www-data,tomcat6

Code: Select all

$ps aux

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2  24332  1988 ?        Ss   Aug17   0:00 /sbin/init
root         2  0.0  0.0      0     0 ?        S    Aug17   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Aug17   0:17 [ksoftirqd/0]
root         6  0.0  0.0      0     0 ?        S    Aug17   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    Aug17   0:00 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Aug17   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S<   Aug17   0:00 [khelper]
root        10  0.0  0.0      0     0 ?        S    Aug17   0:00 [kdevtmpfs]
root        11  0.0  0.0      0     0 ?        S<   Aug17   0:00 [netns]
root        12  0.0  0.0      0     0 ?        S    Aug17   0:00 [sync_supers]
root        13  0.0  0.0      0     0 ?        S    Aug17   0:00 [bdi-default]
root        14  0.0  0.0      0     0 ?        S<   Aug17   0:00 [kintegrityd]
root        15  0.0  0.0      0     0 ?        S<   Aug17   0:00 [kblockd]
root        16  0.0  0.0      0     0 ?        S<   Aug17   0:00 [ata_sff]
root        17  0.0  0.0      0     0 ?        S    Aug17   0:00 [khubd]
root        18  0.0  0.0      0     0 ?        S<   Aug17   0:00 [md]
root        19  0.0  0.0      0     0 ?        S    Aug17   0:00 [kworker/u:1]
root        21  0.0  0.0      0     0 ?        S    Aug17   0:00 [khungtaskd]
root        22  0.0  0.0      0     0 ?        S    Aug17   0:00 [kswapd0]
root        23  0.0  0.0      0     0 ?        SN   Aug17   0:00 [ksmd]
root        24  0.0  0.0      0     0 ?        SN   Aug17   0:00 [khugepaged]
root        25  0.0  0.0      0     0 ?        S    Aug17   0:00 [fsnotify_mark]
root        26  0.0  0.0      0     0 ?        S    Aug17   0:00 [ecryptfs-kthrea]
root        27  0.0  0.0      0     0 ?        S<   Aug17   0:00 [crypto]
root        35  0.0  0.0      0     0 ?        S<   Aug17   0:00 [kthrotld]
root        37  0.0  0.0      0     0 ?        S    Aug17   0:00 [scsi_eh_0]
root        38  0.0  0.0      0     0 ?        S    Aug17   0:00 [scsi_eh_1]
root        39  0.0  0.0      0     0 ?        S    Aug17   0:02 [kworker/u:2]
root        60  0.0  0.0      0     0 ?        S<   Aug17   0:00 [devfreq_wq]
root       206  0.0  0.0      0     0 ?        S<   Aug17   0:00 [ttm_swap]
root       253  0.0  0.0      0     0 ?        S<   Aug17   0:00 [mpt_poll_0]
root       256  0.0  0.0      0     0 ?        S<   Aug17   0:00 [mpt/0]
root       261  0.0  0.0      0     0 ?        S    Aug17   0:00 [scsi_eh_2]
root       321  0.0  0.0      0     0 ?        S    Aug17   0:06 [jbd2/sda1-8]
root       322  0.0  0.0      0     0 ?        S<   Aug17   0:00 [ext4-dio-unwrit]
root       557  0.0  0.0  17228   352 ?        S    Aug17   0:00 upstart-udev-bridge --daemon
root       581  0.0  0.1  22044   972 ?        Ss   Aug17   0:00 /sbin/udevd --daemon
syslog     590  0.0  0.1 249464  1192 ?        Sl   Aug17   0:05 rsyslogd -c5
106        591  0.0  0.1  23940  1004 ?        Ss   Aug17   0:00 dbus-daemon --system --fork --activation=upstart
root       779  0.0  0.0  21768   236 ?        S    Aug17   0:00 /sbin/udevd --daemon
root       780  0.0  0.0  21768   336 ?        S    Aug17   0:00 /sbin/udevd --daemon
root       866  0.0  0.0      0     0 ?        S<   Aug17   0:00 [kpsmoused]
root       905  0.0  0.0  15184   360 ?        S    Aug17   0:00 upstart-socket-bridge --daemon
root      1013  0.0  0.3  50032  2352 ?        Ss   Aug17   0:00 /usr/sbin/sshd -D
root      1119  0.0  0.0      0     0 ?        S    Aug17   0:02 [flush-8:0]
root      1121  0.0  0.4 586428  3088 ?        Sl   Aug17   0:00 /usr/sbin/console-kit-daemon --no-daemon
root      1188  0.0  0.2 186588  2128 ?        Sl   Aug17   0:00 /usr/lib/policykit-1/polkitd --no-debug
nagios    1208  0.1  0.5  29372  4080 ?        Ss   Aug17   6:56 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root      1236  0.0  0.1  17288   888 tty4     Ss+  Aug17   0:00 /sbin/getty -8 38400 tty4
root      1244  0.0  0.1  17288   884 tty5     Ss+  Aug17   0:00 /sbin/getty -8 38400 tty5
root      1258  0.0  0.1  17288   888 tty2     Ss+  Aug17   0:00 /sbin/getty -8 38400 tty2
root      1259  0.0  0.1  17288   892 tty3     Ss+  Aug17   0:00 /sbin/getty -8 38400 tty3
root      1261  0.0  0.1  17288   888 tty6     Ss+  Aug17   0:00 /sbin/getty -8 38400 tty6
root      1264  0.0  0.1  14964   912 ?        Ss   Aug17   0:00 /usr/sbin/xinetd -dontfork -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      1265  0.0  0.0   4324   644 ?        Ss   Aug17   0:00 acpid -c /etc/acpi/events -s /var/run/acpid.socket
root      1266  0.0  0.1  19108   992 ?        Ss   Aug17   0:00 cron
daemon    1267  0.0  0.0  16904   368 ?        Ss   Aug17   0:00 atd
nagios    1312  0.0  0.1  27568  1080 ?        S    Aug17   0:07 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
whoopsie  1360  0.0  0.4 200108  3800 ?        Ssl  Aug17   0:00 whoopsie
tomcat6   1369  0.0  7.2 1031816 54896 ?       Sl   Aug17   1:39 /usr/lib/jvm/default-java/bin/java -Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.propertie
root      1727  0.0  1.3 136224 10232 ?        Ss   Aug17   0:05 /usr/sbin/apache2 -k start
root      1839  0.0  0.1  25104  1236 ?        Ss   Aug17   0:00 /usr/lib/postfix/master
postfix   1856  0.0  0.1  27332  1396 ?        S    Aug17   0:00 qmgr -l -t fifo -u
snmp      1905  0.0  0.5  48620  3836 ?        S    Aug17   0:17 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid
root      1920  0.0  0.1  17288   888 tty1     Ss+  Aug17   0:00 /sbin/getty -8 38400 tty1
www-data  7639  0.0  0.9 136668  7304 ?        S    08:22   0:00 /usr/sbin/apache2 -k start
postfix   9753  0.0  0.2  27168  1608 ?        S    08:30   0:00 pickup -l -t fifo -u -c
www-data 13613  0.0  0.9 136668  7308 ?        S    08:44   0:00 /usr/sbin/apache2 -k start
www-data 14445  0.0  0.9 136668  7300 ?        S    08:47   0:00 /usr/sbin/apache2 -k start
nagios   15992  0.0  0.1  10904  1228 ?        S    Aug19   0:12 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   15993  0.0  0.1  10800  1248 ?        S    Aug19   0:12 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   15994  0.0  0.1  10772  1216 ?        S    Aug19   0:12 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   15995  0.0  0.1  10832  1268 ?        S    Aug19   0:12 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
www-data 16397  0.0  0.9 136668  7292 ?        S    08:55   0:00 /usr/sbin/apache2 -k start
www-data 18050  0.0  0.9 136668  7292 ?        S    09:01   0:00 /usr/sbin/apache2 -k start
www-data 18469  0.0  0.9 136316  6964 ?        S    09:02   0:00 /usr/sbin/apache2 -k start
root     18711  0.0  0.0      0     0 ?        S    09:03   0:00 [kworker/0:0]
www-data 18858  0.0  0.9 136316  6868 ?        S    09:04   0:00 /usr/sbin/apache2 -k start
www-data 19673  0.0  0.9 136316  6868 ?        S    09:07   0:00 /usr/sbin/apache2 -k start
root     20021  0.0  0.5 104084  4276 ?        Ss   09:08   0:00 sshd: itservice [priv]
root     20053  0.0  0.0      0     0 ?        S    09:08   0:00 [kworker/0:2]
www-data 20088  0.0  0.9 136316  6868 ?        S    09:08   0:00 /usr/sbin/apache2 -k start
1002     20245  0.0  0.2 104084  1904 ?        S    09:08   0:00 sshd: itservice@pts/0
1002     20246  0.2  1.0  28160  7792 pts/0    Ss   09:08   0:00 -bash
www-data 20695  0.0  0.7 136256  5884 ?        S    09:10   0:00 /usr/sbin/apache2 -k start
nagios   20797  0.0  0.1  12872   932 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_ping -H 10.215.51.1 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   20798  0.0  0.0   4392   612 ?        S    09:10   0:00 /bin/ping -n -U -w 30 -c 5 10.215.51.1
nagios   20801  0.0  0.1  12872   932 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_ping -H 10.215.127.1 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   20802  0.0  0.0   4392   612 ?        S    09:10   0:00 /bin/ping -n -U -w 30 -c 5 10.215.127.1
nagios   20803  0.0  0.1  12872   932 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_ping -H 192.168.194.71 -w 3000.0,80% -c 5000.0,100%
nagios   20804  0.0  0.0   4392   612 ?        S    09:10   0:00 /bin/ping -n -U -w 30 -c 5 192.168.194.71
nagios   20805  0.0  0.1  12872   928 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_ping -H 10.215.35.1 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   20806  0.0  0.0   4392   616 ?        S    09:10   0:00 /bin/ping -n -U -w 30 -c 5 10.215.35.1
nagios   20809  0.0  0.1  12872   924 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_ping -H 10.215.62.1 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   20810  0.0  0.0   4392   616 ?        S    09:10   0:00 /bin/ping -n -U -w 30 -c 5 10.215.62.1
nagios   20813  0.0  1.7  50632 13056 ?        S    09:10   0:00 /usr/bin/perl /usr/local/nagios/libexec/check_rbl --extra-opts=rbl@/usr/local/nagios/libexec/check_rbl.ini
nagios   20815  0.0  0.1  12872   928 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_ping -H 10.215.118.5 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   20816  0.0  0.0   4392   616 ?        S    09:10   0:00 /bin/ping -n -U -w 30 -c 5 10.215.118.5
nagios   20817  0.0  0.0  12872   708 ?        S    09:10   0:00 /usr/local/nagios/libexec/check_nt -H 10.215.2.52 -p 12489 -v MEMUSE -w 90 -c 95
1002     20818  0.0  0.1  19660  1256 pts/0    R+   09:10   0:00 ps aux
root     27390  0.0  0.0      0     0 ?        S    Aug19   0:04 [kworker/0:1]
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by tgriep »

So far, so good
Can you run the following and post back the output?

Code: Select all

 ls -l /usr/local/nagios/share
 ls -l /usr/local/nagios/sbin
Can you attach the nagios.cfg file to this post?
Be sure to check out our Knowledgebase for helpful articles and solutions!
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Sorry for the delay, I had a day off on Friday.
Attached the permissions and the nagios.cfg.

Thanks for your help!

Code: Select all

$ls -l /usr/local/nagios/share
-rw-rw-r-- 1 nagios nagios  576 Aug 12 12:56 config.inc.php
drwxrwxr-x 2 nagios nagios 4096 Aug 12 12:56 contexthelp
drwxrwxr-x 3 nagios nagios 4096 Nov  9  2010 docs
drwxrwxr-x 3 nagios nagios 4096 Aug 12 12:56 images
drwxrwxr-x 3 nagios nagios 4096 Aug 12 12:56 includes
-rw-rw-r-- 1 nagios nagios 1628 Aug 12 12:56 index.php
drwxrwxr-x 2 nagios nagios 4096 Aug 12 12:56 js
-rw-rw-r-- 1 nagios nagios 1176 Aug 12 12:56 jsonquery.html
drwxr-xr-x 4 root   root   4096 Mär  5  2010 locale
-rw-rw-r-- 1 nagios nagios 8697 Aug 12 12:56 main.php
drwxrwxr-x 2 nagios nagios 4096 Mär  5  2010 media
-rw-rw-r-- 1 nagios nagios   26 Aug 12 12:56 robots.txt
-rw-rw-r-- 1 nagios nagios  656 Aug 12 12:56 rss-corebanner.php
-rw-rw-r-- 1 nagios nagios 1064 Aug 12 12:56 rss-corefeed.html
-rw-rw-r-- 1 nagios nagios  895 Aug 12 12:56 rss-corefeed.php
-rw-rw-r-- 1 nagios nagios  540 Aug 12 12:56 rss-newsfeed.html
-rw-rw-r-- 1 nagios nagios 1064 Aug 12 12:56 rss-newsfeed.php
-rw-rw-r-- 1 nagios nagios 6009 Aug 12 12:56 side.php
drwxrwxr-x 2 nagios nagios 4096 Mär  5  2010 ssi
drwxrwxr-x 2 nagios nagios 4096 Aug 12 12:56 stylesheets

Code: Select all

$ ls -l /usr/local/nagios/sbin
-rwxrwxr-x 1 nagios nagios 312376 Aug 12 12:56 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 293656 Aug 12 12:56 avail.cgi
-rwxrwxr-x 1 nagios nagios 292064 Aug 12 12:56 cmd.cgi
-rwxrwxr-x 1 nagios nagios 264904 Aug 12 12:56 config.cgi
-rwxrwxr-x 1 nagios nagios 305912 Aug 12 12:56 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 217912 Nov  9  2010 histogram.cgi
-rwxrwxr-x 1 nagios nagios 240384 Aug 12 12:56 history.cgi
-rwxrwxr-x 1 nagios nagios 236264 Aug 12 12:56 notifications.cgi
-rwxrwxr-x 1 nagios nagios 314136 Aug 12 12:56 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 232128 Aug 12 12:56 outages.cgi
-rwxrwxr-x 1 nagios nagios 232144 Aug 12 12:56 showlog.cgi
-rwxrwxr-x 1 nagios nagios 305936 Aug 12 12:56 status.cgi
-rwxrwxr-x 1 nagios nagios 312280 Aug 12 12:56 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 213880 Nov  9  2010 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 252688 Aug 12 12:56 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 236272 Aug 12 12:56 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 256800 Aug 12 12:56 summary.cgi
-rwxrwxr-x 1 nagios nagios 248600 Aug 12 12:56 tac.cgi
-rwxrwxr-x 1 nagios nagios 222008 Nov  9  2010 trends.cgi
Attachments
nagios.cfg
nagios.cfg
(43.23 KiB) Downloaded 335 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by tgriep »

When you compiled Nagios 4.0.8, it looks like it did not update these 3 cgi files which is causing the problem.

Code: Select all

-rwxrwxr-x 1 nagios nagios 217912 Nov  9  2010 histogram.cgi
-rwxrwxr-x 1 nagios nagios 213880 Nov  9  2010 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 222008 Nov  9  2010 trends.cgi
In the folder where you compiled the software, can you check the log file for any errors when it was compiled and post them here?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked