[SOLVED] Grab image
Moderators: Developers, Moderators
[SOLVED] Grab image
How I can take any graphs from cacti and insert it in other page? In html tag <img>.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Right mouse click over the image and select "copy". Then "paste" in your applications. I do it all the time. When in graph zoom, you have to avoid the center of the image. Do it off to the side.
TheWitness
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?
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?
-
- Posts: 10
- Joined: Sat Apr 30, 2005 2:40 pm
-
- Posts: 10
- Joined: Sat Apr 30, 2005 2:40 pm
Thanks for the reply.
I'd like to grab an individual graph without having to turn on Graph Export for the whole server.
What I ended up doing was adding a bit of code to include/auth.php at the top right under the version check:
and then setting a hash value in the global $config var in config.php:
$config['auto_auth_key'] = 'MYSECRETAUTHKEY'
This allows me to put the entire graph_view.php request along with a normally defined users login name and password into a straight URL and pull down a graph image.
I'd like to grab an individual graph without having to turn on Graph Export for the whole server.
What I ended up doing was adding a bit of code to include/auth.php at the top right under the version check:
Code: Select all
if (!empty($_GET['auto_auth_key']))
{
if ($config['auto_auth_key'] == $_GET['auto_auth_key'])
{ // $_POST["login_username"] . "' and password = '" . md5($_POST["login_password"]
$username = preg_replace('/.*?(\w+).*/', '\1', trim($_GET['login_username']), 1);
$password = sql_sanitize(md5(trim($_GET['login_password'])));
$where = "username='$username' AND (password='$password')";
$auto_auth_user_id = db_fetch_cell("select id from user_auth where $where");
if (!empty($auto_auth_user_id)) {
$_SESSION["sess_user_id"] = $auto_auth_user_id;
}
}
}
$config['auto_auth_key'] = 'MYSECRETAUTHKEY'
This allows me to put the entire graph_view.php request along with a normally defined users login name and password into a straight URL and pull down a graph image.
Brian Blood
http://www.macserve.net/
http://www.macserve.net/
Who is online
Users browsing this forum: No registered users and 1 guest