Page 2 of 4

Re: Ajax call problem in Nagvis

Posted: Fri Aug 24, 2018 6:04 am
by morabanc
Hi scott,

Thanks for your response, I already checked it yesterday and was ok.

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_00-lv_root
                       40G   15G   23G  39% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
devpts                   0     0     0   -  /dev/pts
tmpfs                 3.9G   64K  3.9G   1% /dev/shm
/dev/sda1             243M   87M  144M  38% /boot
/dev/mapper/vg_00-lv_home
                      9.9G  5.3G  4.1G  57% /home
/dev/mapper/vg_00-lv_tmp
                      5.7G   50M  5.4G   1% /tmp
/dev/mapper/vg_00-lv_var
                       24G  5.9G   17G  27% /var
/dev/mapper/vg_00-lv_var_log
                      4.0G  2.1G  1.7G  55% /var/log
/dev/mapper/vg_00-lv_var_log_audit
                      4.0G  306M  3.5G   8% /var/log/audit
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
Now, 30 minutes or 1 hour ago it happened again, all the services and hosts disappeared and they only stayed 24 this time.
The solution was: Admin -> System status -> Restart the monitoring engine.


Thanks for all

Re: Ajax call problem in Nagvis

Posted: Fri Aug 24, 2018 11:43 am
by scottwilkerson
It may be a good idea to run the database repair script as a precautionary measure.

https://assets.nagios.com/downloads/nag ... tabase.pdf

If it happens again, I'd like to see the output of the following command before restarting nagios

Code: Select all

ps -ef|grep nagios.cfg

Re: Ajax call problem in Nagvis

Posted: Mon Sep 03, 2018 4:01 am
by morabanc
Hi Scott,

I did it before open a ticket and don't solve the problem.

I do it once again with result of none crash DB:

Code: Select all

===============
REPAIR COMPLETE
===============
Stopping ndo2db: done.
Starting ndo2db: done.
Stopping nagios: .done.
Starting nagios: done.

=======================
nagios database repair succeeded
nagiosql database repair succeeded
Command "ps" during restart (apply configuration):

Code: Select all

[root@nagiosxi]# ps -ef|grep nagios.cfg
nagios    5958     1  6 10:58 ?        00:00:12 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    6054  5958  0 10:58 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     15959  1755  0 11:01 pts/0    00:00:00 grep nagios.cfg
[root@nagiosxi]# ps -ef|grep nagios.cfg
nagios    5958     1  6 10:58 ?        00:00:12 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    6054  5958  0 10:58 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   15978 15616 10 11:01 ?        00:00:00 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
root     16072  1755  0 11:01 pts/0    00:00:00 grep nagios.cfg
[root@nagiosxi]# ps -ef|grep nagios.cfg
nagios   16206 16201  9 11:01 ?        00:00:00 /usr/local/nagios/bin/nagios -vp /usr/local/nagios/etc/nagios.cfg
root     16208  1755  0 11:01 pts/0    00:00:00 grep nagios.cfg
[root@nagiosxi]# ps -ef|grep nagios.cfg
nagios   16225     1 44 11:01 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     16389  1755  0 11:01 pts/0    00:00:00 grep nagios.cfg
[root@nagiosxi]# ps -ef|grep nagios.cfg
nagios   16225     1 45 11:01 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   16399 16225  0 11:01 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     16515  1755  0 11:01 pts/0    00:00:00 grep nagios.cfg
Command "ps" after restart:

Code: Select all

[root@nagiosxi]# ps -ef|grep nagios.cfg
nagios   16225     1  6 11:01 ?        00:00:08 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   16399 16225  0 11:01 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     22172  1755  0 11:03 pts/0    00:00:00 grep nagios.cfg
After all this changes and checks, Ajax problem persist

Code: Select all

Network Error
------------------
Failed to execute ajax call. Maybe a network issue or webserver is not available.
HTTP-Status-Code: 500
Time: 1535965479
URL:
/nagvis/server/core/ajax_handler.php?mod=Overview&act=getObjectStates&ty=state&f[]=maincfg,maincfg,1535035854&_ajaxid=1535965479

Thanks

Re: Ajax call problem in Nagvis

Posted: Tue Sep 04, 2018 4:23 am
by morabanc
Hi scott,

Apart of Ajax Nagvis problem.

Today happend another situation like the last day:

We have 683 hosts and 3850 services monitoring.
All services and hosts desappeared and only some hosts remained.
After that, I restart "Monitoring Engine" and then it worked correctly with all the hosts and services that we had before.


Thanks !

Re: Ajax call problem in Nagvis

Posted: Tue Sep 04, 2018 1:58 pm
by scottwilkerson
This is certainly not normal, have you tried rebooting the server?

Code: Select all

reboot
Is this a VM that could be losing connectivity to the datastore?

Re: Ajax call problem in Nagvis

Posted: Wed Sep 05, 2018 5:03 am
by morabanc
First time it happend I restarted and solve the problem but some days after happend again.

Nagios is virtualized in VM and all is in the same datastore so it's imposible to happen a connectiviy lose, and on the other hand, this problem comes with the upgrade so it seems the problem it's internal in Nagios operability.

Thanks a lot !

Re: Ajax call problem in Nagvis

Posted: Wed Sep 05, 2018 3:45 pm
by scottwilkerson
morabanc wrote:First time it happend I restarted and solve the problem but some days after happend again.

Nagios is virtualized in VM and all is in the same datastore so it's imposible to happen a connectiviy lose, and on the other hand, this problem comes with the upgrade so it seems the problem it's internal in Nagios operability.

Thanks a lot !
It is possible that you are experiencing queue sending problems, can you do the procedure in this document, and then restart the nagios service

https://support.nagios.com/kb/article.php?id=139

Re: Ajax call problem in Nagvis

Posted: Tue Sep 11, 2018 3:59 am
by morabanc
Hi Scott,

Thanks for that but we solved yesterday. The problem was inode full of snmptt.

Now we still have Ajax problem.


Thanks

Re: Ajax call problem in Nagvis

Posted: Wed Sep 12, 2018 11:51 am
by scottwilkerson
now that the inode issue is fixed, are you receiving any errors if the httpd error_log after trying to access nagvis?

Code: Select all

grep nagvis /var/log/httpd/error_log

Re: Ajax call problem in Nagvis

Posted: Thu Sep 13, 2018 1:38 am
by morabanc
Hi Scott,

I get these errors when I enter in NagVis:

Code: Select all

[Thu Sep 13 08:31:01 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 84 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 184, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:31:11 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 84 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 184, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:31:21 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 80 bytes) in /usr/local/nagvis/share/server/core/classes/GlobalFileCache.php on line 90, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:32:51 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 75 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 184, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:33:01 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 75 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 184, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:33:11 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 183, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:33:21 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 183, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:33:31 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 183, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:33:42 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 183, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
[Thu Sep 13 08:33:52 2018] [error] [client 172.21.10.117] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /usr/local/nagvis/share/server/core/classes/objects/NagVisObject.php on line 183, referer: https://172.16.40.1/nagvis/frontend/nagvis-js/
The procedure is:

1- Enter Nagvis (home page)
2- Wait 30 sec aprox and appear "network error (ajax)"
2.1 - Logs appear in "/var/log/httpd/error_log"
3- Close pop-up and reappear again
4- Enter in any map and pop-up don't appear again


Thanks