Some Changes to Make Cygwin Work Better
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Some Changes to Make Cygwin Work Better
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
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
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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"
),
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"
),
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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"
),
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"
),
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
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
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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.
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
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
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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))
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
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))
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.
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.
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.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest