SQL Server 2005 Templates

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

Still have a problem even the php runs successfully in DOS window, I can see the output value but in poller there are still error message :
08/04/2010 02:57:38 AM - CMDPHP: Poller[0] Host[21] DS[872] SERVER: C:/AppServ/www/cacti/scripts/ss_win_mssql.php ss_win_mssql 192.168.0.2:1433 temptables cactistats cactipwd, output: U
08/04/2010 02:57:38 AM - CMDPHP: Poller[0] Host[21] DS[872] WARNING: Result from SERVER not valid. Partial Result: U
08/04/2010 02:57:38 AM - PHPSVR: Poller[0] DEBUG: PID[784] CTR[65] RESPONSE:''
08/04/2010 02:57:31 AM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\AppServ\www\cacti\rra\21\871.rrd --template mssql_transactions 1280890518:U
08/04/2010 02:57:31 AM - PHPSVR: Poller[0] DEBUG: PID[784] CTR[65] INC: 'ss_win_mssql.php' FUNC: 'ss_win_mssql' PARMS: '192.168.0.2:1433 temptables cactistats cactipwd
From cmd window, I can get the value :
PS C:\Documents and Settings\Bill> C:\AppServ\php5\php -q C:\AppServ\www\cacti\scripts\ss_win_mssql.php 192.168.0.2:1433 logflushtraffic cactistats cactipwd
bytesflushed:352794624
Has anyone know what's the problem?
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

Hello,

Unfortunately after reading this entire thread, I still am experiencing issues.

Running the script manually is simply producing NO data returned, not even error messages (mssql or otherwise). I have confirmed that I can :

- telnet to the mssql port from the cacti server
- connect via the credentials from an mssql client
- have installed php5-sybase + php5-memcached

Its frustrating because no error message means its very difficult to troubleshoot. I am trying a simple query on the command line such as the following :

Code: Select all

/usr/bin/php5 ss_win_mssql_199.php ss_win_mssql x.x.x.x:50964 connections cactistats password
Unfortunately this doesnt produce anything, as I have said.

Any help would be greatly appreciated!
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

tdkevin:
If you comment out line 10, which should look like 'error_reporting(0);', you'll see some error messages.

Try that and post the errors back here.
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.2.10
MySQL - 5.1.35-log
RRDTool - 1.4.4
------------------------------
As of March 23rd:
Hosts - 564
Graphs - 15274
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

Hello,


Line 10 : error_reporting(0);


Was already uncommented :(

Should the value in that line be different?
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

No, the line should be commented; as in PHP should NOT run it.

If it's un-commented, it hides all errors.
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.2.10
MySQL - 5.1.35-log
RRDTool - 1.4.4
------------------------------
As of March 23rd:
Hosts - 564
Graphs - 15274
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

Oh my apologies, I had it backwards.

Here is the error :

Warning: mssql_connect(): Unable to connect to server: ss_win_mssql:50964 in /usr/local/cacti-0.8.7e/scripts/ss_win_mssql_199.php on line 34
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

Actually I was passing an extra argument in the command line. Troubleshooting that error allowed me to understand more what was happening.

Thank you so much for the help! :)
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Yeah, that's what I was going to say.

No problem.
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.2.10
MySQL - 5.1.35-log
RRDTool - 1.4.4
------------------------------
As of March 23rd:
Hosts - 564
Graphs - 15274
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

have you checked your SQL server got namepipe connection protocol enabled?
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

dust2k wrote:have you checked your SQL server got namepipe connection protocol enabled?
Are you asking me or tdkevin?
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.2.10
MySQL - 5.1.35-log
RRDTool - 1.4.4
------------------------------
As of March 23rd:
Hosts - 564
Graphs - 15274
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

lints wrote:Yeah, that's what I was going to say.

No problem.
Hello,


I have a new problem - not sure if it is related or what. I am able to execute the command via the commandline on my cacti server and it does indeed generate the necessary stats.

I have configured the port, username and password correctly. My input string for the "connections" graph for example , is as follows :

/usr/bin/php <path_cacti>/scripts/ss_win_mssql.php <hostname>:<port> connections <user> <password>

Why would /all/ my graphs be blank?

Your help is appreciated :)
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Not really sure.

What do you see in the poller cache for these graphs?
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.2.10
MySQL - 5.1.35-log
RRDTool - 1.4.4
------------------------------
As of March 23rd:
Hosts - 564
Graphs - 15274
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

I'm seeing the following for example, here's the result for "Windows - SQL Server - Connections" :

Code: Select all

08/12/2010 02:20:11 PM - CMDPHP: Poller[0] Host[55] DS[1438] WARNING: Result from SERVER not valid.  Partial Result: U

I'm not really sure what the root cause might be.
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

For "Windows - SQL Server - Memory" I get :

Code: Select all

08/12/2010 02:15:10 PM - CMDPHP: Poller[0] Host[55] DS[1442] WARNING: Result from SERVER not valid.  Partial Result: Parse error: syntax
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Ok, but when you go to 'System Utilities -> Poller Cache' and pick the host that has the SQL Server graphs, what do you see?

Below is a screenshot of what I have.
Attachments
Sample of my Poller Cache for a host that has SQL Server graphs
Sample of my Poller Cache for a host that has SQL Server graphs
Cacti_1281641939288.png (72.9 KiB) Viewed 5227 times
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.2.10
MySQL - 5.1.35-log
RRDTool - 1.4.4
------------------------------
As of March 23rd:
Hosts - 564
Graphs - 15274
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests