Manage Plugin 0.6.2 for monitoring networks, servers...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

IE6 Compatability

Post by pthaynes »

Thanks for the excellent plugin.

I am using manage plugin version 0.6.1. I have noticed that when any of my users with IE6 click on the + next to an item in the tree view they get a script error and the tree doesn't expand out. Under IE7 it all works fine. While I believe they should just upgrade to IE7 (I mean IE8 is out for goodness sake) they aren't so convinced. When they click on the "show details" for the script error the details they get are:
Line: 112
Char: 3
Error: 'style' is null or not an object
Code: 0
URL: http://10.0.0.1/plugins/manage/manage.p ... forceids=0

Has anyone else come across this problem (or have a hint at where I should start looking?

Thanks,

Peter
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Number of lines in notes in Manage

Post by pthaynes »

Thanks for the excellent plugin.

I noticed that only the first two lines of my notes field were showing when right-clicking on the status icon next to my hosts. Looking at the code there is a line in manage_ajax.php that says

Code: Select all

if ($note_counter < 2) {
This seems to be the line that limits the number of lines of notes. Since the notes fields on my hosts contain about 10 lines I have increased that number. Is there any reason (other than readability) for limiting the number of lines to 2? If there isn't could I add a feature request to get a configuration option to set the maximum number of lines of notes shown in that location.

Peter
Last edited by pthaynes on Sun Jul 19, 2009 6:30 pm, edited 1 time in total.
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Rights to display the notes field in the manage plugin

Post by pthaynes »

I have given a number of my users the "Use PHP Network Managing" right in the Realm Permissions. I noticed that when some of them right-clicked on a failing device they did not get the notes field. After some investigation I found that the users required the "Update Data Sources" realm permission to see the notes when right-clicking a host.

Operationally we use the Manage plugin so that relatively non-technical people can see which devices in the network are unavailable or have issues. They can then right-click on the failing device and read the notes for simple instructions on some initial troubleshooting, or who to call to get it fixed. We would rather not give them the access to change or delete Data Sources (it's not that we don't trust them, but if they don't have access they can't break anything).

In order to get around this rights issue I have removed the "if" statement at about line 1762 in the manage_ajax.php as below:

Code: Select all

  $permit = db_fetch_cell("SELECT count(*) FROM user_auth_realm WHERE user_id ='".$user_id."' AND realm_id='3'");
//  Removed so that the notes field would appear for the guest user
//  if ($permit == 1) {
    $new_note="";
        $note2 = str_replace("\n", "<br>", $note);
        $note2 = str_replace("\r", "", $note2);
    $note_lines = explode("<br>", $note2);
        $note_counter=0;
    foreach ($note_lines as $note_line) {
          if ($note_counter < 50) {
            if ($note_counter == 0) {
              $new_note .= $note_line."<br>";
                } else {
                  $new_note .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$note_line."<br>";
                }
          }
          $note_counter++;
        }
    $tmp .= "<br>Notes: ".$new_note;
//  Removed so that the notes field would appear for the guest user
//  }
As a feature request would it be possible to get either a tick box on each user in the "Realm Permissions" page added that allows viewing notes OR a tick box in the Manage plugin settings to allow or dis-allow viewing the notes field?

On a similar note it would be nice to get a link added in the box shown when you right-click for documentation. Initially when we were looking at this solution we were considering adding a link so that support personnel could go to a documentation page with a troubleshooting flow chart and other pertinent information. Ideally there should be similar permissions over that link to what the notes field would have.

Thanks again for your excellent work on the Manage plugin. It is one of the big reasons for Cacti being successful in our environment.

Regards,

Peter
a2287884
Posts: 10
Joined: Thu Jun 11, 2009 4:03 am
Contact:

NO DATABASE FATAL ERROR

Post by a2287884 »

WHILE UNINSTALLING
IT DISPLAYS THE PAGE WITH "FATAL: Database or Table does not exist"

PLUGIN IS NOT WORKING

PLEASE SUGGEST THE WAY TO REPAIR IT
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Re: NO DATABASE FATAL ERROR

Post by pthaynes »

a2287884 wrote:WHILE UNINSTALLING
IT DISPLAYS THE PAGE WITH "FATAL: Database or Table does not exist"

PLUGIN IS NOT WORKING

PLEASE SUGGEST THE WAY TO REPAIR IT
I am guessing that you are using Cacti on Linux. You may need to check the owner of the plugins/manage directory. It should be the same as each of the other plugins. In my case using the chown -R apache:apache solved the problem. It is also possible that the table genuinely doesn't exist or that you didn't install the plugin correctly. Please give some more information on how you installed the plugin and what you mean by
PLUGIN IS NOT WORKING
Please turn off your CAPS LOCK before posting. Posting in all capitals will make everyone less likely to respond.

Hope this helps.

Peter
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Add in a link to the graphs on the "right-click" s

Post by pthaynes »

I thought it would be handy to have a link to the graphs on the screen you get when you right click the status icon for the host. In tree view this saves you from having to click on the host name and then click on the host name again in list view. After this code in the manage_ajax.php:

Code: Select all

if ($permit == 1) {
  $tmp .= "<a href=" . $config["url_path"] . "plugins/manage/manage_viewalerts.php?edit=1&id=" . $id . ">Device Managing -> Event Reporting</a><br>";
}
Add in this code:

Code: Select all

$tmp .= "<a href=" . $config["url_path"] . "graph_view.php?action=preview&host_id=" . $id . "&&graph_template_id=0&filter=>Graphs</a><br>";
There will now be a link marked graphs that will take you to the graphs page for that host.

Regards,
Peter
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Musql Error in MAnage Vie

Post by zoemu »

Hi

I have installed manage0.61, and for most part is working fine, except for this error in some of the manage views. I did install the database scripts from the original zip file...now, has been any updates since... or bug updates that I might be missing ?/

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in G:\cacti\plugins\manage\manage_ajax.php on line 1696
Thanks
mercolino
Posts: 25
Joined: Wed Aug 29, 2007 6:14 pm

installation over 0.8.7 e

Post by mercolino »

Someone have installed this plugin on a 0.8.7 e version?, I tried to install it, but then i can uninstall it again because an Error saying that It can't find a Database or Table, it is not a problem of permission or ownership of the directory, just some tables doesn't exist...

Someone have the same problem?

Greetings...
LukeSharpe
Posts: 2
Joined: Wed Sep 09, 2009 12:31 pm

Re: installation over 0.8.7 e

Post by LukeSharpe »

mercolino wrote:Someone have installed this plugin on a 0.8.7 e version?, I tried to install it, but then i can uninstall it again because an Error saying that It can't find a Database or Table, it is not a problem of permission or ownership of the directory, just some tables doesn't exist...

Someone have the same problem?

Greetings...
I'm running the same version on windows and get the same problem. Did you get a resolution?
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Musql Error in MAnage Vie

Post by zoemu »

zoemu wrote:Hi

I have installed manage0.61, and for most part is working fine, except for this error in some of the manage views. I did install the database scripts from the original zip file...now, has been any updates since... or bug updates that I might be missing ?/

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in G:\cacti\plugins\manage\manage_ajax.php on line 1696
Thanks
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Musql Error in MAnage Vie

Post by zoemu »

zoemu wrote:Hi

I have installed manage0.61, and for most part is working fine, except for this error in some of the manage views. I did install the database scripts from the original zip file...now, has been any updates since... or bug updates that I might be missing ?/

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in G:\cacti\plugins\manage\manage_ajax.php on line 1696
Thanks
Anyone on This yet ????

Thanks
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Re: Musql Error in MAnage Vie

Post by pthaynes »

zoemu wrote:
zoemu wrote:Hi

I have installed manage0.61, and for most part is working fine, except for this error in some of the manage views. I did install the database scripts from the original zip file...now, has been any updates since... or bug updates that I might be missing ?/

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in G:\cacti\plugins\manage\manage_ajax.php on line 1696
Thanks
Anyone on This yet ????

Thanks
Zoemu - I'm not really sure, but you may want to take a look and verify that the thold plugin is installed and working correctly. Manage relies on it for some things (like changing the text for the host name when a threshold is breached).

Hope this helps,
Peter
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

windows service stats error :

I get the following on 0.8.7e

[root@cacticentos ~]# php /var/www/cacti/scripts/win_services.php win_services hostname.domainname 2:161:500:public:::::: get servstate .84.67.83.82.86
PHP Notice: Undefined offset: 1 in /var/www/cacti/scripts/win_services.php on line 24
PHP Notice: Undefined offset: 2 in /var/www/cacti/scripts/win_services.php on line 25
PHP Notice: Undefined offset: 3 in /var/www/cacti/scripts/win_services.php on line 43
ERROR: Invalid Parameters

I posted it in the original thread too, but seeing as most people that use manage have got this working, i'm wondering if someone can show me the right way to fix this ?

Updated original thread, with the fixes that were already in the original thread..... :oops:
Last edited by JorisFRST on Tue Oct 13, 2009 9:30 am, edited 1 time in total.
peecee
Cacti User
Posts: 146
Joined: Tue Feb 26, 2008 7:26 am

Post by peecee »

Great plugin. Can the original author post it to the "official" known plugins list via:

http://docs.cacti.net/userplugin:manage

I'd be happy to do it an help with any other requests for additional development of the plugin...

This is a pretty nice plugin, but it took me a while to determine the difference between this and some of the other plugins that perform similar functions. Having to do searches in the forums all the time is a bit frustrating.
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

I got a problem with processes,

in the datasource I use the runparameters as the index Value.

(vmware processes, otherwise it's just the same process name 4 times, and you never know wich instance you're graphing)

I'm a right that the manage plugin uses the index value to find if the process is up or down ? That would explain my problem, seeing it will not be the right index value for the index type requested.

If this is the case, can we set the index type per host in manage ? or could this be a future request ?
Attachments
Screen Shot
Screen Shot
sized_datasource process vmware.JPG (89.78 KiB) Viewed 11195 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests