Autom8 -new device is not graphed
Moderators: Developers, Moderators
Autom8 -new device is not graphed
I’ve installed the autom8 plug in , its enabled.
When I add a new device I don't see any new graphs.
Device added by cli command
# perl add_device.php --description="BiPAC 7401VGPR3" --ip=192.168.1.254 --template=1 --version=2 --community="public"
Adding BiPAC 7401VGPR3 (192.168.1.254) as "Generic SNMP-enabled Host" using SNMP v2 with community "public"
Success - new device-id: (2)
# perl add_graphs.php --list-hosts
PHP Notice: Undefined variable: plugins in /usr/share/cacti/include/plugins.php on line 31
PHP Warning: array_merge(): Argument #1 is not an array in /usr/share/cacti/include/plugins.php on line 31
Known Hosts: (id, hostname, template, description)
1 127.0.0.1 8 Localhost
2 192.168.1.254 1 BiPAC 7401VGPR3
Question: What else needs do be done or checked so the new device is graphed and new the graphs show up ?
Thanks Glenn
When I add a new device I don't see any new graphs.
Device added by cli command
# perl add_device.php --description="BiPAC 7401VGPR3" --ip=192.168.1.254 --template=1 --version=2 --community="public"
Adding BiPAC 7401VGPR3 (192.168.1.254) as "Generic SNMP-enabled Host" using SNMP v2 with community "public"
Success - new device-id: (2)
# perl add_graphs.php --list-hosts
PHP Notice: Undefined variable: plugins in /usr/share/cacti/include/plugins.php on line 31
PHP Warning: array_merge(): Argument #1 is not an array in /usr/share/cacti/include/plugins.php on line 31
Known Hosts: (id, hostname, template, description)
1 127.0.0.1 8 Localhost
2 192.168.1.254 1 BiPAC 7401VGPR3
Question: What else needs do be done or checked so the new device is graphed and new the graphs show up ?
Thanks Glenn
Re: Autom8 -new device is not graphed
autom8 plug in active
- Attachments
-
- autom8 plug in active
- autom8.png (30.15 KiB) Viewed 3806 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Autom8 -new device is not graphed
I can't reproduce this on my hand-installed cacti on F14. You're running a debian-style installation with a different file layout. So I fear that sth ugly happened. I will have to view at those files to verify (e.g. include/plugins.php, include/global.php and stuff)
R.
R.
Re: Autom8 -new device is not graphed
Hello,
Im running opensuse 64 bit -current factory version
Cacti installation is in /usr/share/cacti
File listings for /usr/share/cacti/include/global.php and /usr/share/cacti/include/plugins.php included below.
# cat /usr/share/cacti/include/plugins.php
<?php
/*
* Copyright (c) 1999-2005 The SquirrelMail Project Team (http://squirrelmail.org)
* Licensed under the GNU GPL. For full terms see the file COPYING.
*/
global $plugin_hooks, $plugins_system;
$plugin_hooks = array();
$plugins_system = array('settings', 'boost', 'dsstats');
function use_plugin ($name) {
global $config;
if (file_exists($config['base_path'] . "/plugins/$name/setup.php")) {
include_once($config['base_path'] . "/plugins/$name/setup.php");
$function = "plugin_init_$name";
if (function_exists($function)) {
$function();
}
}
}
/**
* This function executes a hook.
* @param string $name Name of hook to fire
* @return mixed $data
*/
$oldplugins = read_config_option('oldplugins');
$oldplugins = explode(',', $oldplugins);
$plugins = array_merge($plugins, $oldplugins);
/* On startup, register all plugins configured for use. */
if (isset($plugins) && is_array($plugins)) {
foreach ($plugins as $name) {
use_plugin($name);
}
}
#######################################################
#######################################################
# cat /usr/share/cacti/include/global.php
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2010 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
/*
!!! IMPORTANT !!!
The following defaults are not to be altered. Please refer to
include/config.php for user configurable database settings.
*/
/* Default database settings*/
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";
/* Include configuration */
include(dirname(__FILE__) . "/config.php");
if (isset($config["cacti_version"])) {
die("Invalid include/config.php file detected.");
exit;
}
/* display ALL errors,
* but suppress deprecated warnings as a workaround until 088 */
if (defined("E_DEPRECATED")) {
error_reporting(E_ALL ^ E_DEPRECATED);
}else{
error_reporting(E_ALL);
}
/* Files that do not need http header information - Command line scripts */
$no_http_header_files = array(
"cmd.php",
"poller.php",
"poller_commands.php",
"script_server.php",
"query_host_cpu.php",
"query_host_partitions.php",
"sql.php",
"ss_host_cpu.php",
"ss_host_disk.php",
"ss_sql.php",
"add_device.php",
"add_graphs.php",
"add_perms.php",
"add_tree.php",
"copy_user.php",
"host_update_template.php",
"poller_export.php",
"poller_graphs_reapply_names.php",
"poller_output_empty.php",
"poller_reindex_hosts.php",
"rebuild_poller_cache.php",
"repair_database.php",
"structure_rra_paths.php"
);
$config = array();
$colors = array();
/* this should be auto-detected, set it manually if needed */
$config["cacti_server_os"] = (strstr(PHP_OS, "WIN")) ? "win32" : "unix";
/* built-in snmp support */
$config["php_snmp_support"] = function_exists("snmpget");
/* set URL path */
if (! isset($url_path)) {
$url_path = "";
}
$config['url_path'] = $url_path;
define('URL_PATH', $url_path);
/* used for includes */
$config["base_path"] = strtr(ereg_replace("(.*)[\\\/]include", "\\1", dirname(__FILE__)), "\\", "/");
$config["library_path"] = ereg_replace("(.*[\\\/])include", "\\1lib", dirname(__FILE__));
$config["include_path"] = dirname(__FILE__);
$config["rra_path"] = $config["base_path"] . '/rra';
/* colors */
$colors["dark_outline"] = "454E53";
$colors["dark_bar"] = "AEB4B7";
$colors["panel"] = "E5E5E5";
$colors["panel_text"] = "000000";
$colors["panel_link"] = "000000";
$colors["light"] = "F5F5F5";
$colors["alternate"] = "E7E9F2";
$colors["panel_dark"] = "C5C5C5";
$colors["header"] = "00438C";
$colors["header_panel"] = "6d88ad";
$colors["header_text"] = "ffffff";
$colors["form_background_dark"] = "E1E1E1";
$colors["form_alternate1"] = "F5F5F5";
$colors["form_alternate2"] = "E5E5E5";
if ((!in_array(basename($_SERVER["PHP_SELF"]), $no_http_header_files, true)) && ($_SERVER["PHP_SELF"] != "")) {
/* Sanity Check on "Corrupt" PHP_SELF */
if ($_SERVER["SCRIPT_NAME"] != $_SERVER["PHP_SELF"]) {
echo "\nInvalid PHP_SELF Path \n";
exit;
}
/* we don't want these pages cached */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
/* prevent IE from silently rejects cookies sent from third party sites. */
header('P3P: CP="CAO PSA OUR"');
/* initilize php session */
session_name($cacti_session_name);
session_start();
/* detect and handle get_magic_quotes */
if (!get_magic_quotes_gpc()) {
function addslashes_deep($value) {
$value = is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value);
return $value;
}
$_POST = array_map('addslashes_deep', $_POST);
$_GET = array_map('addslashes_deep', $_GET);
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
}
/* make sure to start only only Cacti session at a time */
if (!isset($_SESSION["cacti_cwd"])) {
$_SESSION["cacti_cwd"] = $config["base_path"];
}else{
if ($_SESSION["cacti_cwd"] != $config["base_path"]) {
session_unset();
session_destroy();
}
}
}
/* emulate 'register_globals' = 'off' if turned on */
if ((bool)ini_get("register_globals")) {
$not_unset = array("_GET", "_POST", "_COOKIE", "_SERVER", "_SESSION", "_ENV", "_FILES", "database_type", "database_default", "database_hostname", "database_username", "database_password", "config", "colors");
/* Not only will array_merge give a warning if a parameter is not an array, it will
* actually fail. So we check if HTTP_SESSION_VARS has been initialised. */
if (!isset($_SESSION)) {
$_SESSION = array();
}
/* Merge all into one extremely huge array; unset this later */
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION, $_ENV, $_FILES);
unset($input["input"]);
unset($input["not_unset"]);
while (list($var,) = @each($input)) {
if (!in_array($var, $not_unset)) {
unset($$var);
}
}
unset($input);
}
/* include base modules */
include($config["library_path"] . "/adodb/adodb.inc.php");
include($config["library_path"] . "/database.php");
/* connect to the database server */
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type, $database_port);
/* include additional modules */
include_once($config["library_path"] . "/functions.php");
include_once($config["include_path"] . "/global_constants.php");
include_once($config["library_path"] . "/plugins.php");
include_once($config["include_path"] . "/plugins.php");
include_once($config["include_path"] . "/global_arrays.php");
include_once($config["include_path"] . "/global_settings.php");
include_once($config["include_path"] . "/global_form.php");
include_once($config["library_path"] . "/html.php");
include_once($config["library_path"] . "/html_form.php");
include_once($config["library_path"] . "/html_utility.php");
include_once($config["library_path"] . "/html_validate.php");
include_once($config["library_path"] . "/variables.php");
include_once($config["library_path"] . "/auth.php");
api_plugin_hook("config_insert");
/* current cacti version */
$config["cacti_version"] = "0.8.7g";
?>
Im running opensuse 64 bit -current factory version
Cacti installation is in /usr/share/cacti
File listings for /usr/share/cacti/include/global.php and /usr/share/cacti/include/plugins.php included below.
# cat /usr/share/cacti/include/plugins.php
<?php
/*
* Copyright (c) 1999-2005 The SquirrelMail Project Team (http://squirrelmail.org)
* Licensed under the GNU GPL. For full terms see the file COPYING.
*/
global $plugin_hooks, $plugins_system;
$plugin_hooks = array();
$plugins_system = array('settings', 'boost', 'dsstats');
function use_plugin ($name) {
global $config;
if (file_exists($config['base_path'] . "/plugins/$name/setup.php")) {
include_once($config['base_path'] . "/plugins/$name/setup.php");
$function = "plugin_init_$name";
if (function_exists($function)) {
$function();
}
}
}
/**
* This function executes a hook.
* @param string $name Name of hook to fire
* @return mixed $data
*/
$oldplugins = read_config_option('oldplugins');
$oldplugins = explode(',', $oldplugins);
$plugins = array_merge($plugins, $oldplugins);
/* On startup, register all plugins configured for use. */
if (isset($plugins) && is_array($plugins)) {
foreach ($plugins as $name) {
use_plugin($name);
}
}
#######################################################
#######################################################
# cat /usr/share/cacti/include/global.php
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2010 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
/*
!!! IMPORTANT !!!
The following defaults are not to be altered. Please refer to
include/config.php for user configurable database settings.
*/
/* Default database settings*/
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";
/* Include configuration */
include(dirname(__FILE__) . "/config.php");
if (isset($config["cacti_version"])) {
die("Invalid include/config.php file detected.");
exit;
}
/* display ALL errors,
* but suppress deprecated warnings as a workaround until 088 */
if (defined("E_DEPRECATED")) {
error_reporting(E_ALL ^ E_DEPRECATED);
}else{
error_reporting(E_ALL);
}
/* Files that do not need http header information - Command line scripts */
$no_http_header_files = array(
"cmd.php",
"poller.php",
"poller_commands.php",
"script_server.php",
"query_host_cpu.php",
"query_host_partitions.php",
"sql.php",
"ss_host_cpu.php",
"ss_host_disk.php",
"ss_sql.php",
"add_device.php",
"add_graphs.php",
"add_perms.php",
"add_tree.php",
"copy_user.php",
"host_update_template.php",
"poller_export.php",
"poller_graphs_reapply_names.php",
"poller_output_empty.php",
"poller_reindex_hosts.php",
"rebuild_poller_cache.php",
"repair_database.php",
"structure_rra_paths.php"
);
$config = array();
$colors = array();
/* this should be auto-detected, set it manually if needed */
$config["cacti_server_os"] = (strstr(PHP_OS, "WIN")) ? "win32" : "unix";
/* built-in snmp support */
$config["php_snmp_support"] = function_exists("snmpget");
/* set URL path */
if (! isset($url_path)) {
$url_path = "";
}
$config['url_path'] = $url_path;
define('URL_PATH', $url_path);
/* used for includes */
$config["base_path"] = strtr(ereg_replace("(.*)[\\\/]include", "\\1", dirname(__FILE__)), "\\", "/");
$config["library_path"] = ereg_replace("(.*[\\\/])include", "\\1lib", dirname(__FILE__));
$config["include_path"] = dirname(__FILE__);
$config["rra_path"] = $config["base_path"] . '/rra';
/* colors */
$colors["dark_outline"] = "454E53";
$colors["dark_bar"] = "AEB4B7";
$colors["panel"] = "E5E5E5";
$colors["panel_text"] = "000000";
$colors["panel_link"] = "000000";
$colors["light"] = "F5F5F5";
$colors["alternate"] = "E7E9F2";
$colors["panel_dark"] = "C5C5C5";
$colors["header"] = "00438C";
$colors["header_panel"] = "6d88ad";
$colors["header_text"] = "ffffff";
$colors["form_background_dark"] = "E1E1E1";
$colors["form_alternate1"] = "F5F5F5";
$colors["form_alternate2"] = "E5E5E5";
if ((!in_array(basename($_SERVER["PHP_SELF"]), $no_http_header_files, true)) && ($_SERVER["PHP_SELF"] != "")) {
/* Sanity Check on "Corrupt" PHP_SELF */
if ($_SERVER["SCRIPT_NAME"] != $_SERVER["PHP_SELF"]) {
echo "\nInvalid PHP_SELF Path \n";
exit;
}
/* we don't want these pages cached */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
/* prevent IE from silently rejects cookies sent from third party sites. */
header('P3P: CP="CAO PSA OUR"');
/* initilize php session */
session_name($cacti_session_name);
session_start();
/* detect and handle get_magic_quotes */
if (!get_magic_quotes_gpc()) {
function addslashes_deep($value) {
$value = is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value);
return $value;
}
$_POST = array_map('addslashes_deep', $_POST);
$_GET = array_map('addslashes_deep', $_GET);
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
}
/* make sure to start only only Cacti session at a time */
if (!isset($_SESSION["cacti_cwd"])) {
$_SESSION["cacti_cwd"] = $config["base_path"];
}else{
if ($_SESSION["cacti_cwd"] != $config["base_path"]) {
session_unset();
session_destroy();
}
}
}
/* emulate 'register_globals' = 'off' if turned on */
if ((bool)ini_get("register_globals")) {
$not_unset = array("_GET", "_POST", "_COOKIE", "_SERVER", "_SESSION", "_ENV", "_FILES", "database_type", "database_default", "database_hostname", "database_username", "database_password", "config", "colors");
/* Not only will array_merge give a warning if a parameter is not an array, it will
* actually fail. So we check if HTTP_SESSION_VARS has been initialised. */
if (!isset($_SESSION)) {
$_SESSION = array();
}
/* Merge all into one extremely huge array; unset this later */
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION, $_ENV, $_FILES);
unset($input["input"]);
unset($input["not_unset"]);
while (list($var,) = @each($input)) {
if (!in_array($var, $not_unset)) {
unset($$var);
}
}
unset($input);
}
/* include base modules */
include($config["library_path"] . "/adodb/adodb.inc.php");
include($config["library_path"] . "/database.php");
/* connect to the database server */
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type, $database_port);
/* include additional modules */
include_once($config["library_path"] . "/functions.php");
include_once($config["include_path"] . "/global_constants.php");
include_once($config["library_path"] . "/plugins.php");
include_once($config["include_path"] . "/plugins.php");
include_once($config["include_path"] . "/global_arrays.php");
include_once($config["include_path"] . "/global_settings.php");
include_once($config["include_path"] . "/global_form.php");
include_once($config["library_path"] . "/html.php");
include_once($config["library_path"] . "/html_form.php");
include_once($config["library_path"] . "/html_utility.php");
include_once($config["library_path"] . "/html_validate.php");
include_once($config["library_path"] . "/variables.php");
include_once($config["library_path"] . "/auth.php");
api_plugin_hook("config_insert");
/* current cacti version */
$config["cacti_version"] = "0.8.7g";
?>
Re: Autom8 -new device is not graphed
Please note those patches failed to apply to cacti-0.8.7g.tar.gz
# patch -p1 -N --dry-run <./plugins/autom8/patches-087e/lib_api_automation_tools.php.patch
patching file lib/api_automation_tools.php
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file lib/api_automation_tools.php.rej
# patch -p1 -N --dry-run <./plugins/autom8/patches-087e/host.php.patch
patching file host.php
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file host.php.rej
# patch -p1 -N --dry-run <./plugins/autom8/patches-087e/lib_api_automation_tools.php.patch
patching file lib/api_automation_tools.php
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file lib/api_automation_tools.php.rej
# patch -p1 -N --dry-run <./plugins/autom8/patches-087e/host.php.patch
patching file host.php
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file host.php.rej
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Autom8 -new device is not graphed
Are you running unpatched or patches 087g? Which PIA are u using?
Yes, I know all this patching is really ugly. I may consider posting whole files, at least for both those modules.
R.
Yes, I know all this patching is really ugly. I may consider posting whole files, at least for both those modules.
R.
Re: Autom8 -new device is not graphed
I did a New clean install of cacti ,Plugin Architecture , Autom8
This was the result - I urn a script to do this. I'll list that at the end.
First the result:
# ./install.sh
patching file lib/api_data_source.php
patching file lib/database.php
patching file poller.php
patching file graph_view.php
patching file lib/html_form.php
patching file lib/data_query.php
patching file data_sources.php
patching file graphs.php
patching file lib/ldap.php
patching file script_server.php
patching file lib/ping.php
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
Hunk #6 FAILED at 1323.
1 out of 6 hunks FAILED -- saving rejects to file data_sources.php.rej
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file images/disable_icon.png
patching file images/enable_icon_disabled.png
patching file images/enable_icon.png
patching file images/install_icon_disabled.png
patching file images/install_icon.png
patching file images/uninstall_icon.gif
patching file images/view_none.gif
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/config.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
Hunk #1 succeeded at 108 with fuzz 2.
Hunk #2 succeeded at 305 (offset -1 lines).
Hunk #3 FAILED at 450.
Hunk #4 succeeded at 497 (offset -2 lines).
1 out of 4 hunks FAILED -- saving rejects to file poller.php.rej
patching file user_admin.php
patching file utilities.php
#content of ./data_sources.php.rej
--- data_sources.php 2010-07-09 18:33:46.000000000 -0400
+++ data_sources.php 2010-07-09 18:34:11.000000000 -0400
@@ -1323,6 +1336,7 @@
$i = 0;
if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
+ $data_source = api_plugin_hook_function('data_sources_table', $data_source);
$data_template_name = ((empty($data_source["data_template_name"])) ? "<em>None</em>" : $data_source["data_template_name"]);
$data_input_name = ((empty($data_source["data_input_name"])) ? "<em>External</em>" : $data_source["data_input_name"]);
$poller_interval = ((isset($poller_intervals[$data_source["local_data_id"]])) ? $poller_intervals[$data_source["local_data_id"]] : 0);
#content of ./poller.php.rej
--- poller.php 2010-07-09 18:33:46.000000000 -0400
+++ poller.php 2010-07-09 18:34:11.000000000 -0400
@@ -450,9 +454,11 @@
/* sleep the appripriate amount of time */
if ($poller_runs_completed < $poller_runs) {
+ api_plugin_hook('poller_bottom');
db_close();
usleep($sleep_time * 1000000);
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type, $database_port);
+ api_plugin_hook('poller_top');
}
}else if (read_config_option('log_verbosity') >= POLLER_VERBOSITY_MEDIUM || $debug) {
cacti_log("WARNING: Cacti Polling Cycle Exceeded Poller Interval by " . $loop_end-$loop_start-$poller_interval . " seconds", TRUE, "POLLER");
Next the script used
# ./install.sh
cd /usr/share
#sorces used
# wget -c http://www.cacti.net/downloads/patches/ ... vate.patch
# wget -c http://www.cacti.net/downloads/patches/ ... view.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tput.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tion.patch
# wget -c http://www.cacti.net/downloads/patches/ ... arse.patch
# wget -c http://www.cacti.net/downloads/patches/ ... ping.patch
# wget -c http://www.cacti.net/downloads/patches/ ... rval.patch
# wget -c http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# wget -c http://mirror.cactiusers.org/downloads/ ... 2.8.tar.gz
# wget -c "http://docs.cacti.net/_media/plugin:aut ... ache=cache"
cp "plugin:autom8-v0.35.tgz?id=plugin:autom8&cache=cache" autom8-v0.35.tgz
# Clean install of cacti
rm -rf cacti
tar -zxf cacti-0.8.7g.tar.gz
mv cacti-0.8.7g cacti
cd /usr/share/cacti
#pia
tar -xf ../cacti-plugin-0.8.7g-PA-v2.8.tar
#autom8
tar -xzf ../autom8-v0.35.tgz
mkdir plugins
mv trunk plugins/autom8
patch -p1 -N < ../data_source_deactivate.patch
patch -p1 -N < ../poller_interval.patch
patch -p1 -N < ../graph_list_view.patch
patch -p1 -N < ../html_output.patch
patch -p1 -N < ../ldap_group_authenication.patch
patch -p1 -N < ../script_server_command_line_parse.patch
patch -p1 -N < ../ping.patch
patch -p1 -N < cacti-plugin-arch/cacti-plugin-0.8.7g-PA-v2.8.diff
#copy in configuration files.
cp /media/disk/cacti/installation/scripting/cacti.conf /etc/apache2/vhosts.d/cacti.conf
cp /media/disk/cacti/installation/scripting/config.php /usr/share/cacti/include/config.php
#permission settings
chown -R wwwrun:www /usr/share/cacti/
echo " content of failed patches"
echo "#content of ./data_sources.php.rej"
cat ./data_sources.php.rej
echo " "
echo "#content of ./poller.php.rej"
As noted two patches failed the .rej contents listed above.
If the script is run more than once It will start from a clean install.
Glenn
This was the result - I urn a script to do this. I'll list that at the end.
First the result:
# ./install.sh
patching file lib/api_data_source.php
patching file lib/database.php
patching file poller.php
patching file graph_view.php
patching file lib/html_form.php
patching file lib/data_query.php
patching file data_sources.php
patching file graphs.php
patching file lib/ldap.php
patching file script_server.php
patching file lib/ping.php
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
Hunk #6 FAILED at 1323.
1 out of 6 hunks FAILED -- saving rejects to file data_sources.php.rej
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file images/disable_icon.png
patching file images/enable_icon_disabled.png
patching file images/enable_icon.png
patching file images/install_icon_disabled.png
patching file images/install_icon.png
patching file images/uninstall_icon.gif
patching file images/view_none.gif
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/config.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
Hunk #1 succeeded at 108 with fuzz 2.
Hunk #2 succeeded at 305 (offset -1 lines).
Hunk #3 FAILED at 450.
Hunk #4 succeeded at 497 (offset -2 lines).
1 out of 4 hunks FAILED -- saving rejects to file poller.php.rej
patching file user_admin.php
patching file utilities.php
#content of ./data_sources.php.rej
--- data_sources.php 2010-07-09 18:33:46.000000000 -0400
+++ data_sources.php 2010-07-09 18:34:11.000000000 -0400
@@ -1323,6 +1336,7 @@
$i = 0;
if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
+ $data_source = api_plugin_hook_function('data_sources_table', $data_source);
$data_template_name = ((empty($data_source["data_template_name"])) ? "<em>None</em>" : $data_source["data_template_name"]);
$data_input_name = ((empty($data_source["data_input_name"])) ? "<em>External</em>" : $data_source["data_input_name"]);
$poller_interval = ((isset($poller_intervals[$data_source["local_data_id"]])) ? $poller_intervals[$data_source["local_data_id"]] : 0);
#content of ./poller.php.rej
--- poller.php 2010-07-09 18:33:46.000000000 -0400
+++ poller.php 2010-07-09 18:34:11.000000000 -0400
@@ -450,9 +454,11 @@
/* sleep the appripriate amount of time */
if ($poller_runs_completed < $poller_runs) {
+ api_plugin_hook('poller_bottom');
db_close();
usleep($sleep_time * 1000000);
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type, $database_port);
+ api_plugin_hook('poller_top');
}
}else if (read_config_option('log_verbosity') >= POLLER_VERBOSITY_MEDIUM || $debug) {
cacti_log("WARNING: Cacti Polling Cycle Exceeded Poller Interval by " . $loop_end-$loop_start-$poller_interval . " seconds", TRUE, "POLLER");
Next the script used
# ./install.sh
cd /usr/share
#sorces used
# wget -c http://www.cacti.net/downloads/patches/ ... vate.patch
# wget -c http://www.cacti.net/downloads/patches/ ... view.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tput.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tion.patch
# wget -c http://www.cacti.net/downloads/patches/ ... arse.patch
# wget -c http://www.cacti.net/downloads/patches/ ... ping.patch
# wget -c http://www.cacti.net/downloads/patches/ ... rval.patch
# wget -c http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# wget -c http://mirror.cactiusers.org/downloads/ ... 2.8.tar.gz
# wget -c "http://docs.cacti.net/_media/plugin:aut ... ache=cache"
cp "plugin:autom8-v0.35.tgz?id=plugin:autom8&cache=cache" autom8-v0.35.tgz
# Clean install of cacti
rm -rf cacti
tar -zxf cacti-0.8.7g.tar.gz
mv cacti-0.8.7g cacti
cd /usr/share/cacti
#pia
tar -xf ../cacti-plugin-0.8.7g-PA-v2.8.tar
#autom8
tar -xzf ../autom8-v0.35.tgz
mkdir plugins
mv trunk plugins/autom8
patch -p1 -N < ../data_source_deactivate.patch
patch -p1 -N < ../poller_interval.patch
patch -p1 -N < ../graph_list_view.patch
patch -p1 -N < ../html_output.patch
patch -p1 -N < ../ldap_group_authenication.patch
patch -p1 -N < ../script_server_command_line_parse.patch
patch -p1 -N < ../ping.patch
patch -p1 -N < cacti-plugin-arch/cacti-plugin-0.8.7g-PA-v2.8.diff
#copy in configuration files.
cp /media/disk/cacti/installation/scripting/cacti.conf /etc/apache2/vhosts.d/cacti.conf
cp /media/disk/cacti/installation/scripting/config.php /usr/share/cacti/include/config.php
#permission settings
chown -R wwwrun:www /usr/share/cacti/
echo " content of failed patches"
echo "#content of ./data_sources.php.rej"
cat ./data_sources.php.rej
echo " "
echo "#content of ./poller.php.rej"
As noted two patches failed the .rej contents listed above.
If the script is run more than once It will start from a clean install.
Glenn
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Autom8 -new device is not graphed
The failing patches are a result of PIA that patches files that have already been patched.
This is why we "released" PIA 2.9. It's not the common way of releasing, yes.
Please see http://forums.cacti.net/viewtopic.php?f=4&t=40386
R.
This is why we "released" PIA 2.9. It's not the common way of releasing, yes.
Please see http://forums.cacti.net/viewtopic.php?f=4&t=40386
R.
Re: Autom8 -new device is not graphed
Thanks for the info.
PIA 2.9. seem to apply ok
The result was
# ./install.sh
cd /usr/share
#sorces used
# wget -c http://www.cacti.net/downloads/patches/ ... vate.patch
# wget -c http://www.cacti.net/downloads/patches/ ... view.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tput.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tion.patch
# wget -c http://www.cacti.net/downloads/patches/ ... arse.patch
# wget -c http://www.cacti.net/downloads/patches/ ... ping.patch
# wget -c http://www.cacti.net/downloads/patches/ ... rval.patch
# wget -c http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# wget -c http://mirror.cactiusers.org/downloads/ ... 2.8.tar.gz
# wget -c http://www.cacti.net/downloads/pia/cact ... 2.9.tar.gz
cp "plugin:autom8-v0.35.tgz?id=plugin:autom8&cache=cache" autom8-v0.35.tgz
# gunzip -v cacti-plugin-0.8.7g-PA-v2.9.tar.gz
# Fresh isstall of cacti
rm -rf cacti
tar -zxf cacti-0.8.7g.tar.gz
mv cacti-0.8.7g cacti
cd /usr/share/cacti
#pia
tar -xf ../cacti-plugin-0.8.7g-PA-v2.9.tar
#autom8
tar -xzf ../autom8-v0.35.tgz
mkdir plugins
mv trunk plugins/autom8
patch -p1 -N < ../data_source_deactivate.patch
patch -p1 -N < ../poller_interval.patch
patch -p1 -N < ../graph_list_view.patch
patch -p1 -N < ../html_output.patch
patch -p1 -N < ../ldap_group_authenication.patch
patch -p1 -N < ../script_server_command_line_parse.patch
patch -p1 -N < ../ping.patch
patch -p1 -N < cacti-plugin-arch/cacti-plugin-0.8.7g-PA-v2.9.diff
cp /media/disk/cacti/installation/scripting/cacti.conf /etc/apache2/vhosts.d/cacti.conf
cp /media/disk/cacti/installation/scripting/config.php /usr/share/cacti/include/config.php
chown -R wwwrun:www /usr/share/cacti/
I have now installed cacti-0.8.7g + plugin-0.8.7g-PA-v2.9 + autom8-v0.35
I re-added in the new device
# perl add_device.php --description="BiPAC 7401VGPR3" --ip=192.168.1.254 --template=1 --version=2 --community="public"
Adding BiPAC 7401VGPR3 (192.168.1.254) as "Generic SNMP-enabled Host" using SNMP v2 with community "public"
Success - new device-id: (5)
To add the new graphs [see bitmap attached ] do I
- Select Template
- Select items I want to Graph
- Select Graph type
- Press 'Create'
Thanks
PIA 2.9. seem to apply ok
The result was
# ./install.sh
cd /usr/share
#sorces used
# wget -c http://www.cacti.net/downloads/patches/ ... vate.patch
# wget -c http://www.cacti.net/downloads/patches/ ... view.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tput.patch
# wget -c http://www.cacti.net/downloads/patches/ ... tion.patch
# wget -c http://www.cacti.net/downloads/patches/ ... arse.patch
# wget -c http://www.cacti.net/downloads/patches/ ... ping.patch
# wget -c http://www.cacti.net/downloads/patches/ ... rval.patch
# wget -c http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# wget -c http://mirror.cactiusers.org/downloads/ ... 2.8.tar.gz
# wget -c http://www.cacti.net/downloads/pia/cact ... 2.9.tar.gz
cp "plugin:autom8-v0.35.tgz?id=plugin:autom8&cache=cache" autom8-v0.35.tgz
# gunzip -v cacti-plugin-0.8.7g-PA-v2.9.tar.gz
# Fresh isstall of cacti
rm -rf cacti
tar -zxf cacti-0.8.7g.tar.gz
mv cacti-0.8.7g cacti
cd /usr/share/cacti
#pia
tar -xf ../cacti-plugin-0.8.7g-PA-v2.9.tar
#autom8
tar -xzf ../autom8-v0.35.tgz
mkdir plugins
mv trunk plugins/autom8
patch -p1 -N < ../data_source_deactivate.patch
patch -p1 -N < ../poller_interval.patch
patch -p1 -N < ../graph_list_view.patch
patch -p1 -N < ../html_output.patch
patch -p1 -N < ../ldap_group_authenication.patch
patch -p1 -N < ../script_server_command_line_parse.patch
patch -p1 -N < ../ping.patch
patch -p1 -N < cacti-plugin-arch/cacti-plugin-0.8.7g-PA-v2.9.diff
cp /media/disk/cacti/installation/scripting/cacti.conf /etc/apache2/vhosts.d/cacti.conf
cp /media/disk/cacti/installation/scripting/config.php /usr/share/cacti/include/config.php
chown -R wwwrun:www /usr/share/cacti/
I have now installed cacti-0.8.7g + plugin-0.8.7g-PA-v2.9 + autom8-v0.35
I re-added in the new device
# perl add_device.php --description="BiPAC 7401VGPR3" --ip=192.168.1.254 --template=1 --version=2 --community="public"
Adding BiPAC 7401VGPR3 (192.168.1.254) as "Generic SNMP-enabled Host" using SNMP v2 with community "public"
Success - new device-id: (5)
To add the new graphs [see bitmap attached ] do I
- Select Template
- Select items I want to Graph
- Select Graph type
- Press 'Create'
Thanks
Re: Autom8 -new device is not graphed
items to graph
- Attachments
-
- new-graph.png (171.44 KiB) Viewed 3774 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Autom8 -new device is not graphed
I do not understand.
Do you want to manually create the graphs or do you want to make autom8 do it for you?
Did you read the autom8 manual, then? Did you create the autom8 rules?
R.
Do you want to manually create the graphs or do you want to make autom8 do it for you?
Did you read the autom8 manual, then? Did you create the autom8 rules?
R.
Who is online
Users browsing this forum: No registered users and 4 guests