Manage Plugin 0.6.2 for monitoring networks, servers...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

Yes i got 4.2.
i downloaded and installed yestererday.
I missed to install the service and process templates.
maybe that is the fault.
i did now, but the errors are still there.

and i cant find any debug link. :D
nor a manage_debug.php skript in my folder.. ?!?

greez ahab


thx for your help mcutting
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Ok. Do the following:

1. Drop all MANAGE_ tables from the CACTI database, using the below from phpMyAdmin (execute as SQL - watch out for forum line wrapping)


ALTER TABLE `host` DROP `manage`;
ALTER TABLE `host` DROP `manage_group`;

DROP TABLE `manage_host`;
DROP TABLE `manage_method`;
DROP TABLE `manage_alerts`;
DROP TABLE `manage_host_services`;
DROP TABLE `manage_device_type`;
DROP TABLE `manage_templates`;
DROP TABLE `manage_groups`;
DROP TABLE `manage_services`;
DROP TABLE `manage_process`;

DELETE FROM `plugin_update_info` WHERE `plugin` = 'manage';

DELETE FROM `settings` WHERE `name` = 'manage_poller';
DELETE FROM `settings` WHERE `name` = 'manage_events';
DELETE FROM `settings` WHERE `name` = 'manage_method';
DELETE FROM `settings` WHERE `name` = 'manage_date';
DELETE FROM `settings` WHERE `name` = 'manage_use_patch';
DELETE FROM `settings` WHERE `name` = 'manage_send';
DELETE FROM `settings` WHERE `name` = 'manage_netsend_events';
DELETE FROM `settings` WHERE `name` = 'manage_netsend_method';
DELETE FROM `settings` WHERE `name` = 'manage_list';
DELETE FROM `settings` WHERE `name` = 'manage_list_separator';
DELETE FROM `settings` WHERE `name` = 'manage_full_separator';
DELETE FROM `settings` WHERE `name` = 'manage_simple_separator';
DELETE FROM `settings` WHERE `name` = 'manage_legend';
DELETE FROM `settings` WHERE `name` = 'manage_poller_hosts';

2. Insert the following code into the database, again, using SQL

alter table host add manage char(3) default '' not null after disabled;
CREATE TABLE manage_host ( id mediumint(8) unsigned NOT NULL default '0', uptime bigint(20) default NULL, type mediumint(8) unsigned NOT NULL default '0', services text, statut text);
CREATE TABLE manage_method ( id mediumint(8) unsigned NOT NULL default '0', method text);
CREATE TABLE manage_alerts (idh mediumint(8) unsigned NOT NULL default '0', datetime datetime NOT NULL default '0000-00-00 00:00:00', ids mediumint(8) unsigned default '0', message text, note text, ida mediumint(9) unsigned NOT NULL auto_increment, PRIMARY KEY (ida));
CREATE TABLE manage_host_services ( id mediumint(8) unsigned NOT NULL default '0', services mediumint(8) unsigned NOT NULL default '0', statut text);
INSERT INTO settings VALUES ('manage_events', '5');
INSERT INTO settings VALUES ('manage_poller', '0');
INSERT INTO settings VALUES ('manage_method', '0');
INSERT INTO settings VALUES ('manage_date', '0');
ALTER TABLE manage_host ADD `force` MEDIUMINT(8) unsigned NOT NULL default '9';
CREATE TABLE manage_device_type ( id MEDIUMINT(8) NOT NULL AUTO_INCREMENT , name TEXT, image TEXT, PRIMARY KEY ( id ) );
INSERT INTO manage_device_type VALUES (1, 'Windows 2003 Host', 'win2003.png');
INSERT INTO manage_device_type VALUES (2, 'Windows XP Host', NULL);
INSERT INTO manage_device_type VALUES (3, 'Windows 2000 Host', 'win2000.png');
INSERT INTO manage_device_type VALUES (4, 'Windows NT4 Host', 'winnt.png');
INSERT INTO manage_device_type VALUES (5, 'Windows 9x Host', NULL);
INSERT INTO manage_device_type VALUES (6, 'Linux Host', 'linux.png');
INSERT INTO manage_device_type VALUES (7, 'Router', 'router.png');
INSERT INTO manage_device_type VALUES (8, 'Switch', 'switch.png');
INSERT INTO manage_device_type VALUES (9, 'Other', 'other.png');
CREATE TABLE manage_templates ( id MEDIUMINT(8) NOT NULL auto_increment, name TEXT, tcp_ports TEXT, PRIMARY KEY (id) );
INSERT INTO manage_templates VALUES (1, 'Mail Server (Basic)', '110;25');
INSERT INTO manage_templates VALUES (2, 'Mail Server (Enhanced)', '110;995;25;143;993;80;443');
INSERT INTO manage_templates VALUES (3, 'Switch/Router', '23');
INSERT INTO manage_templates VALUES (4, 'Web Server', '80;443');
INSERT INTO manage_templates VALUES (5, 'Windows 200x Domain Controler', '389');
INSERT INTO manage_templates VALUES (6, 'DNS Server', '53');
alter table manage_host add `group` MEDIUMINT(8) default '0';
CREATE TABLE manage_groups ( id MEDIUMINT(8) NOT NULL auto_increment, name TEXT, PRIMARY KEY (id) );
INSERT INTO manage_groups VALUES (1, 'Test');
CREATE TABLE manage_services ( id MEDIUMINT(8) NOT NULL, name TEXT, oid TEXT, statut TEXT );
CREATE TABLE manage_process ( id MEDIUMINT(8) NOT NULL, name TEXT, tag TEXT, statut TEXT );
ALTER TABLE `manage_alerts` ADD `oid` TEXT;
INSERT INTO settings VALUES ('manage_use_patch', '0');
INSERT INTO settings VALUES ('manage_send', '');
INSERT INTO settings VALUES ('manage_netsend_events', '5');
INSERT INTO settings VALUES ('manage_netsend_method', '1');
INSERT INTO settings VALUES ('manage_list', '0');
INSERT INTO settings VALUES ('manage_list_separator', '25');
INSERT INTO settings VALUES ('manage_full_separator', '6');
INSERT INTO settings VALUES ('manage_simple_separator', '12');
INSERT INTO settings VALUES ('manage_legend', 'on');
INSERT INTO settings VALUES ('manage_poller_hosts', '5');

Give the MANAGE plugin another try. Hopefully, this may help.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
wayno
Posts: 14
Joined: Tue Apr 10, 2007 5:59 pm
Location: Darwin, Australia

Post by wayno »

I'm still getting no response from the manage plugin. All my uptimes are 0d0h0m and all services are 'waiting' I have a cron job to run 'php check-manage.php' every 3 minutes and it appears successful when I run it manually but I get no results within Cacti. I've trawled through this site and can't find the answer. Am I missing something obvious?
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - CMD.php
Server Info - Linux 2.6.19-gentoo-r5-va
Web Server - Apache
PHP - 5.2.1-pl3-gentoo
PHP Extensions - libxml, xml, tokenizer, session, pcre, SimpleXML, SPL, sockets, SQLite, standard, Reflection, pgsql, mysql, mcrypt, mbstring, gd, dom, dba, date, ctype, zlib, openssl, apache2handler
MySQL - 5.0.34-log
RRDTool - 1.2.15
SNMP - 5.4
Plugins
  • Thresholds (thold - v0.3.2)
    Device Monitoring (monitor - v0.7)
    Host Info (hostinfo - v0.1)
    Network Discovery (discovery - v0.7)
    Update Checker (update - v0.3)
    PHP Network Managing (manage - v0.4)
    Uptime (uptime - v0.3)
    Network Tools (tools - v0.2)
    Device Tracking (mactrack - v0.0.1b)
Attachments
Result of check-manage.php ran manually.
Result of check-manage.php ran manually.
check-manage.jpg (51.24 KiB) Viewed 5922 times
The Manage tab within Cacti
The Manage tab within Cacti
manage.jpg (45.45 KiB) Viewed 5922 times
My Manage settings. note that I have tried with the Cacti poller and Manage poller but neither seems to work.
My Manage settings. note that I have tried with the Cacti poller and Manage poller but neither seems to work.
manage-settings.jpg (221.46 KiB) Viewed 5922 times
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

hmmm no.
Did not help. I still got the mysqlfetch error
and the error in the log.
But both try to access the process/services table.
but nothing there.
here is the error now.
there are two error per host. i just added one host now and the error looks like this.

Code: Select all

 04/19/2007 08:41:30 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "delete FROM `manage_process` where id='3' and LOWER(name) not in (SELECT LOWER(value) FROM data_template_data,data_local,data_input_data,snmp_query WHERE data_local.id=data_template_data.local_data_id and data_local.host_id='3' and data_input_data.data_template_data_id=data_template_data.id and snmp_query.id=data_input_data.data_input_field_id and snmp_query.name='SNMP - Running Processes')"
04/19/2007 08:41:30 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "delete FROM `manage_services` where id='3' and oid not in (select data_local.snmp_index from data_input_data, data_template_data, data_local, data_template where data_input_data.data_input_field_id=(SELECT distinct(data_input_fields.id) FROM data_input, data_input_fields where data_input.type_id = 6 and data_input_fields.data_input_id=data_input.id and data_input_fields.name='Index Value') and data_input_data.data_template_data_id=data_template_data.id and data_template_data.local_data_id=data_local.id and data_template_data.data_template_id=data_template.id and data_template.name='Win Services' and data_local.host_id=3)"
but both tables are empty.
??
dunno
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Wayno - Please have a look at http://forums.cacti.net/post-90249.html ... .php#90249


cpt_ahab - Please have a look at the SVN version (Manage 0.5) - if you get any problems with this one, let me know, and I'll post my working version to you.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
hramirez
Posts: 8
Joined: Mon Apr 16, 2007 2:39 pm

Post by hramirez »

Hi everyone,
I just downloaded .5 from SVN. I downloaded and installed the templates as the README instructed. Added the plugin, everything was looking ok until I selected a host to manage. I went to the 'Verify your tables' button and received the output below (attached). It appears I am missing some tables, I was going to run the sql script that came with the plugin, but I'm not sure which one to use. :oops:

Thanks :)
Attachments
Verify Tables Screenshot
Verify Tables Screenshot
Manage_5_VerifyTable.jpg (207.8 KiB) Viewed 5878 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

hramirez - You are missing the tables marked "NOK". Find these in the SQL files, and import them manually using phpMyAdmin. Once you've done this, debug the tables again. It should look like the below
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
hramirez
Posts: 8
Joined: Mon Apr 16, 2007 2:39 pm

Post by hramirez »

Thanks mcutting!

I did as you suggested, looked for the text within the sql files (I used WinGREP). No more bold red NOK's!

I do have another problem though. I had initially correlated this to the db issue so I was hoping it would resolve it, but it didn't. Please see the screenshot below. This started happening after I added a host to manage.

I restarted the IIS services with no success. I'm going to reboot the machine to see if that helps any (it is Windows after all)
Attachments
manage_ajax_error.jpg
manage_ajax_error.jpg (348.77 KiB) Viewed 5863 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

You get this error because you haven't defined any sites yet. Did you download the SVN version from cactiusers.org, or from the main CACTI site ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
hramirez
Posts: 8
Joined: Mon Apr 16, 2007 2:39 pm

Post by hramirez »

mcutting wrote:You get this error because you haven't defined any sites yet. Did you download the SVN version from cactiusers.org, or from the main CACTI site ?
Thanks for the quick response!

I downloaded it from SVN. I just added a site, and added a node to the site. Still the same issue.

Cheers!

Edited to add:

Its odd though, I was not receiving these messages initially after the installation before making any hosts 'managed'
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

If you click on the device you are managing, have you added it to a site, group, and defined the connection method (ICMP or SNMP forced) ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
hramirez
Posts: 8
Joined: Mon Apr 16, 2007 2:39 pm

Post by hramirez »

mcutting wrote:If you click on the device you are managing, have you added it to a site, group, and defined the connection method (ICMP or SNMP forced) ?
Site - Yes

Group - No

Connection Method - "No (use global settings)

I just now went to add a Group. Below is what I received.
Attachments
manage_group_creation.jpg
manage_group_creation.jpg (346.59 KiB) Viewed 5841 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

There have been several code changes on the SVN version of MANAGE, so the error you experience is possibly a result of this. I have uploaded my version here to get you started. Anyone else looking for a working solution should download this version for now until the SVN version is completed.

The version I have enclosed also includes patches from Gilles as well as TheWitness.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
hramirez
Posts: 8
Joined: Mon Apr 16, 2007 2:39 pm

Post by hramirez »

mcutting wrote:There have been several code changes on the SVN version of MANAGE, so the error you experience is possibly a result of this. I have uploaded my version here to get you started. Anyone else looking for a working solution should download this version for now until the SVN version is completed.

The version I have enclosed also includes patches from Gilles as well as TheWitness.
Potentially ignorant question here (sorry) ...where is the version you are referring to? Also, is it safe to say I should stay away from the SVN for now?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Yes, sorry about that. I zipped and rar'd the plugin, but I still can't get it below 1Mb (the max allowance for these types of file). We will need to check with the forum admins to see if we can get this limit temporarily increased.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests