|
|
| Author |
Message |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 10:15 am Post subject: |
|
|
When I installed cacti I did it in the /cacti-install file so thats what I changed my crontab to so now its
*/5 * * * * cactiuser php /cacti-install/www/htdocs/cacti/poller.php > /dev/null 2>&1
also, yes I changed it from html to htdocs so there was definately issues with my crontab file, so thanks for helping me find that! |
|
| Back to top |
|
 |
rtorti19
Joined: 07 May 2008 Posts: 27
|
Posted: Tue Jul 22, 2008 10:19 am Post subject: |
|
|
Just to be sure what cacti thinks. I would suggest that you log into your cacti database and run the following command:
select * from settings where name='path_webroot';
This will let you know what is actually set in the database for you cacti web root. |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 10:23 am Post subject: |
|
|
OKay I don't know how to do that?
Sorry I'm a very green beginner! |
|
| Back to top |
|
 |
rtorti19
Joined: 07 May 2008 Posts: 27
|
Posted: Tue Jul 22, 2008 10:33 am Post subject: |
|
|
You might be able to find out the webroot by going to Settings > Paths and looking at the "Cacti Log File Path". This can all be done from within the GUI console.
However if you are feeling adventurous.
If you using cacti 0.8.7b you can get your mysql username and password from looking at you include/global.php file. There will be a section that looks something like:
/* Default database settings*/
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
Once you know the username and password combo.
Based on the username/password above, type the following on the command line.
mysql -u cactiuser -p cacti
You will be prompted to enter the password.
Once you are logged in to the cacti db then you can type
select * from settings where name='path_webroot';
"exit" will log you out of mysql |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 10:49 am Post subject: |
|
|
Well when I go into MySql I get this
mysql> select * from settings where name='path_webroot';
Empty set (0.00 sec)
But my Cacti Log File Path is /www/htdocs/cacti/log/cacti.log and that file exists and stuff is in it....this is very frustrating.
But thank you for all your help! |
|
| Back to top |
|
 |
rtorti19
Joined: 07 May 2008 Posts: 27
|
Posted: Tue Jul 22, 2008 10:58 am Post subject: |
|
|
Nothing is in the cacti.log file because the poller is not running. If your cacti log file paths shows "/www/htdocs/cacti/log/cacti.log" in the gui, then I think your crontab entry should look like:
*/5 * * * * cactiuser /usr/bin/php /www/htdocs/cacti/poller.php > /dev/null 2>&1
Have you tried running /usr/bin/php /www/htdocs/cacti/poller.php as your cactiuser from the command line yet? I think you tried other variations.
Also did you look in your system log files to see what errors crond is throwing?
And what are you using for a poller? cmd.php? cactid? spine? |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 11:08 am Post subject: |
|
|
No my cacti.log file has stuff in it! I had it in DEBUG mode to try and find an error but nothing seemed wrong.
My rrdtool still isn't creating the rrd. It runs the script but the file doesn't get created and this is where my real problem is. I can type the script in by hand and then the file gets created but Cacti is not creating the rrd. Do have any idea why?
THANKS!! |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 11:18 am Post subject: |
|
|
| Nevermind, it did have stuff in it earlier...but it hasn't been changed since 10:59, so I guess the poller was working but now its not...... |
|
| Back to top |
|
 |
rtorti19
Joined: 07 May 2008 Posts: 27
|
Posted: Tue Jul 22, 2008 11:20 am Post subject: |
|
|
What data do you have in the cacti.log.
What script are you typing by hand and what file does it create?
I think the rrd's are created by the poller, and then rrdtool is used to input the data, but I could be wrong. Does the path to rrdtool show up correctly in the console? |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 11:23 am Post subject: |
|
|
Well this is what was in the cacti.log file when I was using Debug mode
07/22/2008 10:17:12 AM - CMDPHP: Poller[0] DEBUG: SQL Row: "select name,data_source_path from data_template_data where local_data_id=5"
07/22/2008 10:17:12 AM - CMDPHP: Poller[0] DEBUG: SQL Row: "select name,data_source_path from data_template_data where local_data_id=5"
07/22/2008 10:17:12 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from cdef_items where cdef_id=12 order by sequence"
07/22/2008 10:17:12 AM - CMDPHP: Poller[0] DEBUG: SQL Row: "select type,value from cdef_items where id=16"
07/22/2008 10:17:12 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from cdef_items where cdef_id=12 order by sequence"
07/22/2008 10:17:12 AM - CMDPHP: Poller[0] DEBUG: SQL Row: "select type,value from cdef_items where id=16"
but the last command was
07/22/2008 10:59:58 AM - AUTH LOGIN: User 'admin' Authenticated
and nothing has been created since.
I'm just opening the file
/www/htdocs/cacti/log/cacti.log |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 11:25 am Post subject: |
|
|
Nope sorry it seems to be working, if I switch to debug mode then I get commands created at 12:24 so it seems to be working!
Is there another mode you might want me to put it in so that maybe debugging can be easier?
THANKS!!! |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 11:32 am Post subject: |
|
|
| Oh I'm using cmd.php I didn't install the spine! |
|
| Back to top |
|
 |
rtorti19
Joined: 07 May 2008 Posts: 27
|
Posted: Tue Jul 22, 2008 11:36 am Post subject: |
|
|
Debug mode is the best for debugging.
Do you have any rrd files under the rra directory since the poller has been running?
what do you see if you run:
php /www/htdocs/cacti/cmd.php |
|
| Back to top |
|
 |
echouin12
Joined: 08 Jul 2008 Posts: 47 Location: MSU High Energy Physics
|
Posted: Tue Jul 22, 2008 11:41 am Post subject: |
|
|
Well the only rrd in the rra are those scripts that I enter into the command by hand, there are no rrds created by Cacti.
As for the cmd.php I get this
[root@toad ~]# php /www/htdocs/cacti/cmd.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
Which is the same as when I try to run poller.php |
|
| Back to top |
|
 |
rtorti19
Joined: 07 May 2008 Posts: 27
|
Posted: Tue Jul 22, 2008 11:52 am Post subject: |
|
|
what version of cacti are you using?
Also, I'm starting to question you version of php. I think there have been known issues with snmpgetnext and the version of php you are using on certain cacti releases?
Also.
Do you have php_snmp installed?
Does the snmpgetnext binary have a valid path? |
|
| Back to top |
|
 |
|