Some Changes to Make Cygwin Work Better

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

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Some Changes to Make Cygwin Work Better

Post by TheWitness »

Hello,

Made 2 changes and would like a third. First of all, Cygwin and Cactid, they do work together. Wow!! However, I found that the backslash/frontslash thing to be annoying. Therfore, I made two changes. The first was to the clean_up_path fundtion in functions.php and the second was to config_settings.php. Here they are:

config_settings.php:

"using_cygwin" => array(
"friendly_name" => "Running Cygwin",
"description" => "If running on Win32, paths don't have to be altered.",
"method" => "checkbox")

functions.php:

function clean_up_path($path) {
global $config;

if ($config["cacti_server_os"] == "unix" or read_config_option("using_cygwin") == "on") {
$path = str_replace("\\", "/", $path);
}elseif ($config["cacti_server_os"] == "win32") {
$path = str_replace("/", "\\", $path);

}

return $path;
}

What do you all think?

LJ
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Oh,

The third change was to manage RRD files by host name subdirectory. Thus far I have only added the option to the "General" tab.

config_settings.php:

"host_subdirs" => array(
"friendly_name" => "Utilize Subdirectories for RRD's ",
"description" => "Manage RRD files in host subdirectories.",
"method" => "checkbox"
),
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Oh,

The third change was to manage RRD files by host name subdirectory. Thus far I have only added the option to the "General" tab.

config_settings.php:

"host_subdirs" => array(
"friendly_name" => "Utilize Subdirectories for RRD's ",
"description" => "Manage RRD files in host subdirectories.",
"method" => "checkbox"
),
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

I like the option of having the rra's managed by subdirectory. Very nice!!! I'll end up with over 600 servers that I'll be monitoring using Cacti. My problem so far has been getting cactid to work at all. The documentation hasn't helped or anything.

Problems now are I can't get MySQL to compile. (haven't gotten much further than that).

Any help from anyone would be GREATLY appreciated
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Provide some details on your OS, Installed packages and samples of the error messages you are receiving. Oh, why are you compiling MySQL? Is it for the client libraries associated with CACTID?

TheWitness
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

Yes, it's for the Client Libraries associated with CACTID. According to the instructions, I need to compile it. I think I've found out my problem (loose nut between keyboard and seat). Turns out I was trying to compile the client not the source code. :o

I'm currently running a Windows 2003 Server with IIS6, Cacti 8.5a, php, mysql.

As far as Cacti itself is going, everything is working great. Polling and graphing are working beautifully. But I'm wanting to get Cactid working so that I can expand this to my enterprise.

I'll let you know if I have any issues now that I'm trying to compile the right stuff.

Thanks
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok,

I agreed to put something together for Ian, but here is the skinny:

1) Follow the README-WINDOWS in the instructions
2) Include the SNMPGET and SNMPWALK paths in the Cacti Settings identically to the RRDTOOL and PHP
3) Change all backslashes to front slashes for all your path settings
4) Move the CACTID.CONF file to the C:/CYGWIN/USR/LOCAL/CACTID/BIN directory
5) Edit that file, change the UserID and Password for the Cacti user. Remove the apparently blank line after the comments and the first setting. Also specify to use only 1 thread (there is currently a bug if you go over it that has uncontionable results).
6) In the CACTID.CONF file, do not reference LOCALHOST, specify either the host name or IPAddress and NOT 127.0.0.1
7) Use either MySQL Admin or MySQL Control Center to create permissions for your Cacti user from the appropriate host name specified in step 6. (I prefer MySQL Administrator (much cleaner interface))
8) Edit the Functions.php and Config_Settings.php as noted in the attached article and select "using cygwin" from the settings tab.

http://www.raxnet.net/board/viewtopic.php?t=3932 (Hey wait, that's this article??? See above)

9) Stop your production polling
10) Clear your cache under Utilities->Clear Cache
11) Run a command prompt and test by using the following command: "c:\cygwin\usr\local\cactid\bin\cactid" and let me know what I missed right away...

TheWitness
Last edited by TheWitness on Tue May 11, 2004 3:10 pm, edited 1 time in total.
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

as far as scheduling this (once I get everything compiled with cygwin), do I setup a new Scheduled Task and specify cactid.exe (or what filename??) instead of php.cmd

Thanks for all of your help.

Forget about this...I see you posted the command to run in your post. My apologies!!!!

I'll let you know ASAP the results. I'm running make on NetSNMP right now.
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

arrrgh....

on ./configure for cactid I'm getting the following error

Cannot find MySQL Header files under /usr

Any ideas? I'll search the forum as well. I think I've seen something on this.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you execute the commands as follows:

from the CYGWIN BASH

cd /MySQL-4.0.18
./configure --without-server
make
make install

Did they return error free?

TheWitness
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

I did not see any errors. Everything seemed to finish correctly. Where would I find /usr?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

c:\cygwin\usr

When the make actually takes place (assuming you are taking the defaults) cactid should compile AOK. What OS are you running?
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

2003 server. I have the folder for usr under my cygwin directory.

Here's a directory listing of c:\cygwin\usr
Attachments
dir.txt
(892 Bytes) Downloaded 191 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Are you compiling from the bash?
User avatar
skaminski
Cacti User
Posts: 92
Joined: Tue May 11, 2004 1:42 pm

Post by skaminski »

Yes, (I believe so). I'm running from within the cygwin command window. If that's the 'Bash' then yes, I am. If not, what's the bash?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests