Displaying Cacti graphs outside of cacti

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
clarkie
Posts: 3
Joined: Wed Jun 25, 2008 9:11 am

Displaying Cacti graphs outside of cacti

Post by clarkie »

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
noeladams
Posts: 10
Joined: Tue Jun 24, 2008 8:07 am

Post by noeladams »

i have a simlar setup but once the user logs into cacti they can click on the tab at the top to get to my traffic page.

I like your idea as people would not need to login to cacti...
bbrotherz
Posts: 4
Joined: Thu Jun 26, 2008 10:58 am

Post by bbrotherz »

Hi there,

I would like to accomplish the same.

I have a website where i want to show some stats of the server wich is monitored thru cacti. When I past the link as discribed above it shows nothing because of the admin login ofcourse.

Is there a way to show the stats on a website?
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

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
[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]
bbrotherz
Posts: 4
Joined: Thu Jun 26, 2008 10:58 am

Post by bbrotherz »

Very well, works fine now.
Thanks
clarkie
Posts: 3
Joined: Wed Jun 25, 2008 9:11 am

Post by clarkie »

Thanks for all the responses but unfortunately I'm not responsible for the cacti server and so we can't turn on anonymous access. So my problem is still the same. I'll just have to keep trying.

Cheers, Clarkie
clarkie
Posts: 3
Joined: Wed Jun 25, 2008 9:11 am

Post by clarkie »

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
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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
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?
noeladams
Posts: 10
Joined: Tue Jun 24, 2008 8:07 am

Post by noeladams »

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";

?>
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests