Page 3 of 3

Re: Not getting data in Nagios mobile

PostPosted: Thu Mar 06, 2014 2:07 pm
by balothia
PFA... Nagiosmobile1.tar.gz

Thanks,
Gautam

Re: Not getting data in Nagios mobile

PostPosted: Fri Mar 07, 2014 11:47 am
by lmiltchev
You have the "status.dat" in the "/usr/local/nagiosmobile/"... Its default location is "/usr/local/nagios/var/status.dat". What is the output of the following command?

Code: Select all
locate status.dat

Re: Not getting data in Nagios mobile

PostPosted: Fri Mar 07, 2014 9:27 pm
by balothia
I just copied status.dat to check if there is problem with the file or permission.
This the location of status.dat.
Code: Select all
[root@ ~]# locate status.dat
/usr/local/nagios/var/status.dat

Re: Not getting data in Nagios mobile

PostPosted: Mon Mar 10, 2014 1:03 pm
by tmcdonald
We're going to make some edits to nagiosmobile and stick some debugging code in there.

I want you to replace your nagiosmobile/includes/functions.inc.php file with the one I have uploaded here. You will need to make sure to rename it from ".txt" to ".php". Then I want you to refresh the nagiosmobile page and there should be a "file.txt" in the nagiosmobile directory. Please send that file to us.

Re: Not getting data in Nagios mobile

PostPosted: Thu Mar 13, 2014 10:03 am
by balothia
I tried this but unfortunately there is no file.txt got generated in nagiosmobile directory.
Steps I followed:
1. downloaded the functions.inc.txt
2. did a diff to make sure its different from existing functions.inc.php.
3. renamed the functions.ini.txt to functions.inc.php
4. Refreshed the nagiosmobile page.
5. No file by name file.txt generated

Code: Select all
[root@ includes]# diff functions.inc.php functions.inc.php.bak.1
186,187c186
< $output = print_r($data, true);
< file_put_contents('file.txt', $output);
---
>
[root@ nagiosmobile]# find . -name file.txt
[root@ nagiosmobile]# pwd
/usr/local/nagiosmobile
[root@ nagiosmobile]#

Re: Not getting data in Nagios mobile

PostPosted: Thu Mar 13, 2014 11:21 am
by abrist
Could you post a new tail of your httpd error_log?
Code: Select all
tail -25 /var/log/httpd/error_log

Re: Not getting data in Nagios mobile

PostPosted: Fri Mar 14, 2014 10:24 am
by balothia
Below is the output of error_log.
Code: Select all
[Fri Mar 14 10:21:34 2014] [error] [client ] PHP Notice:  Undefined variable: data in /usr/local/nagiosmobile/includes/functions.inc.php on line 186
[Fri Mar 14 10:21:34 2014] [error] [client ] PHP Warning:  Variable passed to each() is not an array or object in /usr/local/nagiosmobile/includes/functions.inc.php on line 188
[Fri Mar 14 10:21:59 2014] [error] [client ] PHP Notice:  Undefined variable: data in /usr/local/nagiosmobile/includes/functions.inc.php on line 186
[Fri Mar 14 10:21:59 2014] [error] [client ] PHP Warning:  Variable passed to each() is not an array or object in /usr/local/nagiosmobile/includes/functions.inc.php on line 188

Re: Not getting data in Nagios mobile

PostPosted: Fri Mar 14, 2014 1:55 pm
by lmiltchev
Can you spin a brand new VM (for testing purposes), and see if you can access nagios mobile (prior to making any modifications, adding hosts/services, etc.)? Can you also try to access nagios mobile on a different device (to rule out compatibility issues)?

Re: Not getting data in Nagios mobile

PostPosted: Mon Mar 17, 2014 7:02 pm
by balothia
I will try to get a new VM to test this. Also i tested this on iPad/iPhone. Is there any other device you want me to try?

Thanks,
Gautam

Re: Not getting data in Nagios mobile

PostPosted: Tue Mar 18, 2014 11:12 am
by tmcdonald
Considering the errors we are seeing I don't think this is a device issue, but it never hurts to check out of curiosity. We probably will get more useful data out of the new VM.