Displaying Cacti graphs outside of cacti
Moderators: Developers, Moderators
Displaying Cacti graphs outside of cacti
Hi,
I've recently taken over responsibilities for the support and maintenance of a bunch of apps and we've just been given a snazzy plasma screen for displaying the status of these apps. What i'm trying to do is build a webpage with a load of information including some cacti graphs.
I know I can get to the graphs direcly by calling the following url:
http://[cactiServerName]/graph_image.php?local_graph_id=3556&rra_id=0&view_type=tree&graph_start=1214316960&graph_end=1214403360
What i'd like to do is to programatically display these in a c#.net page but i have an issue with the login screen.
My question: is there a way to do a http POST to the login screen with the correct credentials programatically?
Examples in c# would be preferable but any other language would do.
Thanks in advance,
Clarkie
I've recently taken over responsibilities for the support and maintenance of a bunch of apps and we've just been given a snazzy plasma screen for displaying the status of these apps. What i'm trying to do is build a webpage with a load of information including some cacti graphs.
I know I can get to the graphs direcly by calling the following url:
http://[cactiServerName]/graph_image.php?local_graph_id=3556&rra_id=0&view_type=tree&graph_start=1214316960&graph_end=1214403360
What i'd like to do is to programatically display these in a c#.net page but i have an issue with the login screen.
My question: is there a way to do a http POST to the login screen with the correct credentials programatically?
Examples in c# would be preferable but any other language would do.
Thanks in advance,
Clarkie
-
- Cacti User
- Posts: 379
- Joined: Fri Feb 16, 2007 11:37 am
- Location: Emeryville, CA
- Contact:
Guys,
if anonymous access is enabled for your graph views, then you will not have a problem. this is how we do it. If one of my users just goes to http://cacti.corp.company.com it will default to the /graph_view.php page which has my trees and graphs. I i then put a link to one of these graphs on another page of ours, we don't get prompted for a logon.
maybe i am missing something.
app
if anonymous access is enabled for your graph views, then you will not have a problem. this is how we do it. If one of my users just goes to http://cacti.corp.company.com it will default to the /graph_view.php page which has my trees and graphs. I i then put a link to one of these graphs on another page of ours, we don't get prompted for a logon.
maybe i am missing something.
app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
I think I've worked out the issue!
Cacti uses cookies to persist session information. This means that the cookie needs to be set on the client side and is then read every time the cacti url is used.
Is it possible to pass cookies through from one site to another?
I'm pretty sure this isn't possible for security reasons but if someone does know one way or the other to put me out of my misery.
Thanks
Cacti uses cookies to persist session information. This means that the cookie needs to be set on the client side and is then read every time the cacti url is used.
Is it possible to pass cookies through from one site to another?
I'm pretty sure this isn't possible for security reasons but if someone does know one way or the other to put me out of my misery.
Thanks
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Check the latest global.php for a new session hook in SVN 0.8.7. It's an IE thingy security hack. Are you using IE?
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?
here goes what I found on cactiusers.org
http://cactiusers.org/forums/topic1525.html
<?php
$_REQUEST["action"]="login";
$_POST["login_username"]='username';
$_POST["login_password"]='password';
$_SERVER["HTTP_REFERER"] = '/plugins/monitor/monitor.php';
include "index.php";
?>
http://cactiusers.org/forums/topic1525.html
<?php
$_REQUEST["action"]="login";
$_POST["login_username"]='username';
$_POST["login_password"]='password';
$_SERVER["HTTP_REFERER"] = '/plugins/monitor/monitor.php';
include "index.php";
?>
Who is online
Users browsing this forum: No registered users and 2 guests