Confused with plugins

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
kubstix
Posts: 26
Joined: Tue May 01, 2007 7:58 am

Confused with plugins

Post by kubstix »

I have just become confused about plugins. So which is the plugin that can send me an email if a server/switch goes down? Is it the monitor plugin, manage, or thold?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Kubstix - all of these plugins can send mail when something goes down. However, MONITOR needs THOLD to be able to send mail, and won't work properly on it's own.

I have been informed by Gilles (MANAGE author) that THOLD is not required for this plugin to send email. However, I do not see any settings that confirm this. I am using all three plugins in my build.

Hope this clarifies things a bit.
Last edited by mcutting on Fri Jun 08, 2007 7:31 am, edited 1 time in total.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
kubstix
Posts: 26
Joined: Tue May 01, 2007 7:58 am

Post by kubstix »

mcutting, it does. You do a good job on explaining things on this forum. Can you answer a few more questions I have please? So if I use monitor/thold to watch servers/switches..........should I be looking for a script to monitor up/down objects? Or does monitor ping the hosts when the task is ran? Thank You.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Kubstix - The MONITOR plugin checks for SNMP connectivity, so if it doesn't respond (default of around 400ms), then it is considered as down. An entry is made in the logs, and provided you've setup THOLD with a working mail config, then you will get an alert warning you of this.

MANAGE works in pretty much the same way. However, this plugin is more advanced, and can monitor ports, services, processes etc. As I mentioned earlier, I use all three in my productive environment, and they work well together.

If you use a combination of THOLD and MONITOR (you'll need both if you want alerting), then you won't need any scripts if you simply want to be alerted when a device is unavailable - CACTI uses (default) SNMP pings to determine if a host is up or down. If you have slow links, you may want to increase the timeout to avoid rogue alerts.

The MONITOR plugin has a fast poller, which is basically a stripped down version of poller.php. You can run this every minute if you want a faster check than the standard 5 minutes. This is also possible with the MANAGE plugin. The options give you the choice between the cacti poller, which runs with the main data collection, or an additional CRON or Windows Task that can run every minute if necessary.

Another plugin you may want to take a look at is Gilles' UPTIME monitor. I run this also, and it will use THOLD to send an alert when a device gets rebooted.

If you want to use MONITOR, download it from this link

http://cactiusers.org/forums/viewtopic.php?p=3479#3479

This version has better facilities, and is easier to manage. As for THOLD, get it from http://cactiusers.org/downloads/thold.tar.gz. This utilises a faster method of checking thresholds from the poller table, rather than the RRD's themselves, and is much faster.

Hope this is of some use.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
kubstix
Posts: 26
Joined: Tue May 01, 2007 7:58 am

Post by kubstix »

Thank You, I just tested the monitor+thold plugin and it did in fact alert me when I rebooted a test server, so thanks for helping there. I will also have to check Gilles (Uptime Monitor) as well. I seem to be having a hell of a time getting manage to work. I import the plugin and then getting nothing but SQL errors when trying to configure. Im still a beginner at Cacti, I don't know if Ill be ready for manage yet.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Kubstix - MANAGE is not an easy plugin to get working. However, I will try and help.

First, locate config.php (cacti\include directory), and disable the plugin MANAGE by inserting two "//" before the plugin entry, as shown below

//$plugins[] = 'manage';

Now save the file - this will prevent MANAGE from loading.

From phpmyadmin (hopefully, you have this installed) or an equivalent product, choose the database of CACTI, and execute the below SQL statement

ALTER TABLE `host` DROP `manage`;

DROP TABLE `manage_host`;
DROP TABLE `manage_method`;
DROP TABLE `manage_alerts`;
DROP TABLE `manage_tcp`;
DROP TABLE `manage_device_type`;
DROP TABLE `manage_templates`;
DROP TABLE `manage_groups`;
DROP TABLE `manage_services`;
DROP TABLE `manage_process`;
DROP TABLE `manage_poller_output`;
DROP TABLE `manage_sites`;

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_2';
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';
DELETE FROM `settings` WHERE `name` = 'manage_cycle_delay';
DELETE FROM `settings` WHERE `name` = 'manage_cycle_refresh';
DELETE FROM `settings` WHERE `name` = 'manage_poller_plus';
DELETE FROM `settings` WHERE `name` = 'manage_perl';
DELETE FROM `settings` WHERE `name` = 'manage_order1';
DELETE FROM `settings` WHERE `name` = 'manage_order2';
DELETE FROM `settings` WHERE `name` = 'manage_order3';
DELETE FROM `settings` WHERE `name` = 'manage_order4';
DELETE FROM `settings` WHERE `name` = 'manage_order5';
DELETE FROM `settings` WHERE `name` = 'manage_theme';
DELETE FROM `settings` WHERE `name` = 'manage_sound';
DELETE FROM `settings` WHERE `name` = 'manage_global_email';
DELETE FROM `settings` WHERE `name` = 'manage_thol';


Now from the same CACTI database, execute the the below

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');
CREATE TABLE manage_poller_output (local_data_id mediumint(8), output text);
CREATE TABLE manage_sites ( id MEDIUMINT(8) NOT NULL auto_increment, name TEXT, PRIMARY KEY (id) );
ALTER TABLE manage_host_services RENAME manage_tcp;
ALTER TABLE manage_groups ADD site_id MEDIUMINT NOT NULL;
ALTER TABLE manage_host ADD `thresold` MEDIUMINT(8) unsigned NOT NULL default '0';
ALTER TABLE manage_host ADD `thresold_ref` MEDIUMINT(8) unsigned NOT NULL default '1';
INSERT INTO settings VALUES ('manage_cycle_delay', '30');
INSERT INTO settings VALUES ('manage_cycle_refresh', '5');
INSERT INTO settings VALUES ('manage_poller_plus', '0');
INSERT INTO settings VALUES ('manage_thold', '1');
INSERT INTO settings VALUES ('manage_order1', '1');
INSERT INTO settings VALUES ('manage_order2', '2');
INSERT INTO settings VALUES ('manage_order3', '3');
INSERT INTO settings VALUES ('manage_order4', '0');
INSERT INTO settings VALUES ('manage_order5', '0');
INSERT INTO settings VALUES ('manage_list_2', '2');
INSERT INTO settings VALUES ('manage_theme', 'default');
INSERT INTO settings VALUES ('manage_sound', '0');
INSERT INTO settings VALUES ('manage_global_email', '');


Now go back to config.php, and remove the "//" from the plugin config lines, so it looks like this

$plugins[] = 'manage';

Save the config.php file.

Launch CACTI again, and see if MANAGE works this time.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
kubstix
Posts: 26
Joined: Tue May 01, 2007 7:58 am

Post by kubstix »

mcutting I will try this when I get back to work next week. I appreciate your help in everything, you have helped me quite a bit here. Thanks again.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests