Graph Presets

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

Moderators: Developers, Moderators

Post Reply
Willie

Graph Presets

Post by Willie »

I am on cacti 0.8.6b with all of the patches from the site applied (pre-packed directory) and when I go to the graphs page, I will get a 404 error is I select a "graph preset" such as "last week". It appears that the URL doesnt get properly posted.

Regards,

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

Post by TheWitness »

What?

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?
Willie

Graph Presets

Post by Willie »

Larry,

Wanted to give you an update on the graphing problem that I am having. It appears to be something changed in IIS6 on 2003.

Here are the symptoms.
log into cacti,
click on "graphs" tab
everything is ok the first time
click on the console tab
everything is always ok on the console tab.
click on the graphs tab
left pane (treeview) is ok, right pane is just a grey color with nothing on it.
drilling into the treeview and clicking on a leaf will pull the right side back up properly.

However, under IIS 6, if I select an item from the presets drop down, I always get a 404 error. Here is a cut from the url:
http://89.10.12.37/&predefined_timespan=4

Notice that the graph_view.php is missing!

Regards,

Willie
Willie

Graph presets

Post by Willie »

Larry,

Here is an update to the graph presets issue. I have tracked it down and found a difference between IIS 5 and IIS 6. The get_browser_query-string function from functions.php returns nothing if running under IIS 6. It appears that the isset for REQUEST_URI is returning a true even though there is no value from phpinfo(). Below is the test script that I am using on IIS 5 and 6 to test the differences. The workaround for me is to modify functions.php and just have the get_browser_query_string skip the isset. I am not sure if this is the correct way. Any guidance would be apprciated.

Regards,

Willie

<?php

echo "Test for URL varibles using \$HTTP_GET_VARS[\"op\"]<P>";

if (isset($HTTP_GET_VARS["op"])) {

echo "var op = ".$HTTP_GET_VARS["op"]."<P>";
}

echo "<a href=\"testurl.php?op=test_sucess\">URL Variable Link</a>";

//----------------------------------------------------------

echo "<P><HR>Test for URL varibles using \$_GET['type']<P>";

echo "<a href=\"testurl.php?type=show&sort=desc&foo=bar\">URL Variable Link</a>";

if (isset($_GET['type'])) {

echo "<P>Here are our variables: <br >\n";
echo "1. ". $_GET['type'] ."<br />\n";
echo "2. ". $_GET['sort'] ."<br />\n";
echo "3. ". $_GET['foo'] ."<br />\n";

}

//----------------------------------------------------------

echo "<P><HR>Test for get_Browser_Query_string<P>";
echo get_browser_query_string();



function get_browser_query_string() {
if (isset($_SERVER["REQUEST_URI"])) {
return basename($_SERVER["REQUEST_URI"]);
}else{
return basename($_SERVER["PHP_SELF"]) . (empty($_SERVER["QUERY_STRING"]) ? "" : "?" . $_SERVER["QUERY_STRING"]);
}
}

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

Post by TheWitness »

Willie,

I forwarded to Ian for comment.

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?
Alberto

presets issues ..

Post by Alberto »

I have the same error running IIS 6.

Any news on this one ?? this is the only issue remaining for my new installation using IIS 6.

Thanks,

Alberto
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Here's the official patch against 0.8.6b. Apply the patch in your Cacti directory.

Code: Select all

wget http://www.cacti.net/downloads/patches/0.8.6b/iis6_request_uri.patch
patch -p1 < iis6_request_uri.patch
The pre-patched lib/functions.php file is here:

http://www.cacti.net/downloads/patches/ ... ctions.php

-Ian
Willie

graph presets

Post by Willie »

Ian,

It works fine. thanks!!

Regards,

Willie
Alberto

Post by Alberto »

I applied the patch and it works fine !!!

Thanks a lot Ian,

Alberto
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests