Page 1 of 2

Adding servers problem

Posted: Tue May 06, 2014 1:34 am
by alvinh
Hi there,

I have installed Nagios Fusion, but I cant add a server to Nagios Fusion.
The webGUI doesnt say if there is an error or not, it just accept it and shows me an empty table.

I did :

Code: Select all

tail -f /var/log/httpd/error_log
to look for errors.
This is what it gives me:

Code: Select all

[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Notice:  unserialize(): Error at offset 5 of 39 bytes in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 41, referer: http://10.10.10.2/nagiosfusion/admin/
[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 145, referer: http://10.10.10.2/nagiosfusion/admin/
[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Notice:  unserialize(): Error at offset 5 of 168 bytes in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 41, referer: http://10.10.10.2/nagiosfusion/admin/
[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Notice:  unserialize(): Error at offset 5 of 39 bytes in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 41, referer: http://10.10.10.2/nagiosfusion/admin/
[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 145, referer: http://10.10.10.2/nagiosfusion/admin/
[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Notice:  unserialize(): Error at offset 5 of 39 bytes in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 41, referer: http://10.10.10.2/nagiosfusion/admin/
[Mon May 05 14:43:51 2014] [error] [client 10.212.134.200] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-xmlsysstat.inc.php on line 145, referer: http://10.10.10.2/nagiosfusion/admin/
Any help guys?

Re: Adding servers problem

Posted: Tue May 06, 2014 9:34 am
by sreinhardt
Well, let's start with the basics. What OS and architecture are your fusion and nagios systems? Also what versions of XI and fusion are you presently using with this test?

Re: Adding servers problem

Posted: Thu May 08, 2014 1:30 am
by alvinh
Thanks for the reply, but I already fixed it with a clean install.
Another problem has surfaced though.. I can't seem to be getting any data on my Nagios Fusion.
I am using Red Hat on both systems (1 fusion V2012R1.7 and 1 Nagios XI V2012R2.9). I have read that you need to create

Code: Select all

/usr/local/nagiosfusion/var/poller.log
but its not saving any data in it.
I have checked the credentials and its the right ones.

thanks guys!

Re: Adding servers problem

Posted: Thu May 08, 2014 12:32 pm
by slansing
What is the output of:

Code: Select all

ls -la /usr/local/nagiosfusion/var/poller.log

Code: Select all

 tail -50 /var/log/httpd/error_log
**note, please select the output from the above commands and click the "Code" button in your reply to wrap it neatly.**

Also, verify that your fusion settings for the nagios server are correct:

http://assets.nagios.com/downloads/nagi ... tarted.pdf

Re: Adding servers problem

Posted: Thu May 08, 2014 12:38 pm
by lmiltchev
When you go to: Configure->Server Credentials, do you see the green "OK" check-mark in the "Auth Check" column?

What is the output of the following commands?

Code: Select all

crontab -u nagios -l
ps -ef | grep poller
tail /var/log/cron
tail /usr/local/nagiosfusion/var/poller.log

Re: Adding servers problem

Posted: Thu Dec 18, 2014 4:58 am
by alepo.prateek
HI Nagios Team,

I am still getting the same above mentioned (in first thread) error while adding a new server.

I am not able to add new server in nagios fusion. Currently i am having rhel linux version.

It seems this thread is still not closed.

Do let me know the way forward.

Thanks,

Re: Adding servers problem

Posted: Thu Dec 18, 2014 11:58 am
by abrist
Please post the output from the commands that Ludmil requested:
lmiltchev wrote:crontab -u nagios -l
ps -ef | grep poller
tail /var/log/cron
tail /usr/local/nagiosfusion/var/poller.log

Re: Adding servers problem

Posted: Thu Dec 18, 2014 11:40 pm
by alepo.prateek
HI Nagios Team,
Thanks for your prompt reply .PLease find the belwo output:

[root@localhost nagiosfusion]# crontab -u nagios -l
* * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1
*/5 * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/dbmaint.php > /usr/local/nagiosfusion/var/dbmaint.log 2>&1
*/5 * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/poller.php > /usr/local/nagiosfusion/var/poller.log 2>&1


[root@localhost nagiosfusion]# ps -ef | grep poller
root 32228 3192 0 10:05 pts/0 00:00:00 grep poller


[root@localhost nagiosfusion]# tail /var/log/cron
Dec 19 10:04:01 localhost CROND[32102]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1)
Dec 19 10:05:01 localhost CROND[32175]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1)
Dec 19 10:05:01 localhost CROND[32176]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/dbmaint.php > /usr/local/nagiosfusion/var/dbmaint.log 2>&1)
Dec 19 10:05:01 localhost CROND[32177]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1)
Dec 19 10:05:01 localhost CROND[32178]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/poller.php > /usr/local/nagiosfusion/var/poller.log 2>&1)
Dec 19 10:05:01 localhost CROND[32179]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Dec 19 10:05:01 localhost CROND[32180]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1)
Dec 19 10:06:02 localhost CROND[32263]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1)
Dec 19 10:06:02 localhost CROND[32262]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1)
Dec 19 10:06:02 localhost CROND[32264]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1)


[root@localhost nagiosfusion]# tail /usr/local/nagiosfusion/var/poller.log
tail: cannot open `/usr/local/nagiosfusion/var/poller.log' for reading: No such file or directory

Think like there us a problem with poller.php . Below is the output generated while executing poller.php manually
[root@localhost nagiosfusion]# /usr/bin/php -q /usr/local/nagiosfusion/cron/poller.php
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/cron/poller.php on line 122
Polling Recent Alerts...
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 29
Polling Top Alert Producers...
TRUNCATING topalertproducers table
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-topalertproducers.inc.php on line 36
2 callbacks run
...***GET DATA!***
RUNTIME: 30 INTERVAL: 30 POLL INTERVAL: 30
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/cron/poller.php on line 122
Polling Recent Alerts...
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 29
2 callbacks run
Loop time: 0 seconds
...***GET DATA!***
RUNTIME: 60 INTERVAL: 30 POLL INTERVAL: 30
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/cron/poller.php on line 122
Polling Recent Alerts...
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 29
2 callbacks run
Loop time: 1 seconds

Thanks

Re: Adding servers problem

Posted: Thu Dec 18, 2014 11:43 pm
by alepo.prateek
Hi,

Please find the below output :

[root@localhost nagiosfusion]# crontab -u nagios -l
* * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1
* * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1
*/5 * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/dbmaint.php > /usr/local/nagiosfusion/var/dbmaint.log 2>&1
*/5 * * * * /usr/bin/php -q /usr/local/nagiosfusion/cron/poller.php > /usr/local/nagiosfusion/var/poller.log 2>&1


[root@localhost nagiosfusion]# ps -ef | grep poller
root 32228 3192 0 10:05 pts/0 00:00:00 grep poller


[root@localhost nagiosfusion]# tail /var/log/cron
Dec 19 10:04:01 localhost CROND[32102]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1)
Dec 19 10:05:01 localhost CROND[32175]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1)
Dec 19 10:05:01 localhost CROND[32176]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/dbmaint.php > /usr/local/nagiosfusion/var/dbmaint.log 2>&1)
Dec 19 10:05:01 localhost CROND[32177]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1)
Dec 19 10:05:01 localhost CROND[32178]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/poller.php > /usr/local/nagiosfusion/var/poller.log 2>&1)
Dec 19 10:05:01 localhost CROND[32179]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Dec 19 10:05:01 localhost CROND[32180]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1)
Dec 19 10:06:02 localhost CROND[32263]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/cmdsubsys.php > /usr/local/nagiosfusion/var/cmdsubsys.log 2>&1)
Dec 19 10:06:02 localhost CROND[32262]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/eventman.php > /usr/local/nagiosfusion/var/eventman.log 2>&1)
Dec 19 10:06:02 localhost CROND[32264]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosfusion/cron/sysstat.php > /usr/local/nagiosfusion/var/sysstat.log 2>&1)


[root@localhost nagiosfusion]# tail /usr/local/nagiosfusion/var/poller.log
tail: cannot open `/usr/local/nagiosfusion/var/poller.log' for reading: No such file or directory

Seems like issue is with poller.php. Below is the output of manual execution of poller.php
[root@localhost nagiosfusion]# /usr/bin/php -q /usr/local/nagiosfusion/cron/poller.php
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/cron/poller.php on line 122
Polling Recent Alerts...
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 29
Polling Top Alert Producers...
TRUNCATING topalertproducers table
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-topalertproducers.inc.php on line 36
2 callbacks run
...***GET DATA!***
RUNTIME: 30 INTERVAL: 30 POLL INTERVAL: 30
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/cron/poller.php on line 122
Polling Recent Alerts...
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 29
2 callbacks run
Loop time: 0 seconds
...***GET DATA!***
RUNTIME: 60 INTERVAL: 30 POLL INTERVAL: 30
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/cron/poller.php on line 122
Polling Recent Alerts...
PHP Notice: unserialize(): Error at offset 5 of 314 bytes in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 379
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 29
2 callbacks run
Loop time: 1 seconds

Re: Adding servers problem

Posted: Fri Dec 19, 2014 12:34 pm
by scottwilkerson
Can you post the results of the following

Code: Select all

ls -la /usr/local/nagiosfusion
ls -la /usr/local/nagiosfusion/var
chage -l nagios