Not getting data in Nagios mobile

Information and discussions relating to the Nagios Mobile addon.

Re: Not getting data in Nagios mobile

Postby balothia » Thu Mar 06, 2014 2:07 pm

PFA... Nagiosmobile1.tar.gz

Thanks,
Gautam
Attachments
nagiosmobile1.tar.gz
nagiosmobile1.tar.gz
(171.87 KiB) Downloaded 330 times
balothia
 
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not getting data in Nagios mobile

Postby lmiltchev » Fri Mar 07, 2014 11:47 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12485
Joined: Mon May 23, 2011 12:15 pm

Re: Not getting data in Nagios mobile

Postby balothia » Fri Mar 07, 2014 9:27 pm

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
balothia
 
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not getting data in Nagios mobile

Postby tmcdonald » Mon Mar 10, 2014 1:03 pm

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.
Attachments
functions.inc.txt
(11.98 KiB) Downloaded 337 times
Former Nagios employee
tmcdonald
 
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Not getting data in Nagios mobile

Postby balothia » Thu Mar 13, 2014 10:03 am

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]#
balothia
 
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not getting data in Nagios mobile

Postby abrist » Thu Mar 13, 2014 11:21 am

Could you post a new tail of your httpd error_log?
Code: Select all
tail -25 /var/log/httpd/error_log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Not getting data in Nagios mobile

Postby balothia » Fri Mar 14, 2014 10:24 am

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
balothia
 
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not getting data in Nagios mobile

Postby lmiltchev » Fri Mar 14, 2014 1:55 pm

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)?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12485
Joined: Mon May 23, 2011 12:15 pm

Re: Not getting data in Nagios mobile

Postby balothia » Mon Mar 17, 2014 7:02 pm

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
balothia
 
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not getting data in Nagios mobile

Postby tmcdonald » Tue Mar 18, 2014 11:12 am

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.
Former Nagios employee
tmcdonald
 
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Previous

Return to Nagios Mobile

Who is online

Users browsing this forum: No registered users and 0 guests