Unknown results, but only with Spine

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

Moderators: Developers, Moderators

Post Reply
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Unknown results, but only with Spine

Post by Cylindric »

Hello,

I am monitoring Windows hosts, some of which are remote and locked behind firewalls etc, so have a custom utility to retrieve stats for these from an intermediary database.

When I run the command as a data source through CMD, it works fine, but through Spine I get "U".

For example, here's the logfile output for one server's disks through CMD:

Code: Select all

09/04/2012 11:58:15 PM - CMDPHP: Poller[0] Host[4] DS[340] CMD: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get Size c, output: 42842714112
09/04/2012 11:58:19 PM - CMDPHP: Poller[0] Host[4] DS[340] CMD: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get FreeSpace c, output: 7759368192
09/04/2012 11:58:22 PM - CMDPHP: Poller[0] Host[4] DS[340] CMD: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get FreePercent c, output: 18.1112899890407
09/04/2012 11:58:22 PM - POLLER: Poller[0] CACTI2RRD: D:/Cacti/rrdtool-1.4.5/rrdtool.exe update D:\Cacti\cacti-0.8.8a\rra\servername_size_340.rrd --template size:free_space:free_percent 1346799478:42842714112:7759368192:18.1112899890407
Here's the equivalent data item in Spine:

Code: Select all

09/04/2012 11:54:51 PM - SPINE: Poller[0] Host[19] ERROR: Empty result [servername]: 'D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get Size c'
09/04/2012 11:54:51 PM - SPINE: Poller[0] Host[19] TH[1] DS[378] SCRIPT: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get Size c, output: U
09/04/2012 11:54:51 PM - SPINE: Poller[0] Host[19] ERROR: Empty result [servername]: 'D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get FreeSpace c'
09/04/2012 11:54:51 PM - SPINE: Poller[0] Host[19] TH[1] DS[378] SCRIPT: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get FreeSpace c, output: U
09/04/2012 11:54:51 PM - SPINE: Poller[0] Host[19] ERROR: Empty result [servername]: 'D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get FreePercent c'
09/04/2012 11:54:51 PM - SPINE: Poller[0] Host[19] TH[1] DS[378] SCRIPT: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe disks servername get FreePercent c, output: U
The command always works when run from the command line or from CMD, just not from Spine. I'm not sure what I can try next to diagnose the problem.
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
artagel
Cacti User
Posts: 226
Joined: Wed May 21, 2008 11:33 pm

Re: Unknown results, but only with Spine

Post by artagel »

Just off the top of my head, I'd check permissions to make sure if spine can actually run the exe. Also, why don't you run spine manually with high verbosity so you can maybe see what it's doing.
-Dan
Please mark the topic solved if this resolves your problem.
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Re: Unknown results, but only with Spine

Post by Cylindric »

Thanks for that, I'm not very familiar with the way Spine works.

It seems to be a problem with the way Spine uses sh in a to get things done.

Code: Select all

D:\Cacti\cacti-spine-0.8.8a-win32>spine -f 2 -l 2 -V 5
cygwin warning:
  MS-DOS style path detected: D:/Cacti/cacti-0.8.8a/log/cacti.log
  Preferred POSIX equivalent is: /cacti-0.8.8a/log/cacti.log
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found
I'll try with more sh-friendly paths using forward-slashes...
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Re: Unknown results, but only with Spine

Post by Cylindric »

Cylindric wrote:I'll try with more sh-friendly paths using forward-slashes...
Ah, they already are in the XML it seems:

Code: Select all

<interface>
	<name>Get PerfMon Disks</name>
	<script_path>|path_cacti|/scripts/query_mssql_counters.exe disks</script_path>
If I just paste the command into a cygwin shell as it is in the config file, it works - it seems to be the clever path-fixing causing an issue.

Code: Select all


username@cactiserver ~
$ D:/Cacti/cacti-0.8.8a/scripts/query_mssql_counters.exe disks servername num_indexes
7
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
artagel
Cacti User
Posts: 226
Joined: Wed May 21, 2008 11:33 pm

Re: Unknown results, but only with Spine

Post by artagel »

So are you saying you fixed it;)?
Definitely looks like an sh pathing issue.
-Dan
Please mark the topic solved if this resolves your problem.
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Re: Unknown results, but only with Spine

Post by Cylindric »

Unfortunately not. It works if I run the command manually with forward-slashes as I've put in the xml, but Spine seems to 'fix' them to Windows-style path-separators, even though that doesn't work in Cygwin.
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Unknown results, but only with Spine

Post by BSOD2600 »

1) Using Spine 0.8.8a?
2) Why is disks in the <script_path>?
3) Sure NTFS permission aren't the issue? Sysinternals process monitor will show what's really going on. Especially for the "sh: D:\Cacti\cacti-0.8.8a\scripts\query_mssql_counters.exe: command not found" error.
Bl00dsoul
Posts: 2
Joined: Tue Apr 24, 2012 5:39 am

Re: Unknown results, but only with Spine

Post by Bl00dsoul »

I'm having this exact same problem..
Have you found a solution yet?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest