help with Cacti 0.8 beginner's guide
Moderators: Developers, Moderators
help with Cacti 0.8 beginner's guide
I hope someone can point me in the right direction. I'm trying to work through the Cacti 0.8 Beginner's Guide but I'm finding it either out of date or filled with errata. Since I'm a beginner (hence, my purchase of the guide) I'm not having an easy go at it. I'm running CentOS 6.4 i686 with Cacti 0.8.8a and trying to follow the directions in the Guide to the letter, where possible.
Has anyone else encountered issues with the Guide like these? Is it better just to follow the instructions for installation at docs.cacti.net in the first place?
For example: page 17, step 6, "./bootstrap" won't work unless you've installed the package dos2unix and yet the Guide makes no mention of this anywhere, even though I'm using the same OS the guide is (not a different linux variant, but CentOS).
Another: page 13, "Creating the database", doesn't mention that you have to run "service mysqld start" before you begin step 1. If I knew to do that on my own, as the Guide assumes, I wouldn't need a "beginner's" guide to Cacti.
Page 24 instructs readers to go to the installation URL. It also omits any mention of running "service httpd start". Even when I do this, I'm unable to connect to anything on the server I've installed cacti on - including the cacti installation URL. Again, if I knew these nuances without reading the book, I wouldn't need a "beginner's guide".
I went to the packtpub.com website where I purchased it, but can't find any errata for this book on the site.
There's a typo on page 12, step 6, "tar-xzvf cacti-0.8.7g.tar.gz". Even I know that tar-xzvf won't run without a space between the "tar" and the "-". Surely someone else has noticed this.
Does anyone know where the errata for this book is?
Sorry for the rant; it just doesn't seem like I should be unable to proceed on my own past page 23 of a "beginner's" guide!
Has anyone else encountered issues with the Guide like these? Is it better just to follow the instructions for installation at docs.cacti.net in the first place?
For example: page 17, step 6, "./bootstrap" won't work unless you've installed the package dos2unix and yet the Guide makes no mention of this anywhere, even though I'm using the same OS the guide is (not a different linux variant, but CentOS).
Another: page 13, "Creating the database", doesn't mention that you have to run "service mysqld start" before you begin step 1. If I knew to do that on my own, as the Guide assumes, I wouldn't need a "beginner's" guide to Cacti.
Page 24 instructs readers to go to the installation URL. It also omits any mention of running "service httpd start". Even when I do this, I'm unable to connect to anything on the server I've installed cacti on - including the cacti installation URL. Again, if I knew these nuances without reading the book, I wouldn't need a "beginner's guide".
I went to the packtpub.com website where I purchased it, but can't find any errata for this book on the site.
There's a typo on page 12, step 6, "tar-xzvf cacti-0.8.7g.tar.gz". Even I know that tar-xzvf won't run without a space between the "tar" and the "-". Surely someone else has noticed this.
Does anyone know where the errata for this book is?
Sorry for the rant; it just doesn't seem like I should be unable to proceed on my own past page 23 of a "beginner's" guide!
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: help with Cacti 0.8 beginner's guide
HI,
I actually wrote that book and as far as I remember, Centos 5.5 (which I used back then) autostarted these services. Cenots 6 doesn't do that.
I've put a howto for the Cacti install and the Spine install up here:
http://blog.network-outsourcing.de/cact ... ing-cacti/
and
http://blog.network-outsourcing.de/cact ... ne-poller/
In case you happen to get to page 158 for the WMI install, use this guide for the compilation:
http://blog.network-outsourcing.de/cact ... on-centos/
And thanks for these, I'll check that I'm going to publish an Errata site/page with all these fixes in there and have PacktPub either include them or at least link to that site.
Please mail any issues to me: cactibook@urban-software.de
If you've got questions or need help, just reply to this thread here as stated on Page 310, "where to get support?", but you've already used that
I actually wrote that book and as far as I remember, Centos 5.5 (which I used back then) autostarted these services. Cenots 6 doesn't do that.
I've put a howto for the Cacti install and the Spine install up here:
http://blog.network-outsourcing.de/cact ... ing-cacti/
and
http://blog.network-outsourcing.de/cact ... ne-poller/
In case you happen to get to page 158 for the WMI install, use this guide for the compilation:
http://blog.network-outsourcing.de/cact ... on-centos/
And thanks for these, I'll check that I'm going to publish an Errata site/page with all these fixes in there and have PacktPub either include them or at least link to that site.
Please mail any issues to me: cactibook@urban-software.de
If you've got questions or need help, just reply to this thread here as stated on Page 310, "where to get support?", but you've already used that
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: help with Cacti 0.8 beginner's guide
Oh - wow - thanks for the reply! I should have thought of that, difference between 5.5 and 6. That explains a lot.
I do like the book; it seems thorough so I think 5.5 vs 6 is causing the bulk of my problems with it.
I'll check those links you included and let you know if I find any discrepancies after I've read everything.
Again, thanks and please excuse the rant!
I do like the book; it seems thorough so I think 5.5 vs 6 is causing the bulk of my problems with it.
I'll check those links you included and let you know if I find any discrepancies after I've read everything.
Again, thanks and please excuse the rant!
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: help with Cacti 0.8 beginner's guide
Don't excuse yourself, a customer complaint is a gift, it allows me (or others) to improve the service provided.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: help with Cacti 0.8 beginner's guide
Well, in that case, one other tip (helpful to those of us used to Debian and fumbling with CentOS anyway) is that only port 22 is open by default on CentOS 6.4 (SELinux?) installs, even if you select the CentOS "web server" installation, and I'm pretty sure on the "minimal" and "base server" installations as well. So that's going to need to be changed before the web config step to make the web config interface accessible. That might be beyond the scope of the Cacti HowTo though it could make one think their Cacti install was broken on an otherwise default install of CentOS & possibly others if they were like me and so hyper-focused on Cacti they overlooked the firewall!
Re: help with Cacti 0.8 beginner's guide
I also made a comment on http://blog.network-outsourcing.de/cact ... comment-12
One note: step 4 should include:
cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf
Otherwise there won’t be a spine.conf file to edit.
Hope it's helpful!
One note: step 4 should include:
cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf
Otherwise there won’t be a spine.conf file to edit.
Hope it's helpful!
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: help with Cacti 0.8 beginner's guide
Thanks, I've updated that step.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: help with Cacti 0.8 beginner's guide
I noticed that all the graphs that should be displaying in the web interface "Graphs" -> "Tree Mode" under "Default Tree", "Host:Localhost" (the ones already configured by default in Cacti for localhost) only display the missing image icon. I found through the FAQ that poller.php isn't running on my system and no files are being generated in /var/www/html/cacti-0.8.8a/rra/ directory, but permissions and ownership are set appropriately).
http://docs.cacti.net/manual:087:4_help ... ken_images
Setting up poller.php to run as a cron job is on pages 16 - 18 of the Guide, and is also in your post here, http://blog.network-outsourcing.de/cact ... ing-cacti/ but I don't see anything anywhere about initially running php poller.php
I found through the FAQ to run php poller.php manually to generate the graphs. So, I suppose this step should also be included, as I don't believe just adding the cron entry turns on poller.php by itself.
But, when I try to run php poller.php in /var/www/html/cacti-0.8.8a/ I get these error messages:
06/09/2013 02:44:49 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 612 seconds have passed since the last poll!
06/09/2013 02:44:49 PM - POLLER: Poller[0] ERROR: The path: is invalid. Can not continue
When I run php poller.php from /var/www/html/cacti/ I do not get an error message, but I don't see anything being generated in the rra/ folder. Setting Graph debug mode on in the web interface shows this rrdtool error:
ERROR: opening '/var/www/html/cacti-0.8.8a/rra/localhost_load_1min_5.rrd': No such file or directory
So I don't really know what to do about that. I saw this forum post: http://forums.cacti.net/about24276.html and apparently the spine poller is not being called every 5 minutes (or at all, or when I try to run it manually).
I have this line in /etc/cron.d/cacti
*/5 * * * * cacti php /var/www/html/cacti/poller.php &>/dev/null
I did try rebooting the server, hoping the cron job would be called to run after the system startup. But unfortunately no, apparently poller.php isn't being run. I'm going to look over the configuration files and see where I've missed something, but I'm otherwise not sure how to proceed. I'm taking it this is not the type of Beginner's Guide that you can use if you are actually a "beginner"!
I'm beginning to feel kind of stupid with this one. Chapter 2, page 32-33 "Basic RRDtool graph creation", I downloaded the code, ran the perl script and then ran the rrdtool code as given in the Guide. It did produce first a test.rrd file and then a data_image.png file. Here's the stupid part: how do I view that .png file? I know that's a graphics file format and what to do with .png files in general, but for purposes of the initial part of Chapter 2 I'm working at the command line, logged in to the console of my Cacti server. I didn't set up a GUI or anything on it; I suppose I should copy the .png file over to a machine with a GUI, or are they supposed to be imported into Cacti's web interface? I would think not, based on page 38, but I'm not sure how I'd go checking my work on the "Have a go..." section unless I did copy them to another machine.
Maybe I should just go back to Debian & Windows!
http://docs.cacti.net/manual:087:4_help ... ken_images
Setting up poller.php to run as a cron job is on pages 16 - 18 of the Guide, and is also in your post here, http://blog.network-outsourcing.de/cact ... ing-cacti/ but I don't see anything anywhere about initially running php poller.php
I found through the FAQ to run php poller.php manually to generate the graphs. So, I suppose this step should also be included, as I don't believe just adding the cron entry turns on poller.php by itself.
But, when I try to run php poller.php in /var/www/html/cacti-0.8.8a/ I get these error messages:
06/09/2013 02:44:49 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 612 seconds have passed since the last poll!
06/09/2013 02:44:49 PM - POLLER: Poller[0] ERROR: The path: is invalid. Can not continue
When I run php poller.php from /var/www/html/cacti/ I do not get an error message, but I don't see anything being generated in the rra/ folder. Setting Graph debug mode on in the web interface shows this rrdtool error:
ERROR: opening '/var/www/html/cacti-0.8.8a/rra/localhost_load_1min_5.rrd': No such file or directory
So I don't really know what to do about that. I saw this forum post: http://forums.cacti.net/about24276.html and apparently the spine poller is not being called every 5 minutes (or at all, or when I try to run it manually).
I have this line in /etc/cron.d/cacti
*/5 * * * * cacti php /var/www/html/cacti/poller.php &>/dev/null
I did try rebooting the server, hoping the cron job would be called to run after the system startup. But unfortunately no, apparently poller.php isn't being run. I'm going to look over the configuration files and see where I've missed something, but I'm otherwise not sure how to proceed. I'm taking it this is not the type of Beginner's Guide that you can use if you are actually a "beginner"!
I'm beginning to feel kind of stupid with this one. Chapter 2, page 32-33 "Basic RRDtool graph creation", I downloaded the code, ran the perl script and then ran the rrdtool code as given in the Guide. It did produce first a test.rrd file and then a data_image.png file. Here's the stupid part: how do I view that .png file? I know that's a graphics file format and what to do with .png files in general, but for purposes of the initial part of Chapter 2 I'm working at the command line, logged in to the console of my Cacti server. I didn't set up a GUI or anything on it; I suppose I should copy the .png file over to a machine with a GUI, or are they supposed to be imported into Cacti's web interface? I would think not, based on page 38, but I'm not sure how I'd go checking my work on the "Have a go..." section unless I did copy them to another machine.
Maybe I should just go back to Debian & Windows!
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: help with Cacti 0.8 beginner's guide
For the poller part, did you set the path to spine in "Console -> Settings -> Paths -> Spine Poller File Path" ? I assume that's where the "The path: is invalid. Can not continue" comes from.
For png files, either transfer it to your windows PC, or copy it to your HTML directory (/var/www/html) and point your browser to it.
Manually running the poller is not required, but can be used for debug purposes, change to the cacti user (as root: "su - cacti" or whatever user you've created) and then run:
For png files, either transfer it to your windows PC, or copy it to your HTML directory (/var/www/html) and point your browser to it.
Manually running the poller is not required, but can be used for debug purposes, change to the cacti user (as root: "su - cacti" or whatever user you've created) and then run:
Code: Select all
/var/www/html/cacti/poller.php --force --debug
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: help with Cacti 0.8 beginner's guide
Actually, no. I had the path to the spine poller blank. I set it to /usr/local/spine/bin/spine and the system reported it "ok"/green. Maybe that will do it.
I also totally forgot about the whole moving .png files to the /var/www/html directory where they'd be easily visible! Time for a break; that's a good sign I've been at it too long.
Thanks for being a teacher with the patience for students!
I also totally forgot about the whole moving .png files to the /var/www/html directory where they'd be easily visible! Time for a break; that's a good sign I've been at it too long.
Thanks for being a teacher with the patience for students!
Re: help with Cacti 0.8 beginner's guide
I tried this and got the result:phalek wrote:
Manually running the poller is not required, but can be used for debug purposes, change to the cacti user (as root: "su - cacti" or whatever user you've created) and then run:
Code: Select all
/var/www/html/cacti/poller.php --force --debug
[cacti@cacti root]$ /var/www/html/cacti/poller.php --force --debug
/var/www/html/cacti/poller.php: line 1: ?php: Permission denied
/var/www/html/cacti/poller.php: line 2: /bin: is a directory
/var/www/html/cacti/poller.php: line 3: +-------------------------------------------------------------------------+: command not found
/var/www/html/cacti/poller.php: line 4: syntax error near unexpected token `|'
/var/www/html/cacti/poller.php: line 4: ` | Copyright (C) 2004-2012 The Cacti Group |'
I'm guessing that the issue there is the permissions on the poller.php file.
I then looked at the permissions for /var/www/html/cacti/poller.php and they are:
-rwxrwxr-x. 1 1000 users 18056 Apr 22 2012 poller.php
So I added the cacti user to the "users" group, which should have read/write/execute permissions to poller.php but no luck, same error. Then I changed /var/www/html/cacti-0.8.8a/poller.php permissions to 777. Tried again with the poller.php --force --debug command. Still the same error message, even though the permissions show -rwxrwxrwx.
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: help with Cacti 0.8 beginner's guide
i forgt to add "php" to the front:
The poller.php file doesn't have a line like '#!/usr/bin/php" at the beginning, hence just calling the file doesn't tell the shell what command interpreter to use ...
Code: Select all
php /var/www/html/cacti/poller.php --force --debug
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: help with Cacti 0.8 beginner's guide
Then there's this: I changed the ownership of poller.php to cacti:apache and rebooted, then tried again. Same result. So perhaps the "cacti" user does not have permission to run php.
(Then I saw your post.)
So I ran the command including the php at the beginning. Got this, below. Still no files in the rra directory. I mainly wonder how I got so far away from the guide and instructions. Should I just try to reinstall the OS from scratch and give it another go, copying and pasting absolutely every line? Should Cacti even be producing graphs at this point? I was in the earlier stages of Chapter 2 and saw there were already populated localhost graphics, so I decided to have a look, and that's when I noticed this. Perhaps the graph setup for localhost has to be done a bit later and I've gotten ahead of myself?
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
06/09/2013 05:31:41 PM - SYSTEM STATS: Time:2.3286 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
Loop Time is: 2.33
Sleep Time is: 297.66
Total Time is: 2.34
[cacti@cacti root]$ ls /var/www/html/cacti/rra
[cacti@cacti root]$ ls /var/www/html/cacti/rra
[cacti@cacti root]$ ls /var/www/html/cacti-0.8.8a/rra
[cacti@cacti root]$
(Then I saw your post.)
So I ran the command including the php at the beginning. Got this, below. Still no files in the rra directory. I mainly wonder how I got so far away from the guide and instructions. Should I just try to reinstall the OS from scratch and give it another go, copying and pasting absolutely every line? Should Cacti even be producing graphs at this point? I was in the earlier stages of Chapter 2 and saw there were already populated localhost graphics, so I decided to have a look, and that's when I noticed this. Perhaps the graph setup for localhost has to be done a bit later and I've gotten ahead of myself?
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
Waiting on 1 of 1 pollers.
06/09/2013 05:31:41 PM - SYSTEM STATS: Time:2.3286 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
Loop Time is: 2.33
Sleep Time is: 297.66
Total Time is: 2.34
[cacti@cacti root]$ ls /var/www/html/cacti/rra
[cacti@cacti root]$ ls /var/www/html/cacti/rra
[cacti@cacti root]$ ls /var/www/html/cacti-0.8.8a/rra
[cacti@cacti root]$
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: help with Cacti 0.8 beginner's guide
Well, the graphs should generate automatically, but it seems like you've run into the same issue as I did with 0.8.8a.
Please try this first:
Go to "Console -> System Utilities" and hit "Rebuild Poller Cache"
then re-check the command.
If that doesn't help, then please go to the localhost device and add the same graphs that already exist to it and check the command again.
Please try this first:
Go to "Console -> System Utilities" and hit "Rebuild Poller Cache"
then re-check the command.
If that doesn't help, then please go to the localhost device and add the same graphs that already exist to it and check the command again.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: help with Cacti 0.8 beginner's guide
No luck with resetting the poller or creating the graphs again; now I have two sets of graphs with no actual graphs showing.
But, I did load up 0.8.8a in Ubuntu 12.04 and it behaves exactly the same; no images where the graphs should be. So it must be a 0.8.8a version issue.
For purposes of learning, should I try to drop back to CentOS 5.9 and Cacti 0.8.7g (I believe that's what you were using for the guide)? I'd rather learn the system before tackling the bugs in 0.8.8a, plus I'd rather have a stable build to work with.
But, I did load up 0.8.8a in Ubuntu 12.04 and it behaves exactly the same; no images where the graphs should be. So it must be a 0.8.8a version issue.
For purposes of learning, should I try to drop back to CentOS 5.9 and Cacti 0.8.7g (I believe that's what you were using for the guide)? I'd rather learn the system before tackling the bugs in 0.8.8a, plus I'd rather have a stable build to work with.
Who is online
Users browsing this forum: No registered users and 0 guests