Manage Plugin 0.6.2 for monitoring networks, servers...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

Is what you typed in there the exact syntax.... thats a lot of typing... :(
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Yes - it was from a post of the same nature a couple of weeks back.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

it is a lot of typing, but it works. i did this a couple weeks ago, when i was having problems, and once i did this, it started working. You can cut and past into MySQL though. That is how i did it. I actually broke it up into chunks. I did the drops first, then the adds.

it goes pretty quick

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

Cool, will do guys, thanks for the help, I'll let you know what happens.
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

Unfortunatly, that didn't help anything, now I am just missing another table, the mange_poller_output table is gone now too...hmm. Should I drop all the tables and start over?
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

I would drop all tables that start with the word Manage, and then re-create them with the lines of code that MCutting posted. If that still isnt working for you, look a little farther back in this thread, and you should see his posting to me. That is the one that worked for me, maybe we missed a line of code in the copying.

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting wrote: + service print spooler , was down
executing : -c:/wamp/php/php.exe -q c:/wamp/www/cacti/scripts/win_services.php hostname.domain.co.uk <snmp_community> 2 41 get servstate 13.80.114.105.110.116.32.83.112.111.111.108.101.114-

result is : -0-
-> no change
from cli, does this output a "1" :

Code: Select all

c:/wamp/php/php.exe -q c:/wamp/www/cacti/scripts/win_services.php hostname.domain.co.uk <snmp_community> 2 41 get servstate 13.80.114.105.110.116.32.83.112.111.111.108.101.114
can you do a phpinfo() and send me the output

can you confirm me that hostname.domain.co.uk is NOT the local cacti server ?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Gilles,

The output is "1" if the php script is run as cli from the command line. Device "hostname.domain.co.uk" is not the local cacti server - it's a remote server. I changed the hostname and domain name in these posts for security reasons.

I'll post the output of phpinfo() when later this evening. I noticed that the poller output when using snmp has a "-" after the OID's - is this correct ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

Looking back at the posts, everything seems to be working pretty good except I can't add hosts to the manage tab, I get this error when I try to add one of my switches:

04/26/2007 10:27:13 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO manage_host VALUES ('3', NULL , '7', '', 'nopoll' , '9', '2', '0', '1', '' )"

I also changed out the Manage_groups.php file that you posted. That didn't seem to help??

oh yeah, and I am also still missing the table:

Champ 'mail' from table 'manage_host' : NOK (0.5)

Thanks!
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Dacob,

Look in the sql directory of the manage 0.5.1 plugin. There should be an upgrade from 0.4.2 to 0.5.x. Insert this code as an sql statement into the cacti database using phpmyadmin, and you should hopefully be good to go.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

Not to sound dumb, but how do I do what you just told me to do... :oops:
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting, can you use this code in function exec_background and give me the output ?

Code: Select all

global $config;
print "\n executing : -".$filename . " " . $args."-\n";	
$output=system($filename . " " . $args, $tmp_output);
print "\n result is : -".$output."-\n";
return $output;
i think there is a problem with the exec function, maybe it's disable or you are in safe mode ?

i have time, what's your wamp version ?

EDIT : wamp5_1.7.0 work

can you execute these 2 files ?

Code: Select all

php.exe 2.php

Code: Select all

php.exe 1.php
give me the output for each of them
Attachments
1.php.txt
(387 Bytes) Downloaded 105 times
2.php.txt
(29 Bytes) Downloaded 112 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Hi Gilles - results as requested

Code: Select all

php.exe 2.php
Result = 1

Code: Select all

php.exe 1.php
Result = executing : -c:/wamp/php/php.exe -q c:/wamp/www/2.php -result is : -1-

These php files were executed with

Code: Select all

global $config; 
print "\n executing : -".$filename . " " . $args."-\n";    
$output=system($filename . " " . $args, $tmp_output); 
print "\n result is : -".$output."-\n"; 
return $output;
Added into manage_check.php

Let me know if you need anything else.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting wrote: Result = executing : -c:/wamp/php/php.exe -q c:/wamp/www/2.php -result is : -1-
is this really the exact output, because there is a space between "...2.php" and "-" ?

use the provided php files and don't modify them
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

gilles wrote:
mcutting wrote: Result = executing : -c:/wamp/php/php.exe -q c:/wamp/www/2.php -result is : -1-
is this really the exact output, because there is a space between "...2.php" and "-" ?

use the provided php files and don't modify them
Gilles - this is the output:


executing : -c:/wamp/php/php.exe -q c:/wamp/www/2.php-

result is : -1-


I didn't modify anything - I just used the files you provided. Looks like the forum may have wrapped some text.

My version of WAMP is 5.1.6.6 - I went for this version, as there are reported problems when using PHP 5.2.1.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests