Graphs not being created
Moderators: Developers, Moderators
Graphs not being created
Server 2k3 R2 SP2 w/ IIS6. Just ran a fresh install using the installer. I'm using a custom script to poll WMI stats, in this instance the number of active TS sessions on a server. The templates thing still has me exceedingly confused, but I found this howto (http://www.cacti.net/downloads/docs/html/how_to.html) to create a single graph. I've done so, but I'm still getting the below when I go to the graphs tree, and the same when I open the graph page (with the 4 entries, but they're blank).
I've set up two instances - one from the localhost (which I RDP onto), one from another TS server, neither are producing data. The script works in another MRTG install, and when I run it manually.
I do know the command wasn't running properly at first since I'd forgotten the //nologo switch with Cscript, so the output was initially
"Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved."
But I've since fixed that, and the graphs still don't appear. Graph debug gives me:
RRDTool Command:
C:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Active TS Sessions" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="D\:/Inetpub/stats/cacti/rra/8/15.rrd":localhost_tsactive:AVERAGE \
RRDTool Says:
"
I'm at a loss at the moment. I've included the cacti log in a txt file. Any other info needed?
Thanks -
I've set up two instances - one from the localhost (which I RDP onto), one from another TS server, neither are producing data. The script works in another MRTG install, and when I run it manually.
I do know the command wasn't running properly at first since I'd forgotten the //nologo switch with Cscript, so the output was initially
"Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved."
But I've since fixed that, and the graphs still don't appear. Graph debug gives me:
RRDTool Command:
C:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Active TS Sessions" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="D\:/Inetpub/stats/cacti/rra/8/15.rrd":localhost_tsactive:AVERAGE \
RRDTool Says:
"
I'm at a loss at the moment. I've included the cacti log in a txt file. Any other info needed?
Thanks -
- Attachments
-
- From Graphs Tree
- nographs.png (23.9 KiB) Viewed 3397 times
-
- cactilog.txt
- Logfile
- (24.69 KiB) Downloaded 191 times
Step 1: get a functional cacti installation with the default/included templates.
step 2: create custom scripts/templates for the data you need.
Get step 1 done yet? when you run the wmi script manually, does it work? did you read the documentation site on how to create scripts/templates?
step 2: create custom scripts/templates for the data you need.
Get step 1 done yet? when you run the wmi script manually, does it work? did you read the documentation site on how to create scripts/templates?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Yes, with the exception of using (testing w/) the default templates, and yes.
My company's policy is not to use SNMP on windows servers, WMI only, and I'm restricted from using SNMP on the networking equipment (standalone snmp community) since I'm in systems. I will agree up front the security policies are a bit ridiculous, but unfortunately they're the policies I have to work within.
The script runs fine, however, when I execute manually, and when called from MRTG.
Cacti installs fine. I can get to Cacti, and I see no errors in the logs related to Cacti, or an otherwise botched install. I attached the logs for your convenience.
I've reviewed the documentation site extensively, and can't find where I'm going wrong. The error message itself is fairly cryptic, considering the result I get from the script itself. The log shows
"01/06/2010 11:35:01 AM - CMDPHP: Poller[0] Host[8] DS[15] CMD: cscript //nologo D:/Inetpub/stats/cacti/scripts/server2003.activetssessions.vbs , output: U
01/06/2010 11:35:01 AM - CMDPHP: Poller[0] Host[8] DS[15] WARNING: Result from CMD not valid. Partial Result: U "
Which I don't follow, because the exact same command when run from a command line returns:
D:\Inetpub\stats\cacti\scripts>cscript //nologo server2003.activetssessions.vbs cactitest
1
(the servername in this instance is cactitest)
The input string under the Data Input Method is as follows:
cscript //nologo <path_cacti>/scripts/server2003.activetssessions.vbs <hostname>
And the remainder of the input method config is attached.
Thanks -
SB
My company's policy is not to use SNMP on windows servers, WMI only, and I'm restricted from using SNMP on the networking equipment (standalone snmp community) since I'm in systems. I will agree up front the security policies are a bit ridiculous, but unfortunately they're the policies I have to work within.
The script runs fine, however, when I execute manually, and when called from MRTG.
Cacti installs fine. I can get to Cacti, and I see no errors in the logs related to Cacti, or an otherwise botched install. I attached the logs for your convenience.
I've reviewed the documentation site extensively, and can't find where I'm going wrong. The error message itself is fairly cryptic, considering the result I get from the script itself. The log shows
"01/06/2010 11:35:01 AM - CMDPHP: Poller[0] Host[8] DS[15] CMD: cscript //nologo D:/Inetpub/stats/cacti/scripts/server2003.activetssessions.vbs , output: U
01/06/2010 11:35:01 AM - CMDPHP: Poller[0] Host[8] DS[15] WARNING: Result from CMD not valid. Partial Result: U "
Which I don't follow, because the exact same command when run from a command line returns:
D:\Inetpub\stats\cacti\scripts>cscript //nologo server2003.activetssessions.vbs cactitest
1
(the servername in this instance is cactitest)
The input string under the Data Input Method is as follows:
cscript //nologo <path_cacti>/scripts/server2003.activetssessions.vbs <hostname>
And the remainder of the input method config is attached.
Thanks -
SB
- Attachments
-
- datainputmethod.png (30.73 KiB) Viewed 3215 times
Well at long as the SNMP write community is private/protected and ACL's are in place so other departments/Internet can't read snmp, there shouldn't be a big security issue...
You do realize that WMI is tied into Windows user authentication. You need to test the script under the cacti scheduled user account (which will be the account at that actually invokes the wmi script).
I agree, figuring out why a script doesn't return data can be painful, even with debugging logging enabled. Often, I've had to revert back to tracing a polling cycle with Sysinternals Process Monitor, finding when cmd.php launches cmd.exe which launches the script... then looking at the command paramaters and/or error to see if things are working correctly.
Pretty much all the WMI scripts found on the forum, hackishly do it wrapped via Perl, because I believe no one can figure out how to do the cscript //nologo via scripting (as cacti doesn't like it via the command path).
You do realize that WMI is tied into Windows user authentication. You need to test the script under the cacti scheduled user account (which will be the account at that actually invokes the wmi script).
I agree, figuring out why a script doesn't return data can be painful, even with debugging logging enabled. Often, I've had to revert back to tracing a polling cycle with Sysinternals Process Monitor, finding when cmd.php launches cmd.exe which launches the script... then looking at the command paramaters and/or error to see if things are working correctly.
Pretty much all the WMI scripts found on the forum, hackishly do it wrapped via Perl, because I believe no one can figure out how to do the cscript //nologo via scripting (as cacti doesn't like it via the command path).
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Yeah, I know. SNMP read only should be pretty harmless. I don't set the policies, I just follow them...
I was able to get a network guy to give me SNMP R/O access to a spam gateway, so I'm able to test w/ SNMP on this one device for a short while. After a complete uninstall/reinstall of everything Cacti related except IIS, it is indeed working, and graphing well with an inbuilt template and an OID.
As for credentials, the scheduled poller task is running under domain admin creds at the moment, just while testing (I'll be moving it to a dedicated service account soon). The same credentials can run the WMI script from the command line with no issue, so I don't believe it's a permissions problem, at least not right now. But i definitely see the logic and thanks for the heads up, i might not have remembered that when I made the svc acct.
What in particular, do you know, does Cacti not like about the cscript //nologo method? The only output from the script is the raw number. The error makes it look like it's being given back a word that starts with U, but I can't see anything along those lines.
When I used the script with MRTG, I had to have it echo a second value at the end (a zero) and tell mrtg to use noo, otherwise it squawked about expecting a value but getting null. Is there anything like that which could be in play here?
Since reinstalling I'll try it again, now that I know definitively things are working. I'll give your procmon tracing suggestion a try if it still puts up a fight.
Thanks, and happy new year.
I was able to get a network guy to give me SNMP R/O access to a spam gateway, so I'm able to test w/ SNMP on this one device for a short while. After a complete uninstall/reinstall of everything Cacti related except IIS, it is indeed working, and graphing well with an inbuilt template and an OID.
As for credentials, the scheduled poller task is running under domain admin creds at the moment, just while testing (I'll be moving it to a dedicated service account soon). The same credentials can run the WMI script from the command line with no issue, so I don't believe it's a permissions problem, at least not right now. But i definitely see the logic and thanks for the heads up, i might not have remembered that when I made the svc acct.
What in particular, do you know, does Cacti not like about the cscript //nologo method? The only output from the script is the raw number. The error makes it look like it's being given back a word that starts with U, but I can't see anything along those lines.
When I used the script with MRTG, I had to have it echo a second value at the end (a zero) and tell mrtg to use noo, otherwise it squawked about expecting a value but getting null. Is there anything like that which could be in play here?
Since reinstalling I'll try it again, now that I know definitively things are working. I'll give your procmon tracing suggestion a try if it still puts up a fight.
Thanks, and happy new year.
Not entirely sure about the cscript //nologo thing. Just recall when I initially tried to get wmi scripts working via that years ago, it just wouldn't return data. I think the slashes get escaped out or not put into the db correctly...
"U" is cacti's way of saying no data returned -- for several reasons. Have you read through the documentation for cacti scripting? http://docs.cacti.net/manual:087:3a_adv ... ut_methods
"U" is cacti's way of saying no data returned -- for several reasons. Have you read through the documentation for cacti scripting? http://docs.cacti.net/manual:087:3a_adv ... ut_methods
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
I had read through that doc previously, but I must admit, that was two holidays, many days off, and even more spiked eggnogs ago. So I gave it another read through, and performed what I believe to be the same steps, and now the custom scripts are indeed giving me data - first try. I've got both SNMP and my custom WMI polls reporting quite happily.
Again, the only major change I can see is that I uninstalled and reinstalled /everything/. But, as long as it works, I'll take it. Thanks for the help.
I'm having a problem with Spine as well - it's not charting, but I can see the values being returned in the logs. Do you want a separate thread for that?
Thanks again -
Update: I just got this error when attempting to post this message...
Error in posting
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE forum_id = 3' at line 3
UPDATE forums SET forum_posts = forum_posts + 1, forum_last_post_id = WHERE forum_id = 3
Line : 423
File : functions_post.php
Again, the only major change I can see is that I uninstalled and reinstalled /everything/. But, as long as it works, I'll take it. Thanks for the help.
I'm having a problem with Spine as well - it's not charting, but I can see the values being returned in the logs. Do you want a separate thread for that?
Thanks again -
Update: I just got this error when attempting to post this message...
Error in posting
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE forum_id = 3' at line 3
UPDATE forums SET forum_posts = forum_posts + 1, forum_last_post_id = WHERE forum_id = 3
Line : 423
File : functions_post.php
The site was recently moved to another server... if the errors persist let myself or other moderators know so it can get fixed.
You do realize that Spine doesn't do any graphing, just data collection, right? rrdtool does all the graphing. With graph debugging mode enabled, what is the error for the broken graph(s) ?
You do realize that Spine doesn't do any graphing, just data collection, right? rrdtool does all the graphing. With graph debugging mode enabled, what is the error for the broken graph(s) ?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Yeah, I should have rephrased that. When I switched to Spine, the charts stopped being updated with data. The previous data was there, and the charts were updated every interval, but from the point that I switched to Spine onwards, it was all flatline 0s. As soon as I went back to cmd.php it started graphing again.
However, given that my previous install seems to have been under a hexed moon and I forgot the goat sacrifice, I'm pleased to say (albeit reluctantly, since I was quite keen to debug it) that it's working of its own accord now. I switched to Spine, and have been watching the last half hour of data get polled quite successfully. You should consider adding the goat sacrifice to your installer how-to. I fear it may have saved me some headache.
I also may have double-goosed myself by trying to swap to 1 minute polling while changing to Spine, but I do recall the problem still happening when I left polling intervals alone.
Is http://forums.cacti.net/viewtopic.php?t ... sc&start=0 the latest on configuring 1 minute polling? I thought I saw a post about a new feature in the latest release, but I can't find it again.
Thanks again for all the help.
SB
However, given that my previous install seems to have been under a hexed moon and I forgot the goat sacrifice, I'm pleased to say (albeit reluctantly, since I was quite keen to debug it) that it's working of its own accord now. I switched to Spine, and have been watching the last half hour of data get polled quite successfully. You should consider adding the goat sacrifice to your installer how-to. I fear it may have saved me some headache.
I also may have double-goosed myself by trying to swap to 1 minute polling while changing to Spine, but I do recall the problem still happening when I left polling intervals alone.
Is http://forums.cacti.net/viewtopic.php?t ... sc&start=0 the latest on configuring 1 minute polling? I thought I saw a post about a new feature in the latest release, but I can't find it again.
Thanks again for all the help.
SB
I prefer a lamb sacrifice myself for the installs, but each to their own and the gods
Switching the polling interval isn't quite a straight forward task. That's all being improved in 0.8.8. In the meanwhile, will just have to use the voodoo knowledge posted around the forums, which you've found.
Switching the polling interval isn't quite a straight forward task. That's all being improved in 0.8.8. In the meanwhile, will just have to use the voodoo knowledge posted around the forums, which you've found.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 0 guests