Manage Plugin 0.6.2 for monitoring networks, servers...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

mcutting wrote:You should be able to get it from here

http://rpm.pbone.net/index.php3/stat/3/ ... .7.src.rpm
Yeah, except I needed this one

php-bcmath-5.1.6-3.el4s1.8.i386.rpm

That installed just fine.

Thanks for the help.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Ok, for the future people who work on this, here's what I did make it work under CactiEZ .3 with Cacti v .87a w/ Spine and PIA 1.4.

I compiled all the SQL statements from the plugin into one file. I then added Manage to my global.php and let it create whatever tables it does. After that I ran the Debug page from the settings and read down the SQL statements below and manually ran the missing pieces in phpMyAdmin until I got all OK's on the debug page.

This of course left bcmath to be installed. I ended up using this one:

http://rpm.pbone.net/index.php3/stat/4/ ... 6.rpm.html

Which installed just fine using rpm -i php-bcmath-5.1.6-3.el4s1.8.i386.rpm

Some files needed to be updated with global.php includes which are listed:

Code: Select all

manage_ajax.php:include_once("./include/global.php");
manage_check.php:include(dirname(__FILE__) . "/../../include/global.php");
manage_debug.php:include_once("./include/global.php");
manage.php:include_once("./include/global.php");
poller_manage.php:include(dirname(__FILE__) . "/../../include/global.php");
Couple more things:

1. The following line needs to be edited in manage_check.php:

include_once($config["base_path"] . "/plugins/thold/thold_functions.php");

it did read
include_once($config["base_path"] . "/plugins/thold/thold-functions.php");

2. chmod +x poller_manage.php needed to be done on my system to make the poller work right.


Code: Select all

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, 'LDAP Server - 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_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';
ALTER TABLE manage_host ADD `mail` TEXT;

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', '');
INSERT INTO settings VALUES ('manage_double_email', '');
INSERT INTO settings VALUES ('manage_date', '');
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Streaker69: Have you managed to get services and processes working with 0.5.1 ? The way snmp is handled in Cacti 0.8.7 has changed, so this plugin doesn't work properly anymore in terms of this.

Wanted to see if anyone else had done any work along these lines - I don't want to reinvent the wheel.

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

mcutting wrote:Streaker69: Have you managed to get services and processes working with 0.5.1 ? The way snmp is handled in Cacti 0.8.7 has changed, so this plugin doesn't work properly anymore in terms of this.

Wanted to see if anyone else had done any work along these lines - I don't want to reinvent the wheel.

Thanks
No I haven't because I don't use that particular function of Cacti. I never liked the way it created a different graph for each individual service. So I use my own scripts to monitor Windows Services.

If you like I can try it out and see if it does work. I wouldn't see why it wouldn't with all the other things in manage working.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

That would be good. Evidently, Manage 0.5.2 has been developed. I was approached by Gilles, who asked me to PM him. He was supposed to send me the code to test, but I haven't seen it yet..

Gilles - if you read this, I'm still waiting for the new code !
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

mcutting wrote:That would be good. Evidently, Manage 0.5.2 has been developed. I was approached by Gilles, who asked me to PM him. He was supposed to send me the code to test, but I haven't seen it yet..

Gilles - if you read this, I'm still waiting for the new code !
I second that. Gilles if you want me to test it as well, I'll do that. I've been in and out of your code so much, I'm actually starting to read french.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Ok, I've just checked out the WinServices portion with Manage 0.51 and it seems to work just fine.

I'd say if you follow my previous post in fixing all the errors it should just work out for you.

Now I can get back to making more custom graphics for the full view. I was making a version of Tux for each flavor of linux and improving some of the other graphics.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

streaker69 wrote:Ok, I've just checked out the WinServices portion with Manage 0.51 and it seems to work just fine.

I'd say if you follow my previous post in fixing all the errors it should just work out for you.

Now I can get back to making more custom graphics for the full view. I was making a version of Tux for each flavor of linux and improving some of the other graphics.
Unfortunately, this still does not work for me - even when calling MANAGE from the command line.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

mcutting wrote:
streaker69 wrote:Ok, I've just checked out the WinServices portion with Manage 0.51 and it seems to work just fine.

I'd say if you follow my previous post in fixing all the errors it should just work out for you.

Now I can get back to making more custom graphics for the full view. I was making a version of Tux for each flavor of linux and improving some of the other graphics.
Unfortunately, this still does not work for me - even when calling MANAGE from the command line.
Ok - have Windows Services working (uncommented $gg variable in manage_check.php). Still having an issue with the processes at the moment...
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

mcutting wrote:
mcutting wrote:
streaker69 wrote:Ok, I've just checked out the WinServices portion with Manage 0.51 and it seems to work just fine.

I'd say if you follow my previous post in fixing all the errors it should just work out for you.

Now I can get back to making more custom graphics for the full view. I was making a version of Tux for each flavor of linux and improving some of the other graphics.
Unfortunately, this still does not work for me - even when calling MANAGE from the command line.
Ok - have Windows Services working (uncommented $gg variable in manage_check.php). Still having an issue with the processes at the moment...
Took manage_check.php to bits, and repaired the broken SNMP calls. The result is the replacement file enclosed in this post.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Good work, I guess if it was needed. I didn't do anything like that. I just added a Win_services to one of my devices and it showed up just fine.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Got Windows Services working fine. For some unknown reason, the process part of manage gets dumped by a DELETE FROM statement in the script...
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

In order that manager 0.5.1 functions with Cacti Version - 0.8.7a & Plugin Architecture - 1.4

I had done the same changes as streaker69 http://forums.cacti.net/viewtopic.php?p=122441#122441

and the following changes TOO:

1/
line 1513 in manage_ajax.php

Code: Select all

        $pos=-1;
for correcting "Notice: Undefined variable: pos in D:\Programme\cacti-networkmonitoring\plugins\manage\manage_ajax.php on line 1519"

and
2/ in poller_manage.php line 23

Code: Select all

if (intval($nb_pollers)<=0) $nb_pollers=5;
for correcting Division by zero in D:\Programme\cacti-networkmonitoring\plugins\manage\poller_manage.php on line 35"
in case "concurrent Manage Pollers" is empty (default) or wrong.

3/ I have always the following error ind the windows(shell) started from poller_manage.php:
Warning: Missing argument 10 for cacti_snmp_get() in d:\programme\cacti-networkmonitoring\lib\snmp.php on line 39
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

3/ I have always the following error ind the windows(shell) started from poller_manage.php:
Warning: Missing argument 10 for cacti_snmp_get() in d:\programme\cacti-networkmonitoring\lib\snmp.php on line 39
The fix I posted in this forum rectifies the SNMP issue...
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Post by chrisgapske »

Hey guys thanks for the help but could you guys post the edited files please I am having issues after I edit them.

Thanks.
Chris.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests