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 »

gilles wrote:
streaker69 wrote:
mcutting wrote:Yes, which makes it inaccurate, which I have noticed before.
FOUND IT!

Read the info on the first image, then make the change from the second image. The wrong OID is being called resulting in the incorrect values for Windows boxes.
i think NO don't touch that.
just look down in the code you post, there is the correct oid (MIB II).

if you launch manage from command line and it's outputting it use MIB, i think you have a problem.
to use MIB II, which is more accurate, use options (see my precedent post).


if you could confirm that...
I don't think that it's 'My' problem, as others have seen the same thing. Since I've made the change, I no longer receive false up/down events from my Windows Boxes, the upTime is accurate instead of running away as it had been before. Previously in this thread I posted where I had rebooted several devices (Windows, Linux, Switches & Routers) all at the same times, and the Windows Boxes were the ones that were running away with the incorrect time.

To me, it seems to be more accurate and reliable than using the hrSystemUptime. I'd say, people are free to make the change or not based upon what they're seeing on their own systems. I just know what I found in my own results.
[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 »

Unfortunateky not the case for me. Even with Streaker69's fix, I still get loads of "Maybe false alerts". I also rebooted a server the other day, and Manage reported it having an uptime of 384 days.

Not bad for a server that had it's last reboot 4 months ago !!
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:Unfortunateky not the case for me. Even with Streaker69's fix, I still get loads of "Maybe false alerts". I also rebooted a server the other day, and Manage reported it having an uptime of 384 days.

Not bad for a server that had it's last reboot 4 months ago !!
In all honesty, I have not had any issues since I made those changes, I'm wondering what the best route is to take to try and figure this out. I've just doublechecked my windows boxen and they're all accurate including a server that I rebooted today. I have no explanation for it I just know that it's working for me.
[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
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

ok streaker, i inverted MIB and MIB II in my post
HOST-MIB is the correct thing you must use

do you know you can choose between MIB and MIB II in options ?
you can check that from command line by tracking MIB or MIB II messages (MIB=system uptime, MIB II=snmp agent)

no need to touch the code, use checkbox from options and you will use the old method if you want

as staded by the whitness in the uptime plugin thread, snmp agents can have problems (MIB II)
patch as been provided by howie and include in plugin manage, with the ability to choose from options

in manage 0.6, if option "system uptime" is in use, a test to check the avaibility of HOST-MIB is performed
so if HOST-MIB is present, HOST-MIB will be used (this is memorized in table manage_uptime_method)
if option "snmp agent" is in use, only MIB II will be used

i have re-checked on windows 2003 server SP2 yesterday, no reboot mail when i use MIB and i re-start snmp server

problem found : when a reboot is detected and uptime was > at 4285440000 (497 days), you may receive a "maybe false alert" when device is rebooted
this message must be desactivated when using MIB since there is no problem here

in manage_check.php :

old code :

Code: Select all

			$h2=$h;
			if ($ou > 4285440000) {
				$h='Maybe false alert - Reboot';
			}
new code :

Code: Select all

			$h2=$h;
         	$force_host_mib=db_fetch_cell("select value from settings where name='manage_uptime_method'");
			$host_mib=db_fetch_cell("select data from manage_uptime_method where id='".$id."'");
			if ( ( ($force_host_mib == "on") && ($host_mib == "0") ) || ($force_host_mib != "on") ) {
			  if ( ($ou > 4285440000) && ($ou < 4320000000) ) {
				$h='Maybe false alert - Reboot';
			  }			
			}
Last edited by gilles on Wed Sep 10, 2008 11:23 am, edited 3 times in total.
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting wrote:Unfortunateky not the case for me. Even with Streaker69's fix, I still get loads of "Maybe false alerts". I also rebooted a server the other day, and Manage reported it having an uptime of 384 days.

Not bad for a server that had it's last reboot 4 months ago !!
what was uptime in manage before and after the reboot ?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Gilles,

I have "Check system uptime" ticked, and I still get the "Maybe false alert" message from my servers.

What needs to be changed here ?
$h2=$h;
if ( ($ou > 4285440000) && ($ou < 4320000000) && ($force_host_mib != "on") ) {
$h='Maybe false alert - Reboot';
}
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 »

gilles wrote: do you know you can choose between MIB and MIB II in options ?
you can check that from command line by tracking MIB or MIB II messages (MIB=system uptime, MIB II=snmp agent)
No, I didn't realize that's what that checkbox did.
i have re-checked on windows 2003 server SP2 yesterday, no reboot mail when i use MIB and i re-start snmp server

problem found : when a reboot is detected and uptime was > at 4285440000 (497 days), you may receive a "maybe false alert" when device is rebooted
this message must be desactivated when using MIB since there is no problem here

Code: Select all

			$h2=$h;
			if ( ($ou > 4285440000) && ($ou < 4320000000) && ($force_host_mib != "on") ) {
				$h='Maybe false alert - Reboot';
			}
So that's what was causing the false reboot alerts when using MIB II on Windows machines and the counter would roll over?
[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
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting, streaker,
i have posted a corrected code
if you can test and tell me, thanks
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Where's the code ?
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:Where's the code ?
Ignore this - found it !
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcgee
Posts: 3
Joined: Wed Sep 10, 2008 9:46 pm

Post by mcgee »

Error Log:
CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT count(id) FROM data_local where data_template_id = AND snmp_index = 80 AND host_id =17"
Use version: 0.6
"TCP Ports Template" Save invalid,Show or"none"
Please help me, thank you.
Mcgee.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

mcgee wrote:Error Log:
CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT count(id) FROM data_local where data_template_id = AND snmp_index = 80 AND host_id =17"
Use version: 0.6
"TCP Ports Template" Save invalid,Show or"none"
Please help me, thank you.
Mcgee.
Did you click on the Debug link on the Settings Page for Manage? It will verify that you have all the database tables created properly.
[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
mcgee
Posts: 3
Joined: Wed Sep 10, 2008 9:46 pm

Post by mcgee »

streaker69 wrote:
mcgee wrote:Error Log:
CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT count(id) FROM data_local where data_template_id = AND snmp_index = 80 AND host_id =17"
Use version: 0.6
"TCP Ports Template" Save invalid,Show or"none"
Please help me, thank you.
Mcgee.
Did you click on the Debug link on the Settings Page for Manage? It will verify that you have all the database tables created properly.
Please help me analysis, I have not found the problem.
Attachments
manage_debug.txt
(3.22 KiB) Downloaded 239 times
igorx
Posts: 7
Joined: Sun Sep 14, 2008 4:14 am
Location: Russia

Problem with refresh any pages with installed manage plugin

Post by igorx »

When plugin not installed or disabled, i see, for example, in 'graphs' tab html head of page:

Code: Select all

<html>
<head>
	<title>Cacti</title>
	<meta http-equiv=refresh content='600'>
	<link href="/cacti/include/main.css" rel="stylesheet">
	<link href="/cacti/images/favicon.ico" rel="shortcut icon"/>
	<script type="text/javascript" src="/cacti/include/layout.js"></script>
	<script type="text/javascript" src="/cacti/include/treeview/ua.js"></script>
when plugin is enabled, the "refresh" tag is wrong in ANY graph!

Code: Select all

<html>
<head>
	<title>Cacti</title>
	<meta http-equiv=refresh content=''>
	<link href="/cacti/include/main.css" rel="stylesheet">
	<link href="/cacti/images/favicon.ico" rel="shortcut icon"/>
	<script type="text/javascript" src="/cacti/include/layout.js"></script>
	<script type="text/javascript" src="/cacti/include/treeview/ua.js"></script>
<meta http-equiv=refresh content=''>

Please, correct this error.
idle
Cacti User
Posts: 77
Joined: Wed May 26, 2004 10:49 am
Location: Barcelona
Contact:

Post by idle »

Hi.
I'm trying to install Manage, with no luck.
I follow usual install procedure without any result, no changes, no errors, no new sql tables.
Other plugins installing ok.

What maybe wrong?

Cacti 0.8.7b
PA 2.1
Manage 0.6
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests