summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-03-27 14:20:48 -0500
committerJonathan Prykop <jonathan@freeside.biz>2015-03-27 14:20:48 -0500
commitd9db63d82fce670cc3c21f86e577dd99c3d14028 (patch)
treedf09c1d38f0845594e59d47b336e7a427e59d289 /bin
parent1c9056a27c303170060004c1be93787c6a32dcb6 (diff)
RT#18834: Cacti integration [real graph import]
Diffstat (limited to 'bin')
-rwxr-xr-xbin/freeside_cacti.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/freeside_cacti.php b/bin/freeside_cacti.php
index 22fb0f0f4..0a9ee9c1c 100755
--- a/bin/freeside_cacti.php
+++ b/bin/freeside_cacti.php
@@ -32,15 +32,15 @@ if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($
$no_http_headers = true;
/*
-Currently, only drop-device is actually being used by Freeside integration,
+Currently, only drop-device and get-graphs is actually being used by Freeside integration,
but keeping commented out code for potential future development.
*/
include(dirname(__FILE__)."/../site/include/global.php");
include_once($config["base_path"]."/lib/api_device.php");
+include_once($config["base_path"]."/lib/api_automation_tools.php");
/*
-include_once($config["base_path"]."/lib/api_automation_tools.php");
include_once($config["base_path"]."/lib/api_data_source.php");
include_once($config["base_path"]."/lib/api_graph.php");
include_once($config["base_path"]."/lib/functions.php");
@@ -57,6 +57,9 @@ if (sizeof($parms)) {
foreach($parms as $parameter) {
@list($arg, $value) = @explode("=", $parameter);
switch ($arg) {
+ case "--get-graphs":
+ $action = 'get-graphs';
+ break;
case "--drop-device":
$action = 'drop-device';
break;
@@ -94,6 +97,9 @@ if (sizeof($parms)) {
/* Now take an action */
switch ($action) {
+case "get-graphs":
+ displayHostGraphs(host_id($ip),TRUE);
+ break;
case "drop-device":
$host_id = host_id($ip);
/*