0

Im using Cacti to try to monitor our network: www.cacti.net

My graphs are just showing broken image links. I have just installed cacti version 0.8.7i for windows XP. Running RRDTools 1.4.5, and even went down to version 1.2.x

I went to the system utilities link in cacti and selected "Technical Support" everything appears to be good except the section that says RRDToolVersion:

"Error: Installed RRDTool version does not match configured version. Please visit the configuration settings and select the correct RRDTool Utility Version."

So I went to the configuration settings and the RRDTool utility version is set to RRDTool 1.2.x

I also checked the "Paths" tab in the configuration settings and everything looks good there, the only one that seems odd is the RRDTool Default Font. Other then that the paths look ok.

Here is my log file: enter image description here

Here is a screen shot of a graph in debug mode: enter image description here

Here is a screen shot of the settings: enter image description here

EDIT

More info here...http://forums.cacti.net/viewtopic.php?f=3&t=46157&p=224854#p224854

Still no luck :(

JonH
  • 131
  • 1
  • 3
  • 16
  • Perhaps a dumb question, but what happens when you run the RRDTool command from debug mode yourself? Does it create a valid graph image? – Handyman5 Dec 29 '11 at 18:47
  • @Handyman5 - i can run the rrd command from a command line but how can I view the actual graph??? Its an unknown file type – JonH Dec 29 '11 at 19:45
  • The image viewer [IrfanView](http://www.irfanview.com/) can handle just about any image in existence and is free. – Handyman5 Dec 29 '11 at 19:49
  • grab that debug rrdtool text. Change the "-" in the first line (after graph) to "c:\temp\test.png". If that doesn't produce an image change graph to graphv in that first line and run it again. report the output and if you can view that .png file with your browser. – Mark Dec 30 '11 at 17:37
  • @Mark - do you mean `rrdtool graph c:\temp\test.png` ? If so in the command window I get 0x0 – JonH Dec 30 '11 at 17:53
  • @mark - anything ? – JonH Dec 30 '11 at 19:15
  • I actually meant that with the rest of the rrdtool graph arguments on the end, straight out of the debug window from cacti. Have it try to make a real graph for you from your real data file and see if it works. – Mark Dec 30 '11 at 21:16
  • @Mark when I do it from the console it produces the graph. – JonH Jan 11 '12 at 16:11
  • Excellent! That means we're dealing with Cacti calling RRDTool and not RRDTool being broke. The poller is working and so is RRDTool. Our next step, then, is to make sure that the local system's IISUSR has access to run rrdtool utilities and that it has read access to the directories that store the RRA databases themselves. – Mark Jan 11 '12 at 16:41
  • @Mark how should I proceed? – JonH Jan 11 '12 at 16:44
  • @Mark - checked `C:\Inetpub\wwwroot\cacti\rra` and the security on this directory shows that Internet Guest Account (Machine Name\IUSR_NAMEOFCOMPUTER) has full rights to read / write. – JonH Jan 11 '12 at 16:45
  • @Mark - I even went so long as to check `c:\rrdtool` the directory that contains the executable of rrdtool and it too has the user IUSR_NameOfComputer to have full rights to that folder. What could i be missing :(...so close but still no cigar. – JonH Jan 11 '12 at 16:47
  • @Mark -- Ok now I am seeing more info it says `GRAPH ACCESS DENIED` but I dont know what else to change. – JonH Jan 11 '12 at 17:40
  • We are close! Whatever user you are connecting to cacti with doesn't have graph access in the User Management screens: http://docs.cacti.net/manual:087:2_basics.4_user_management#user_management – Mark Jan 11 '12 at 17:51
  • @Mark - The user I created does have access to the graphs though. I posted a screen shot above...or will post it. – JonH Jan 11 '12 at 17:58
  • @Mark - is there any way we can do a gotomeeting? So you can look at my setup? – JonH Jan 11 '12 at 18:04
  • @Mark - I just checked the log file and I am seeing a lot of errors....mainly SQL errors. – JonH Jan 11 '12 at 18:06
  • If the SQL stuff is acting that weird, I'd look for mysql errors in logs for mysql. If you don't find anything there I'd probably run a `php repair_database.php` in the `cacti\cacti-#.#.#\cli` directory – Mark Jan 11 '12 at 19:15
  • @Mark I cannot seem to find any log files for mysql where would those be stored ? – JonH Jan 11 '12 at 20:52
  • @Mark - I ran php repair_database.php inside of cacti\cli and it says No invalid cacti template records found in your database. – JonH Jan 11 '12 at 20:54
  • @Mark - see this link http://forums.cacti.net/viewtopic.php?f=3&t=46157 I posted this on the cacti forums...maybe it will help you see what I've done. – JonH Jan 12 '12 at 13:57
  • The graph permissions are wrong in the screen shot you posted. If want full access to all graphs, the four pull downs should be set to "Allow" (just like you have it) BUT there shouldn't be ANY items in the lists below them. Each one of the entries with a red number next to it is a DENY that overrides the default Allow. You want to click all the red X's on the page and then hit Save. – Mark Jan 12 '12 at 15:00
  • @Mark when I do that and click save and go to the graph management page I just see an empty image placeholder...So we are back to square one again. – JonH Jan 12 '12 at 15:05
  • @Mark _ I did what you said and posted my results here again http://forums.cacti.net/viewtopic.php?f=3&t=46157&p=224854#p224854 in an edit. RRDTool doesn't say anything. However no graph comes up its just an empty image place holder. See the link I posted for an edit update. – JonH Jan 12 '12 at 15:12
  • change your server name back and report what happens when you go to this link. It should show a graph image. http://mycactiServerName/cacti/graph.php?action=view&local_graph_id=25&rra_id=0 – Mark Jan 12 '12 at 19:37
  • @Mark I dont know what you mean by change your server name back ? – JonH Jan 12 '12 at 19:56
  • @Mark if you mean to really put the name of my server that is exactly what I get Graph Does Not Exist with the link `http://mycactiservername/cacti/graph.php?action=view&local_graph_id=25&rra_id=0` and I did replace mycactiservername with the real server name. It just shows the cacti app with GRAPH DOES NOT EXIST. – JonH Jan 12 '12 at 19:59
  • Then the graph_ids and rra_ids must not be right in the MYSQL data. I'd recommend deleting all the devices you are monitoring and then configuring one again from scratch. Wait 15 minutes for it to get data and then click on that new device and see what you get. – Mark Jan 12 '12 at 20:22
  • @Mark - Ive tried that before..sigh..but I will try it again. I deleted ALL devices and ALL graphs. I just readded ONE server. I see that it created a new folder cacti\rra\7 guessing this is ID=7 or something. And within it I am seeing 4 rrd files (which represent the 4 new graphs I have created). 2 of the files are 94kb and the other 2 are 185kb. The names go from 27.rrd thru 30.rrd. Ill wait another 10 minutes to see data, but this just is exactly what I did a day ago. In fact right now if I goto... – JonH Jan 12 '12 at 20:48
  • Continued from above. If I go to: http://mycactiservername/cacti/graph.php?action=view&local_graph_id=27&‌​rra_id=7 I get a page Graph does not exist. – JonH Jan 12 '12 at 20:50
  • @Mark - nope no luck. I think I am giving up on this. I am gonna format this darn PC and try it over :( sigh... – JonH Jan 12 '12 at 21:01
  • Yeah, start over. ;-( – Mark Jan 12 '12 at 21:24

2 Answers2

2

I'm not sure you're having a problem with RRDs. I think you may be having a problem with data collection.

See all the "12/21/2011 10:15:02 AM - CMDPHP: Poller[0] Host[3] DS[10] WARNING: Result from SNMP not valid. Partial Result: U " lines?

That seems to suggest you're not getting the data.

Do you have SNMP enabled on the hosts you're querying?

Have you opened up firewall access to allow SNMP requests?

Joel K
  • 5,853
  • 2
  • 30
  • 34
  • Yes I have snmp installed...is there anything I can do to see why it isnt working? I do see .RRD files...I tried posting here with no help http://forums.cacti.net/viewtopic.php?f=3&t=45980 – JonH Dec 29 '11 at 15:00
  • I edited my question, this is still not working :(. – JonH Dec 30 '11 at 13:34
  • I agree with Joel. Can you fetch the appropriate SNMP data with `snmpget` or `snmpwalk`? – James O'Gorman Jan 01 '12 at 20:23
  • I've seen that error before. The "U" is the first character of a much longer and very useful message. Find that error message and you will solve your problem. – Ladadadada Jan 07 '12 at 18:47
1

You can still run rrdtool.exe dump filename.rrd output-filename.xml and see if there is any data in the RRD files, if they exist. It is harmless and lets you know if the poller part is actually doing its job correctly.

If the RRDs exist, but you are still getting errors then some part of PHP's library stuff may be unhappy. We had an issue with our CACTI install and wound up rolling back to an older version of RRDTool. Grab the newest 1.2.x version from http://www.cacti.net/downloads/rrdtool/win32/ and get it installed.

Make sure you install it in C:\rrdtool (back up the other install) and then make sure that Cacti has "RRDTool 1.2.x" set for the RRDTool version setting.

If it still gives you trouble or complains about the RRAs being bad, you may need to delete your hosts and their monitors and rediscover to get the RRD files recreated. IIRC, we had to do that after swapping versions.


Updated again

If all that works, check permissions at the IIS level. Make sure that IIS can run rrdtool and can get to the RRA databases with read access. Check the folder permissions at the cacti level versus the cacti/rra level and make sure it inherits the local IISUSR. Make sure the IISUSR has execute in c:\rrdtool.

And, finally, if you get "GRAPH ACCESS DENIED" then your cacti login account isn't configured to view graphs in the User Management screens. http://docs.cacti.net/manual:087:2_basics.4_user_management#user_management

Mark
  • 2,248
  • 12
  • 15
  • I do see RRD files. I do have snmp installed. I tried posting here http://forums.cacti.net/viewtopic.php?f=3&t=45980 but no answers. – JonH Dec 29 '11 at 15:00
  • Updated with notes on what we did to get ours working. I don't think the Cacti to RRDTool1.3 stuff actually works on Windows... downgrade RRDTool to known-good is my suggestion. – Mark Dec 29 '11 at 16:07
  • I downgraded and got rid of some of the error messages but see my edit in my question. I am still getting broken images as graphs. – JonH Dec 30 '11 at 13:34
  • do you mean rrdtool graph c:\temp\test.png ? If so in the command window I get 0x0 – – JonH Dec 30 '11 at 18:16
  • see my comments in my original question...getting very close... – JonH Jan 11 '12 at 17:40
  • looks like the SQL errors are no more...however when I click graph management, or graphs I still have access denied. Is there any possibility I am missing a specific right? Dont I just have to go into the user management and specify "Allow" with the report names? And then in windows go into the rrdtool folder give rights. Go into cacti folder give rights, and go into the rra directory within cacti and give rights correct? Am I giving rights to the IIS Process account? – JonH Jan 12 '12 at 13:12
  • see this link in the cacti forums, maybe it will help you see what I've done http://forums.cacti.net/viewtopic.php?f=3&t=46157 – JonH Jan 12 '12 at 13:58
  • Any other ideas? Anyone please – JonH Jan 12 '12 at 19:16