SQL Server 2005 Templates

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

Moderators: Developers, Moderators

Post Reply
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

here is a screenshot of the poller cache :
Attachments
cacti_poller.jpg
cacti_poller.jpg (199.94 KiB) Viewed 4606 times
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Can you copy the contents of the 'Input String' field on one of the SQL Server's Data Input Methods?

It seems that your poller cache is missing a field and I'm wondering why it's not showing up properly.
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 »

here is the one for "sql server - connections" :

Code: Select all

/usr/bin/php /usr/local/cacti-0.8.7e/scripts/ss_win_mssql.php <hostname>:<port> connections <user> <password>
That exact same line is what I have used to test via the command line manually, and it returns results without issues.

Thanks
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Here's what I have for 'SQL Server - Connections':

Code: Select all

<path_cacti>/scripts/ss_win_mssql.php ss_win_mssql <hostname>:<port> connections <user> <password>
So... It seems that your Data Input Methods are missing a field and I'm wondering why it's not there. Did you modify the 'Input String' field for these DS?

If you look at my poller cache, you'll see that between the name of the script and the hostname/port there's an argument that you don't have in your cache.

This argument tells the Script Server which function to run and without it, these graphs aren't going to work.

You don't need that argument there when running the script on the command line because the script behaves a little bit differently when run manually.
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:Here's what I have for 'SQL Server - Connections':

Code: Select all

<path_cacti>/scripts/ss_win_mssql.php ss_win_mssql <hostname>:<port> connections <user> <password>
So... It seems that your Data Input Methods are missing a field and I'm wondering why it's not there. Did you modify the 'Input String' field for these DS?

If you look at my poller cache, you'll see that between the name of the script and the hostname/port there's an argument that you don't have in your cache.

This argument tells the Script Server which function to run and without it, these graphs aren't going to work.

You don't need that argument there when running the script on the command line because the script behaves a little bit differently when run manually.
Ok I have deleted all the data input methods, templates, hosts, etc. I re-imported and started again from scratch. I will let you know how it goes at this point.

The input line now reads :

Code: Select all

<path_cacti>/scripts/ss_win_mssql.php ss_win_mssql <hostname>:<port> connections <user> <password>
tdkevin
Posts: 20
Joined: Wed Aug 11, 2010 12:27 pm

Post by tdkevin »

Just wanted to report that after deleting everything and then re-importing the template, everything works fine now!

Thanks so much for your help :)
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

No problem.

I'm just happy that they work for you.
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
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Post by tosage »

Hello all,

I have the same return that kevin for all graph template (Result from SERVER not valid. Partial Result: U) but when i launch the command from the server :
xxxxx@srvxxxxxx:~$ sudo /usr/bin/php -q /usr/share/cacti/site/scripts/ss_win_mssql.php 10.10.xxx.xxx scans cactistats toto
xxxxx@srvxxxxxx:~$
And in my Poller Cache i have this info :
Script Server: /usr/share/cacti/site/scripts/ss_win_mssql.php ss_win_mssql 10.10.xxx.xxx:1433 scans cactistats toto
RRD: /srv/cacti/rra/srvaiinfra-dev_mssql_rangescans_79.rrd
I have delete all the graph template, data template, etc... but the return of the plugin is always the same.
I have test too the telnet connection on the 1433 port, it is OK
the return is the same for all graph template so maybe a script problem ? i have the ss_win_mssql.txt in the page 2 of this thread :/

Any reaction, advice for help me is welcome :)

Thanks!
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

As mentioned in previous posts, 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
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Post by tosage »

Sorry, i have read this too and i don't see the relation, oups :/

So with the error_reporting(1);
i have this :

PHP Fatal error: Class 'Memcache' not found in /usr/share/cacti/site/scripts/ss_win_mssql.php on line 29

I don't understand why because i have installed the packet memcached with :

sudo aptitude install memcached

It need a config to be enable ?
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

That's the server component of MemCache.

PHP also needs an extension so it can interface with it.

On CentOS/RedHat, it the package is called 'php-pecl-memcache', but it might also be installable via PECL.

Alternatively, you can just comment out the parts to do with MemCache.
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
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Post by tosage »

Yeah it solved my problem.
On debian like Ubuntu Server i have install this :

sudo aptitude install php5-memcache

And now it's work fine ;)
Thanks for your help :D
isse
Posts: 16
Joined: Tue Nov 25, 2008 5:50 am

Re: SQL Server 2005 Templates

Post by isse »

Anyone tried this template on a Windows cacti server ?
I have done the part on the sql server, and imported the templates and edited and copied the script.
But i only get:
ERROR: SS[1] PHP Script Server communications lost. Restarting PHP Script Server

If i try to run the script from a dos prompt i dont get any data att all, no error, nothing.

Any hints ?

Thanks
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Re:

Post by lints »

Hi isse,

As dusk2k wrote a few months ago:
dust2k wrote:fixed the problem, I believe the ss_win_mssql.php need to be modified for Windows OS, mssql_connect() function shouldn't use port in windows environment.

so for windows OS user, please change

Code: Select all

if (! $link = mssql_connect($host.':'.$port, $username, $password) )
to

Code: Select all

if (! $link = mssql_connect($host, $username, $password) )
, otherwise the connection won't be successful.
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
isse
Posts: 16
Joined: Tue Nov 25, 2008 5:50 am

Re: SQL Server 2005 Templates

Post by isse »

Thanks!
THis togheter with the sql extension in the Windows php installer solved it.

/I
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests