Manage Plugin 0.6.2 for monitoring networks, servers...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Reinhard - Where did you download your tarball from ? Also, you need the TCP template from the forums for port monitoring to work.

I am monitoring ports, and this works fine. Do you see any errors when yoou click the Manage tab, or just a blank screen ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Giving up now. Will revert to 0.5.0
I removed the manage tables using the provided sql. But it leaves following items

Code: Select all

manage_double_email
manage_thold
I'd like to recommend deleting "Settings" by

Code: Select all

DELETE from settings where name like "manage%"
to get rid of all items.
Reinhard
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Reinhard - I think you get this error on the Manage tab because php short tags are disabled - could you confirm this in your setup ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

mcutting wrote:Reinhard - Where did you download your tarball from ? Also, you need the TCP template from the forums for port monitoring to work.

I am monitoring ports, and this works fine. Do you see any errors when yoou click the Manage tab, or just a blank screen ?
Thank you for your support. I downloaded the tarball from page 1 of this topic. It's an external link. What TCP template are you referring to? And when I clicked on the MANAGE tab (before my last post), I saw a perfect web page with the nice legend, but simply not a single host in there (find screenshot attached).
Reinhard
Attachments
Empty MANAGE tab
Empty MANAGE tab
manage_tab_is_empty.png (48.17 KiB) Viewed 6667 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

mcutting wrote:Reinhard - I think you get this error on the Manage tab because php short tags are disabled - could you confirm this in your setup ?
Found this in /etc/php.ini

Code: Select all

; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = On
So they are enabled.

Now I've checked error_log again. This time I've found

Code: Select all

[Sat May 19 20:45:26 2007] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function bcmod() in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 601
[Sat May 19 20:46:25 2007] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function bcmod() in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 601
[Sat May 19 20:51:40 2007] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function bcmod() in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 601
[Sat May 19 21:02:01 2007] [error] [client 127.0.0.1] PHP Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 349
[Sat May 19 21:02:01 2007] [error] [client 127.0.0.1] PHP Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 1578
[Sat May 19 21:02:01 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined offset:  1 in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 1595
[Sat May 19 21:02:01 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined offset:  0 in /var/www/html/workspace/cacti-plugins/plugins/manage/manage_ajax.php on line 1598
What the hell is bcmod()? Not a php extension (php-bcmod)?
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:It's not a PHP5 issue, he has some bcmath call's that were not compiled into this users version of PHP. BCMath is not that popular mainly because it is in the core of PHP now.

I'll take a quick look at his code, although I wanted to get it into the standard format, he's moving to quickly for me to keep up. Maybe it will settle down and I can spend another weekend on it.

TheWitness
Found this one concerning my bcmod issue.
Documentation at php web site says:
These functions are only available if PHP was configured with --enable-bcmath.
But unfortunately, I'm running

Code: Select all

php -v
PHP 5.1.6 (cli) (built: May  9 2007 11:47:50) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
and it does not work.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Back to table struggle. I just learned, that code in setup.php after

Code: Select all

if (($install == "full") || ($install == "upgrade-0.1") || ($install == "upgrade-0.2") || ($install == "upgrade-0.3") || ($install == "upgrade-0.4-2"))
was not executed. Table manage_sites was missing, so I ran the whole of it.
Reinhard
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Hi Reinhard. If you open the readme file that comes with MANAGE, you should find the link to the ports template.

I now recall the BCMath issue - I presume you have a *nix platform ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Wow, the table stuff seems to have fixed it (to a certain extend)!
I'm still struggeling with using the Device Manage Section, especially with assigning TCP Templates. Still, after assigning I don't see any list of ports.
Magically, the bcmod() stuff vanished. Don't ask me why. I clicked here and there, deleted some tables and recovered again.
Perhaps tomorrow, I will try a fresh install. Then I will first pay attention to table setup. I suppose, it is best to use the provided sql files instead of dynamically building up tables. The n I will check any code changes apart from table setup.
Now I' too tired to go on anymore
Reinhard
Attachments
My first MANAGEd host!<br />Hip, hip, hooray!
My first MANAGEd host!
Hip, hip, hooray!
first_item_ok.png (59.16 KiB) Viewed 6646 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

mcutting wrote:Hi Reinhard. If you open the readme file that comes with MANAGE, you should find the link to the ports template.
Thanks, I've found it here. But I'm a bit astonished. Because this template is of no use for me. I only need the ports.inc file of it. IMHO, it would be a good iea to ship it with manage. And IMHO, it should reside under the manage plugin directory (even there is a duplicate for users that use the Template in question).
I now recall the BCMath issue - I presume you have a *nix platform ?
Yes.
Thank you for your attention
Reinhard
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

gandalf wrote:It searches for a file named ports.inc in the scripts directory. There's no such file within the distributed tarball of MANAGE. And I found no hint on how to define such a file. Nor do I know, whether this file is mandatory and what it servers for. Sure, it seems to define sth. for TCP Ports, but what exactly?
this plugin "unify" the output produced by 3 templates : Windows Services Template, windows Process Template and TCP port template
you must install these templates

it's in the readme file

PS : i would like to create a "linux process template" but i don't have the time, even if i have the oids
Last edited by gilles on Sun May 20, 2007 3:06 pm, edited 1 time in total.
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

gandalf wrote:Then "Force ping ...", save, ok
well, bad choice ... ping is currently experimental
choose a snmp host
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

gandalf wrote:it would be a good iea to ship it with manage.
at the start, it was
separate it from the plugin give users with only cacti and without plugin architecture the ability to use it, i think it's good
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

gilles wrote:this plugin "unify" the output produced by 3 templates : Windows Services Template, windows Process Template and TCP port template
you must install these templates
Do I have to install the complete Template even if I only want to use manage on non-Windows boxes? Is the TCP port Template the only one needed for Linux? Do I need the whole Template? Must I apply the Template to some hosts to be able to use manage?
My current approach was to use MANAGE for downed host alerting only (sorry), as thold won't work when using cactid as a poller. So what I'm after is sth like a minimal configuration to get this up and running.
it's in the readme file
Yes, I've read it at the very beginning. To be honest, I did not understand why a plugin would require a Template. Now I downloaded the ports.inc file to the ./scripts directory. But I still do not understand for which feature this file is needed.
PS : i would like to create a "linux process template" but i don't have the time, even if i have the oids
I discussed this lately. IMHO, it should be an SNMP based Data Query. While I suppsoe I would be able to implement such a Data Query, I honestly do not know what your plugin requires as an interface.
Reinhard
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Service checking IMHO should be more complex than syning a port. You should have a table called: "manage_services". This table would contain the following:

table manage_services
service_id
service_name
service_protocol (TCP/UDP)
service_port
connect_string
connect_response
test_string
test_response

The test string may require tags, as some services require a user/id password or some other device specific connection parameters in order to obtain a response.

Therefire, each devices services to be tested would be able to alter these settings:

table manage_device_service_tests
device_id
service_id
credentials
timeout
retries

Or something that resembles this.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests