Cacti/WinXP configuration

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

Moderators: Developers, Moderators

ttyR2

Cacti/WinXP configuration

Post by ttyR2 »

Hello,

I'm interested to upgrade from MRTG to a more sophisticated solution. I've worked through the HOWTO on getting Cacti to run under Win32 (WinXP SP2 in this case with the firewall shut off). I'm able to log into the Cacti web interface as admin just fine. I configured it to check the enet interface on the server itself which I'm able to do correctly with MRTG currently so I know SNMP is set correctly on the interface itself. No graphs are showing up though, they're just placeholders. When looking at the /rra directory in cacti, it's empty. The log file in /log is empty as well. I've gone through the scheduled task twice.

If I run cactid from a command prompt I get:

CACTID: Poller[0] MYSQL: Connection Failed: Host 'irc-ftp' is not allowed to connect to this MySQL server

A database was set up in MySQL with appropriate account/password with access. Like I said, Cacti itself doesn't complain when I log in as admin and make changes.

Now where it's getting 'irc-ftp' from I'm not sure. Maybe I'm making a dumb mistake. Without the log working, I'm not sure how else to troubleshoot at this point.

I am getting a very brief command window popping up, I gather that's the scheduled task running but it's fast enough that I can't read any error messages.

TIA
ttyR2

Post by ttyR2 »

I might add that I just downloaded Cacti/Cactid/rrdtools today and they are the latest versions as far as I know. MySQL is working perfectly with a PHPBB messageboard I have set up as well.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

A couple of things. Get yourself a few MySQL tools.

MySQL Administrator (www.mysql.com)
MySQL Query Browser (www.mysql.com)

Then, you must grant the host "irc-ftp" access to the MySQL database. MySQL is persnickety about who "hostname" can access it's tables. If you read the user guide there is the "GRANT ALL on..." in the settings. If worse comes to worse, just replace "localhost" with "irc-ftp" in the installation guide and your access problems from cactid will be resolved.

Lastly, you need to schedule the following task to run every 5 minutes:

c:\php\php-win.exe <webroot>\cacti\poller.php

This scheduled task will determine the poller type you have selected and execute that poller and then lastly it will update the rrd files.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Guest

WinXP

Post by Guest »

One more thing. You need to set up password for WinXP to get sheduler running.
ttyR2
Posts: 49
Joined: Sat Nov 13, 2004 1:30 am

Post by ttyR2 »

It would appear that mysql doesn't like hyphens in hostnames. I added cacti@192.168.0.4 as having permissions instead but still got an error because cactid tacked the hostname on the end, making it cacti@192.168.0.4@irc-ftp.

Cactid is tacking the computers hostname on to the end of the DB_User. I tried changing the computer name to something simple like "ircftp" and yanked the hyphen but still get the permissions error.

PHPBB2 worked just fine when I set it up so it seems there's more to the authentication in Cacti than I'm seeing.

What I really need to know is, if things are working right should I be able to run cactid directly and NOT get any errors at a command prompt? If so, I'll keep troubleshooting in that direction.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Here you go:

shell> mysql --user=root --password mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@irc-ftp IDENTIFIED BY 'somepassword';
mysql> flush privileges;

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
ttyR2
Posts: 49
Joined: Sat Nov 13, 2004 1:30 am

Post by ttyR2 »

I set the DB_Host to 127.0.0.1 and when I ran cactid.exe from a command prompt, I got:

CACTID: Using cactid config file [cactid.conf]
CACTID: Windows Environment, root permissions not required for ICMP Ping
CACTID: Version 0.8.6c starting
CACTID: Executino Time: 4.1320 s. Threads: 1, Hosts: 1

Is that what I should see at a command prompt when running it?

Before I always got a permissions error about connecting to the cacti db in MySQL using 192.168.0.4 (the box's actual IP address."

I'm just troubleshooting things one step at a time. I'm confident that MySQL is set up correctly at this point, so it's a matter of getting cactid and rrdtools to run correctly.
Last edited by ttyR2 on Sat Nov 13, 2004 10:30 pm, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yes, I just hope I didn't misspell "Execution".

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

In the Windows environment, you always have to specify either the hostname or IP. Then, you also have to give it permissions.

TheWitness

p.s. I didn't misspell "Execution". Just checked the source. Whew!!!
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
ttyR2
Posts: 49
Joined: Sat Nov 13, 2004 1:30 am

Post by ttyR2 »

When I used the machines current IP (192.168.0.4) cactid wouldn't run. When I set it to 127.0.0.1 (default local loopback address) cactid ran without errors.

So...I'd set up the scheduled task yesterday, gave it an account to use with full permissions, but no logging is taking place and nothing is showing up in the rra directory. What's the next step?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You need to schedule poller.php and not cactid. If that's where your doing, set logging to DEBUG for 1 poll cycle and review your results, or simply run poller.php from the command line.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
ttyR2
Posts: 49
Joined: Sat Nov 13, 2004 1:30 am

Post by ttyR2 »

Sorry, I misspoke. Poller is sheduled to run, not cactid. I'm running php4.x.x so am using php.exe.

The scheduled task is:
Run: "C:\PHP\php.exe c:\program files\openxtra\mrtg\wwwroot\cacti\poller.php"

I do see a cmd window flash up for a second but can't read it as it's too fast. That's probably the scheduled task running.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Run it in DEBUG mode from the command line 1 time.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Don't forget to post your results.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
ttyR2
Posts: 49
Joined: Sat Nov 13, 2004 1:30 am

Post by ttyR2 »

You're referring to Console -> Cacti Settings -> General -> Poller Logging Level, right? Just so I'm clear. And I should see info in the log file in /cacti/log if it works, right?

When the scheduled job runs, I'm not seeing anything appear in the log file. It's still empty.
Last edited by ttyR2 on Sat Nov 13, 2004 10:47 pm, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest