0.8.8c - Data query does not return output

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

0.8.8c - Data query does not return output

Post by normal »

Dear all,

I'm trying to migrate my custom data query template from my old server to new server.

But somehow the data query does not return any output when run in new server.
Data Query Debug - new server.jpg
Data Query Debug - new server.jpg (48.7 KiB) Viewed 3848 times
It is working fine in old server.
Data Query Debug - old server.jpg
Data Query Debug - old server.jpg (116.67 KiB) Viewed 3848 times
FYI. Following are versions of the software that I'm using..

New Server
-OS : Windows Server 2012 Std R2
-Web server : IIS 8
-Cacti 0.8.8c
-Spine 0.8.8c
-MySQL 5.6.20.0
-PHP 5.6.3
-Net-SNMP 5.7.0
-RRDTool 1.4.5

Old Server
-OS : Windows Server 2003 Std R2
-Web server : IIS 6
-Cacti 0.8.7b
-Spine 0.8.7b
-MySQL 5.0.51a
-PHP 5.2.5
-Net-SNMP 5.4.1.3
-RRDTool 1.2.26

Any idea what can cause this ? Could it be there have syntax change on the php between version 5.6.3 and 5.2.5 ?

Any help would be much appreciated.
Last edited by normal on Fri May 15, 2015 12:00 pm, edited 5 times in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: 0.8.8c - Data query does not return output

Post by BSOD2600 »

Assuming that query example is targeting the same device...
1) rules/firewalls which prevent new server from connecting to device?
2) if you manually run that same php query from the PHP Script Server on the new server, does it work?
3) if yes to #2, then likely the web server doesnt have permissions to read/execute the script.
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

Re: 0.8.8c - Data query does not return output

Post by normal »

Hi BSOD2600,

Thanks for your reply.

Following is output of the php script

Seems extension for ssh2 function is not installed in my new server with php 5.6.3.
php ssh2 function error.jpg
php ssh2 function error.jpg (16.6 KiB) Viewed 3848 times
I'm still searching around for how to get the php extension install in my new server.
Last edited by normal on Fri May 15, 2015 11:50 am, edited 1 time in total.
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

Re: 0.8.8c - Data query does not return output

Post by normal »

Update :

I managed to resolve the ssh2 function issue by install phpseclib as suggestion in this thread : http://stackoverflow.com/questions/2481 ... also-enabl

However, I hit another issue when created graph with the related template...

somehow, no data show in the graph..
Graph with no data.jpg
Graph with no data.jpg (28.49 KiB) Viewed 3853 times
Found Cacti log start showing following warnings after I created the graph..
Cacti warning logs.jpg
Cacti warning logs.jpg (25.89 KiB) Viewed 3853 times
But I try run snmp query from the Cacti server to the client host, it looks ok...
snmp query.jpg
snmp query.jpg (103.48 KiB) Viewed 3853 times
But there have one thing that I think is abnormal. Somehow, the php query from the PHP Script Server doesn't return any output
php query from the PHP Script Server.jpg
php query from the PHP Script Server.jpg (12.62 KiB) Viewed 3848 times
but if query not through the PHP Script Server, it able to return the output..
php query not through PHP Script Server.jpg
php query not through PHP Script Server.jpg (25.55 KiB) Viewed 3848 times
In my old server, both type of query are able to return output.

Not sure what is the root cause actually ??

Would appreciate if you can enlighten me..
Last edited by normal on Fri May 15, 2015 8:06 pm, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: 0.8.8c - Data query does not return output

Post by BSOD2600 »

normal wrote:Found Cacti log start showing following warnings after I created the graph..
Cacti warning logs.jpg
If you snmpwalk that specific OID which times out, does it also fail? If cacti thinks a device is down, it wont run any scripts against it.
normal wrote:But there have one thing that I think is abnormal. Somehow, the php query from the PHP Script Server doesn't return any output
php query from the PHP Script Server.jpg
Try using the full path to the script
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

Re: 0.8.8c - Data query does not return output

Post by normal »

Hi BSOD2600,

Here is the outcome

snmpwalk out for OID .1.3.6.1.2.1.1.3.0
snmp query output.jpg
snmp query output.jpg (9.08 KiB) Viewed 3837 times
php query from the PHP Script Server with full path to the script
php query with and without script server2.jpg
php query with and without script server2.jpg (52.62 KiB) Viewed 3837 times
Note:
a) To install phpseclib, I created 'c:\php\includes' folder manually and uncommented "include_path='.;c:\php\includes" in c:\php\php.ini
b) I included output of php query that not through PHP Script Server for comparison.

For the permission denied errror, I tried grant full permission to everyone for following folders and restart the Cacti server, but didn't help.

C:\inetpub\wwwroot\cacti\scripts
C:\php\includes
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: 0.8.8c - Data query does not return output

Post by BSOD2600 »

ah-ha, permission denied errors finally! ;)

What about trying to grant IUSR and IIS_USRS read/execute rights to that folder referenced?
another option is to use sysinternal process monitor and examine exactly what/where the denied error is occurring. Link in my signature for a walkthrough.
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

Re: 0.8.8c - Data query does not return output

Post by normal »

Hi BSOD2600,

Thanks for your suggestion.

I tried both of the options you suggested. But still no luck :(

The sysinternal process monitor can't find any denied error
sysinternal process monitor - output.jpg
sysinternal process monitor - output.jpg (90.06 KiB) Viewed 3771 times
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

Re: 0.8.8c - Data query does not return output

Post by normal »

Sorry, BSOD2600. My bad, I misled you in my previous post.

It should be nothing wrong with the folder or file permission.

The reason why I got the 'Permission Denied' error is because there have an extra 'scripts' wording in the query -_-"
php query 1.jpg
php query 1.jpg (31.12 KiB) Viewed 3768 times
After take out the 'scripts' from the query, no more permission denied error. However, the no result return issue still persist :-?
php query 2.jpg
php query 2.jpg (18.9 KiB) Viewed 3768 times
normal
Posts: 14
Joined: Fri May 08, 2015 3:50 am

Re: 0.8.8c - Data query does not return output

Post by normal »

I try to compare the output of verbose query for both of my old and new server.

Found following differences

Difference# 1 - quantity of running data query

Old server
verbose query 1 - old server.jpg
verbose query 1 - old server.jpg (7.54 KiB) Viewed 3764 times
New server
verbose query 1 - new server.jpg
verbose query 1 - new server.jpg (6.79 KiB) Viewed 3764 times
Difference# 2 - More Found data query XML file in old server

Old server
verbose query 2 - old server.jpg
verbose query 2 - old server.jpg (48.17 KiB) Viewed 3764 times
New server
verbose query 2 - new server.jpg
verbose query 2 - new server.jpg (13.75 KiB) Viewed 3764 times
and attached are the verbose query output for both of the old and new server in details.
verbose query output.zip
(2.55 KiB) Downloaded 190 times
Not sure if something to do with the xml file configuration ? There have format change for the xml file in old and new Cacti ?

Any help would be much appreciated.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: 0.8.8c - Data query does not return output

Post by BSOD2600 »

The script files are compatible between the old and new version of Cacti, nothing really has changed in that regard.

Are the php.ini configs the same between the severs? A tool like WinMerge to easily compare is ideal.

If php settings are the same, I think it's time to debug the ss_seagatedqlinuxhit.php script. Did you write it or find it on the forum? If the latter, I'd ask for assistance on troubleshooting in the thread you got it. If the former, you've got some work to do... ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests