Manage Plugin 0.6.2 for monitoring networks, servers...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting,
now in 1.php, replace

Code: Select all

$extra_args = "-q c:/wamp/www/2.php";
with this

Code: Select all

$extra_args = "-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";
modify "hostname.domain.co.uk" and "<snmp_community>" and give me the output, please

Code: Select all

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

Post by mcutting »

I get an error from this:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\1.php on line 7

This is pasting the text exactly as it was, then modifying the hostname.domain.co.uk and <snmp_community> sections.
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 »

verify, i have edited my last post
sorry
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Hi Gilles,

Output below (hostname, domain, snmp community string removed for privacy)


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 : -1-

PS - I just upgraded to WAMP 5_1.7.0, and used the unchanged manage_check.php script for snmp, but it doesn't seem to make any difference
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 »

mcutting wrote: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.
I don't want to be a bother in the middle of your guys conversation, but how do I do this? 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,

You need to have phpmyadmin installed, or a similar product. based on phpmyadmin

1. Select the database that you want to import the new tables into
2. Click on the SQL tab (shown on the right side of the window)
3. Paste the contents into the SQL query field (the contents being the upgrade to 0.5.x.sql file)
4. Click GO

That should be it
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 »

Ok, thanks a bunch, I'll get that installed and give it a try. 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)
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

ok, so I am definatly new... I downloaded phpmyadmin, got it extracted, but how do I use/install it??
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
Dave96
Posts: 13
Joined: Sat Jan 21, 2006 7:52 pm

Post by Dave96 »

Anyone have any idea why this is happening? I reinstalled close to 5 times already and this always happens.
Attachments
manage2_122.jpg
manage2_122.jpg (22.47 KiB) Viewed 4456 times
benton2006
Cacti User
Posts: 50
Joined: Sun Apr 01, 2007 12:47 am

Post by benton2006 »

It's a great plugin . But I can't download by gilles' link .Anyone can help me ?? Thanks a lot
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

Dacob9906 wrote:ok, so I am definatly new... I downloaded phpmyadmin, got it extracted, but how do I use/install it??
is the folder in your document root...?
there should also be an INSTALL or README file in the folder.
just follow the instructions. its pretty easy..

greez
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

mcutting,
we're going to hardcode
can you modify the function

Code: Select all

exec_background
in

Code: Select all

manage_check.php
with this :

Code: Select all

global $config;
exec("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", $output);
print "\n-".$output[0]."-\n";
return $output[0];
what is the output ?

Code: Select all

php manage_check.php snmp 41
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Hi Gilles,

Output below - seems to work if it's hard coded

C:\wamp\www\Cacti\plugins\manage>php manage_check.php snmp 41
id : 41 , statut was : prob , method : 0 , result : 186872592
Host : hostname.domain.co.uk (hostname), old uptime is : 186864976, new is : 1868725
92
+ mail or netsend demande : mcutting@domain.co.uk
+ OK up
Sending files is no longer supported.

More help is available by typing NET HELPMSG 3777.

+ service gfi languard s.e.l.m. 5.0 alerter agent service , was down
-1-
-> change
+ mail or netsend demande : mcutting@domain.co.uk
+ OK up
The message alias could not be found on the network.

More help is available by typing NET HELPMSG 2273.

+ service gfi languard s.e.l.m. 5.0 archiver agent service , was down
-1-
-> change
+ mail or netsend demande : mcutting@domain.co.uk
+ OK up
The message alias could not be found on the network.

More help is available by typing NET HELPMSG 2273.

+ service gfi languard s.e.l.m. 5.0 collector agent service , was down
-1-
-> change
+ mail or netsend demande : mcutting@domain.co.uk
+ OK up
The message alias could not be found on the network.

More help is available by typing NET HELPMSG 2273.

+ service print spooler , was down
-1-
-> change
+ mail or netsend demande : mcutting@domain.co.uk
+ OK up
The message alias could not be found on the network.

More help is available by typing NET HELPMSG 2273.
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
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please keep in mind that exec_background is also a Cacti system function, although it must be sourced from lib/poller.php.

Larry
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?
Dave96
Posts: 13
Joined: Sat Jan 21, 2006 7:52 pm

Post by Dave96 »

Your plugin doesn't work on PHP5...

That is why I got the error I posted above...
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests